fix: script uses app. prefix for getWidgetById sibling resolution

bricks.app.root is not a widget (no .dom_element), causing get_by_id to fail.
Use bricks.getWidgetById('app.tblname_tbl') without second arg — bricks
resolves 'app' to bricks.app automatically, then searches downward from root.
This commit is contained in:
Hermes Agent 2026-06-22 12:26:45 +08:00
parent ab7528420f
commit 11fe135a40
2 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ data_browser_tmpl = """
"event":"submit",
"actiontype":"script",
"target":"app.{{tblname}}_tbl",
"script":"var tbl = bricks.getWidgetById('{{tblname}}_tbl', bricks.app.root); if(tbl) await tbl.render(params);"
"script":"var tbl = bricks.getWidgetById('app.{{tblname}}_tbl'); if(tbl) await tbl.render(params);"
}]
},
{% endif %}