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
It appears that the session persistence storage is adjusted for the dcc.Dropdown when the object is completely recreated with new "options". This does not happen for the dcc.Checklist, dcc.RadioItems. It also does not happen for the dcc.Slider and dcc.RangeSlider when min and max are changed.
I'm unsure whether this is intended behaviour or if it's a bug. If it is a bug, it’s unclear whether it lies in dcc.Dropdown or the other dcc components I mentioned above.
I would expect the persistence storage for components like dcc.Checklist, as demonstrated in the example, to also adjust when recreated with new "options", similar to how dcc.Dropdown behaves.
In my opinion, dcc.Dropdown behaves more appropriately because the persisted values match the currently selected values that users see in the UI.
Screenshots
P.S. I've noticed that the recordUiEdit function in src/persistence.js is triggered for dcc.Dropdown, but not for dcc.Checklist and the other components mentioned. Could this be due to the asynchronous handling specific to dcc.Dropdown?
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[BUG] Persistence is differently handled for dcc.Dropdown than for the other dcc components
persistence is differently handled for dcc.Dropdown than for the other dcc components
Oct 16, 2024
Hi Dash wizards 👋
I've been using Dash extensively for several years, and this is the first time I've encountered an issue that might be considered a bug.
Dependencies:
Describe the bug
It appears that the session persistence storage is adjusted for the
dcc.Dropdown
when the object is completely recreated with new"options"
. This does not happen for thedcc.Checklist
,dcc.RadioItems
. It also does not happen for thedcc.Slider
anddcc.RangeSlider
whenmin
andmax
are changed.I'm unsure whether this is intended behaviour or if it's a bug. If it is a bug, it’s unclear whether it lies in
dcc.Dropdown
or the other dcc components I mentioned above.Here's a small example:
Expected behavior
I would expect the persistence storage for components like
dcc.Checklist
, as demonstrated in the example, to also adjust when recreated with new "options", similar to howdcc.Dropdown
behaves.In my opinion,
dcc.Dropdown
behaves more appropriately because the persisted values match the currently selected values that users see in the UI.Screenshots
P.S. I've noticed that the
recordUiEdit
function insrc/persistence.js
is triggered fordcc.Dropdown
, but not fordcc.Checklist
and the other components mentioned. Could this be due to the asynchronous handling specific todcc.Dropdown
?The text was updated successfully, but these errors were encountered: