Open
Description
Wave SDK Version, OS
Wave version - (1.6.0, MacOS and App Store )
(e.g. 4.2.0, Windows)
Actual behavior
When updating( set an empty list or set a list with different set of rows) the Values attribute of a wave table rows selection in the UI are not updating accordingly.
Expected behavior
from h2o_wave import main, app, Q, ui
@app('/demo')
async def serve(q: Q):
if q.args.show_inputs:
table = q.page["example"].items[0].table
table.rows= [
ui.table_row(name='row1', cells=['Row 1']),
ui.table_row(name='row2', cells=['Row 2']),
ui.table_row(name='row4', cells=['Row 4']),
ui.table_row(name='row5', cells=['Row 5'])
]
table.multiple = True
table.values = ['row1','row5']
else:
q.page['example'] = ui.form_card(box='1 1 -1 5', items=[
ui.table(
name='table',
columns=[ui.table_column(name='text', label='Table multiple selection', min_width='300px')],
rows=[
ui.table_row(name='row1', cells=['Row 1']),
ui.table_row(name='row2', cells=['Row 2']),
ui.table_row(name='row3', cells=['Row 3']),
ui.table_row(name='row4', cells=['Row 4']),
ui.table_row(name='row5', cells=['Row 5'])
],
multiple = True,
values=['row2','row4'],
),
ui.button(name='show_inputs', label='Submit', primary=True)
])
await q.page.save()
Screen.Recording.2025-02-07.at.16.42.41.mov
I expect when click on the submit button, Selected rows in the UI changed to row1 and row5. But actually row selection in UI doesn't change.
Steps To Reproduce
- Do this
- Do that
- Do something else
- See error