-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Updating options of a dropdown triggers update on value of the dropdown for pattern-matching callbacks #2487
Comments
Is this really about pattern matching? After my latest dash update I generally have the problem that updates of "options" will call the "value" callback of a dropdown. This seems to happen since version 2.7.1. Example:
In dash 2.7.0 the button will not trigger the second callback, since 2.7.1 it will. |
While I was trying older versions of Dash, this bug sometimes happened but sometimes didn't in version 2.7.0 and I just couldn't figure it out why but never happened with normal callbacks. Could it be something about dependencies? Because when you try to install an older version of Dash, pip uninstall only Dash then installs the version you choose but keeps the dependencies the same. |
Thanks for the report, I've been trying to fix the regression with the component as prop (Dropdown.options is a component as prop) triggering other callbacks not on the prop that changed, it started when I changed the callback results to trigger callbacks on components returned by callbacks in 2.7.1 and there was a couple fixes over the last few versions. Normal callbacks are fixed and tested in
I tested the code provided here and can reproduce, I further isolated the callbacks and seems like this is another case involving Output and pattern matching ids, those get triggered by normal & pattern matching inputs. |
I am adding my own example (#2452) to demonstrate the issue. There is no pattern-matching here. The video recording shows how the unrelated trigger (a button) gets fired by me typing in the drop-down menu. I confirm that 2.7.0 works as expected.
screen-capture.webm
Output:
|
If there are two pattern-matching callbacks for a dropdowns' options and value, the callback that changes the dropdown's options also triggers the other callback that uses the dropdown's value.
In the example above, when I use the dropdown 'd1' to change the options of 'd2's, the first callback triggers as expected but after that second callback also triggers where it is not supposed to.
pip list
The text was updated successfully, but these errors were encountered: