Accessing inline items #1095
Answered
by
vopani
Alex-Wenner-FHR
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
vopani
Oct 28, 2021
Replies: 1 comment 4 replies
-
Without knowing the error, it's hard to know where you are facing an issue. An indexing problem would be my best guess. A working example: from h2o_wave import Q, main, app, ui
@app('/')
async def serve(q: Q):
if q.args.change:
q.page['name'].items[1].inline.items[0].message_bar.text = 'Text Change'
else:
q.page['name'] = ui.form_card(
box='1 1 2 2',
items=[
ui.label('Test'),
ui.inline(
items=[
ui.message_bar(type='info', text='No Filter Selected'),
ui.button(name='change', label='Change', primary=True)
]
)
]
)
await q.page.save() |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
mtanco
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without knowing the error, it's hard to know where you are facing an issue. An indexing problem would be my best guess.
A working example: