h2oai / wave

Realtime Web Apps and Dashboards for Python and R
https://wave.h2o.ai
Apache License 2.0
3.9k stars 323 forks source link

Add `name` attribute to ui.stats #2197

Closed nipunchamikara closed 7 months ago

nipunchamikara commented 7 months ago

Wave SDK Version, OS

1.0, MacOS

Actual behavior

I have a few widgets as items within a form_card, one of then being a stats widget. I want to reference it later in the code to update it. However, when I try to add a name="stats" argument, the IDE says it is an unexpected argument. When I try to run the Wave app, it throws the following error: Error: stats() got an unexpected keyword argument ‘name’

This argument is also missing in some card widgets as well - ui.py

Is there any other to reference a widget other than the square-bracket notation.

Expected behavior

The widget can be referenced like most other widgets (by-name component access).

mturoci commented 7 months ago

Definitely something we need to add. Thanks for the suggestion @nipunchamikara!