You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the small demo code below, I don't seem to be able to update the value of textbox3 without recreating the item
In my interpretation of the description of #1870, the code below should work.
Expected behavior
Ability to update the value and label of textbox3
Steps To Reproduce
fromh2o_waveimportQ, copy_expando, ui, main, app# noqa: 401asyncdefmeta(q: Q) ->None:
q.page["meta"] =ui.meta_card(
box="",
title="my app",
layouts=[
ui.layout(
breakpoint="0px",
width="100%",
zones=[
ui.zone(
"content",
size="1",
),
],
),
],
script=None,
notification_bar=None,
)
q.page["meta"].theme="h2o-dark"@app("/")asyncdefserve(q: Q):
print(q.args)
copy_expando(q.args, q.client)
q.page["my_important_content"] =ui.form_card(box="content", items=[])
items= [
ui.text_l("Cool headline"),
ui.textbox(
name="textbox1",
label="Value1",
value=q.client["textbox1"],
trigger=True,
required=True,
),
ui.textbox(
name="textbox2",
label="Value2",
value=q.client["textbox2"],
trigger=True,
required=True,
),
]
items_exp=items+ [
ui.textbox(
name="textbox3",
label="Concatenated values",
value=q.client["textbox3"],
disabled=True,
),
]
q.page["my_important_content"].items=items_expifq.args.__wave_submission_name__=="home":
q.client["nav/active"] ="home"elifq.args.__wave_submission_name__=="settings":
q.client["nav/active"] ="settings"if (
q.args.__wave_submission_name__=="textbox1"orq.args.__wave_submission_name__=="textbox2"
):
print("updating the page")
new_value=q.client["textbox1"] +q.client["textbox2"]
print(new_value)
# these both don't do anythingq.page["my_important_content"].textbox3.value=new_valueq.page["my_important_content"].textbox3.label=new_value# these both don't do anythingq.page["textbox3"].value=new_valueq.page["textbox3"].label=new_value# these both don't do anythingq.page["content"].textbox3.value=new_valueq.page["content"].textbox3.label=new_value# these both don't do anythingq.page["meta"].textbox3.value=new_valueq.page["meta"].textbox3.label=new_value# removes the itemq.page["my_important_content"].items[3].label=new_value# does nothingq.page["my_important_content"].items[3].value=new_value# This removes the componentq.page["my_important_content"].items.textbox3=ui.textbox(
name="textbox3",
label="Concatenated values",
value=new_value,
disabled=True,
)
# This removes the componentq.page["my_important_content"].items["textbox3"] =ui.textbox(
name="textbox3",
label="Concatenated values",
value=new_value,
disabled=True,
)
# This removes the componentq.page["my_important_content"].textbox3=ui.textbox(
name="textbox3",
label="Concatenated values",
value=new_value,
disabled=True,
)
# This worksq.page["my_important_content"].items[3] =ui.textbox(
name="textbox3",
label="Concatenated values",
value=new_value,
disabled=True,
)
# This worksitems_exp=items+ [
ui.textbox(
name="textbox3",
label="Concatenated values",
value=new_value,
disabled=True,
),
]
q.page["my_important_content"].items=items_expawaitmeta(q)
awaitq.page.save()
The text was updated successfully, but these errors were encountered:
Wave SDK Version, OS
wave 1.3.4
Actual behavior
Given the small demo code below, I don't seem to be able to update the value of textbox3 without recreating the item
In my interpretation of the description of #1870, the code below should work.
Expected behavior
Ability to update the value and label of textbox3
Steps To Reproduce
The text was updated successfully, but these errors were encountered: