-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] dcc.Dropdown value
does not update when selected option removed from options
-- but UI does update
#1868
Comments
value
does not update when selected option removed from options
-- but UI does update
@alexcjohnson It seems to me that this could be fixed by adding a few lines of code here to filter |
Nice debugging! I don't think anyone will be bothered by this triggering a Would be great if we could use this opportunity to remove the
make it so we can call: const filterOptions = memoizedFilterOptions(options); |
|
one more nuance though - if we do add a |
@alexcjohnson I have the same issue with dash 2.8.1 version, is it suppose to be solved with version? how i can solve this bug? |
I was running the example from @emilykl on version 2.9.3 and having the same issue as before. Maybe some regression? |
Describe your context
pip list | grep dash
belowBug is not browser-specific but these are my stats:
Describe the bug
When the
options
of adcc.Dropdown
are updated to remove a currently selected option, the UI updates to remove that value, but thevalue
parameter does not update.This results in unexpected app behaviour because the
value
of the dropdown is different from what's displayed in the UI.This behaviour happens with both single-select and multi-select dropdowns.
Expected behavior
Removing an option from
options
also removes that option fromvalue
. Value in UI and code remain in sync.Screenshots
dropdown-bug.mov
Minimal example
Adding this callback results in what I think is the expected behaviour:
The text was updated successfully, but these errors were encountered: