You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by johancj January 6, 2023
Hi, how can I use methods in ui.table with a return value in nicegui version 1.0?
I would really appreciate an example like in #150, but with for example the function getSelectedRows. #150 is very similar to my case, but not applicable for nicegui v1.0
The undocumented possibility to receive return values from AG Grid API calls has been lost when leaving JustPy behind for version 1.0. It would, however, be a valuable feature and not too hard to implement, since we already support return values from ui.run_javascript.
support return values for ui.run_method
support return values for table.call_api_method
demonstrate getSelectedRows on API reference
The text was updated successfully, but these errors were encountered:
I'm still hesitating to implement return values for run_method and call_api_method as initially planned. Both would have to become async and, like with run_javascript, we would need to introduce parameters respond, timeout and check_interval. That's possible, but a rather significant API change, especially switching from sync to async.
In contrast to the original plan, I found a rather simple alternative: Introducing getElement() in JavaScript in 23da696, we can now write something like:
This keeps the API for NiceGUI's core features nice and simple while enabling power users - especially of 3rd party modules like AG Grid and Highcharts - to get full access of underlying APIs.
Here is a complete example for trying out different API methods with and without return value:
Thanks guys. I ended up implementing an async version of run_method on our fork to solve this problem. However, this is a simple enough workaround and I much rather stick to the official fork.
Discussed in #229
Originally posted by johancj January 6, 2023
Hi, how can I use methods in ui.table with a return value in nicegui version 1.0?
I would really appreciate an example like in #150, but with for example the function
getSelectedRows
. #150 is very similar to my case, but not applicable for nicegui v1.0The undocumented possibility to receive return values from AG Grid API calls has been lost when leaving JustPy behind for version 1.0. It would, however, be a valuable feature and not too hard to implement, since we already support return values from
ui.run_javascript
.ui.run_method
table.call_api_method
getSelectedRows
on API referenceThe text was updated successfully, but these errors were encountered: