Browse Source

Run dynamic argument conversion when using run_grid_method / run_row_method (#3866)

Following up with https://github.com/zauberzeug/nicegui/pull/3757

Do dynamic property conversion when using `run_grid_method` /
`run_row_method`, so you can dynamically add / change callbacks and
other things using properties with `:` prefix.
Alex Pilon 7 months ago
parent
commit
9fd61ddddd
1 changed files with 2 additions and 0 deletions
  1. 2 0
      nicegui/elements/aggrid.js

+ 2 - 0
nicegui/elements/aggrid.js

@@ -46,9 +46,11 @@ export default {
       this.api.addGlobalListener(this.handle_event);
       this.api.addGlobalListener(this.handle_event);
     },
     },
     run_grid_method(name, ...args) {
     run_grid_method(name, ...args) {
+      convertDynamicProperties(args, true);
       return runMethod(this.api, name, args);
       return runMethod(this.api, name, args);
     },
     },
     run_row_method(row_id, name, ...args) {
     run_row_method(row_id, name, ...args) {
+      convertDynamicProperties(args, true);
       return runMethod(this.api.getRowNode(row_id), name, args);
       return runMethod(this.api.getRowNode(row_id), name, args);
     },
     },
     handle_event(type, args) {
     handle_event(type, args) {