-
@mturoci Loving name-based labeling! Does this not work for commands or... am I doing something wrong? from h2o_wave import main, app, Q, ui, handle_on, on, data
@app('/')
async def serve(q: Q):
q.page['example'] = ui.form_card(box='1 1 4 4', items=[
ui.button(name='step_button', label='Step 1'),
])
# Update button label.
q.page['example'].step_button.label = 'Step 2'
q.page['header'] = ui.header_card(
box='2 1 4 4',
title='My Testing App',
subtitle='chickity china the chinese chicken',
commands=[
ui.command(name='color_theme', label='Label 1'),
]
)
q.page['header'].commands[0].label = 'Label Index'
q.page['header'].color_theme.label = 'Label Name'
await q.page.save() |
Beta Was this translation helpful? Give feedback.
Answered by
mturoci
Aug 1, 2023
Replies: 1 comment 1 reply
-
Good question! It works for components ( |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mturoci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good question! It works for components (
items
prop etc.), but I can make it work for commands as well probably. TBH I forgot about them :)