wave
wave copied to clipboard
Sort is not working for table custom groups
Wave SDK Version, OS
Wave 1.0.2 MacOS 14.2.1 Chrome Version 120.0.6099.216 (Official Build) (arm64)
Actual behavior
https://github.com/h2oai/wave/assets/23740173/a2a12c25-7151-428a-bd65-a972f4ef8300
Sort is not working properly when custom groups are specified as seen on the recording. Not only the wrong items are shown in the second group, but new rows are being added when sorting repeatedly.
Expected behavior
Rows to be sorted ascending (on first sort click and descending on second) within the group.
Steps To Reproduce
from h2o_wave import main, app, Q, ui
@app('/demo')
async def serve(q: Q):
q.page['form'] = ui.form_card(box='1 1 -1 6', items=[
ui.table(
name='issues',
columns=[ui.table_column(name='text', label='Issues reported by', sortable=True)],
groups=[
ui.table_group("Bob", [
ui.table_row(name='row1', cells=['Issue1']),
ui.table_row(name='row2', cells=['Issue2'])
]),
ui.table_group("John", [
ui.table_row(name='row3', cells=['Issue3']),
ui.table_row(name='row4', cells=['Issue4']),
ui.table_row(name='row5', cells=['Issue5']),
], collapsed=False),
ui.table_group("Jane", [])],
height='500px'
)
])
await q.page.save()