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
I'm using a select component to allow the user to select the dose for a given time of day. Each time period in the dose schedule is initialized to zero by default. Each select component is restricted to a range of possible doses and I include zero as the first option so that the user can specify that there is no dose during a given time period. I noticed that my approach works as expected in v0.12.5 but stopped working in v0.12.6 and v0.12.7. It seems like setting the value broke during these releases (i.e., the select component is blank)?
withme.box(
key=f"current_dose_schedule_box",
style=me.Style(display="flex", flex_basis="auto", flex_wrap="wrap", gap="16px")):
fori, timeinenumerate(TIME_PERIODS_FOR_DOSE_SCHEDULE):
me.select(
key=f"dose_select_{state.reset_counter_dose_schedule}_{time.lower()}",
options=[me.SelectOption(label=("No dose for this period"ifdose==0.0elsef"{format_float(dose)} mg"), value=format_float(dose)) fordosein [0.0] +filtered_dose_values],
label=time,
on_selection_change=update_dose_schedule,
value="0.0", # set to zero by default on server sidedisabled=notbool(state.generic_name) ornotbool(state.total_daily_dose) oris_cds_section_visible(), # disabled if a benzodiazepine or whether to allow combinations has not been chosen and CDS section is not visiblestyle=error_styleifnotstate.total_daily_dose==0andnotis_dose_schedule_valid() elseme.Style()
)
According to the documentation, it seems like placeholder could be an alternative for my use case? However, it's never worked in my experience which I why I started using this workaround of setting the value on the server side and being careful about triggering re-renderings.
I hope this makes and please feel free to let me know if you need any additional information to see if this is a bug or if I'm missing something. Thanks and great work on the project overall--keep it up!! :)
The text was updated successfully, but these errors were encountered:
I'm using a select component to allow the user to select the dose for a given time of day. Each time period in the dose schedule is initialized to zero by default. Each select component is restricted to a range of possible doses and I include zero as the first option so that the user can specify that there is no dose during a given time period. I noticed that my approach works as expected in v0.12.5 but stopped working in v0.12.6 and v0.12.7. It seems like setting the value broke during these releases (i.e., the select component is blank)?
According to the documentation, it seems like placeholder could be an alternative for my use case? However, it's never worked in my experience which I why I started using this workaround of setting the value on the server side and being careful about triggering re-renderings.
I hope this makes and please feel free to let me know if you need any additional information to see if this is a bug or if I'm missing something. Thanks and great work on the project overall--keep it up!! :)
The text was updated successfully, but these errors were encountered: