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
@app.callback(
[Output("my-dropdown", "options"),
Output("my-dropdown", "value")],
Input("url", "pathname"),
[State("my-dropdown", "value")]
)
def load_dropdown(pathname, dropdown_values):
# some code here that determine what the dropdown options should be and if needed clear options that are no longer available
The text was updated successfully, but these errors were encountered:
gvwilson
changed the title
[BUG] Dropdown clears values on page refresh or tab switch when options are changed
Dropdown clears values on page refresh or tab switch when options are changed
Aug 13, 2024
Describe your context
python 3.10
Describe the bug
Dash dcc dropdown persistence clearing all values when updating options even if returning no_update on value of dropdown
Expected behavior
dash multi selection dropdown should keep values that are still available if options are changed.
I want the inputs to be kept if a tab is changed to and back or on a page refresh (therefore i'm using persistence type local)
another page determines what dropdown options are available on original page
Screenshots
example dropdown setup
layout with a dropdown
The text was updated successfully, but these errors were encountered: