Replies: 2 comments
-
Items are clickable by using the Here's an example: from h2o_wave import main, app, Q, ui
@app('/')
async def serve(q: Q):
print(q.args)
if not q.client.initialized:
q.page["meta"] = ui.meta_card("")
q.page["form"] = ui.stat_table_card(
box='4 4 4 4',
title='My Stat Table Card',
name='my_stat_table_card',
subtitle='This is a test.',
columns=["Name", "Value", ""],
items=[
ui.stat_table_item(
label=f'Row {i}',
name=f'my_row_{i}' if i < 2 else "",
caption='This is a row',
icon='Play',
icon_color='Blue',
values=[str(i), ""])
for i in range(3)],
commands=[]
)
q.client.initialized = True
if q.args.my_stat_table_card is not None:
q.page["meta"].dialog = ui.dialog(
title="You Clicked a Row",
items=[
ui.text(f"You clicked on the row named: {q.args.my_stat_table_card}")
],
closable=True
)
await q.page.save() |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
is there a particular reason why a
stat_table_item()
is not clickable / submittable like astat_list_item()
?Also, the documentation for a
stat_table_card()
andstat_list_card()
has optional links but I couldn't find how to use this.Essentially: what I'm trying to implement is - clickable stat items / dataset names, to view more info about them
Beta Was this translation helpful? Give feedback.
All reactions