-
-
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] Callback with dcc.Location 'search' input is fired 2 times #883
Comments
Good catch - and thanks for the nice simplified demo @marchevska 🏆 Looks to me as though there are 2 things going on here, either of which would fix this. We might want to do both, but we need to investigate potential side-effects:
|
I have observed similar behaviour when updating inputs with the location href data. Example:
When visiting http://localhost:8050/?vars=a,b,c,d the inputs are being updated once, but the result is updated sequentially four times, instead of all at once. Output:
Env:
|
Is there a way of aborting sequential updates and only letting the last one complete as a quick fix? |
A possible quick fix could be using the flask
|
I've taken the original example for a spin, and it's no longer a problem in Dash (2.7.0). Bisecting reveals that the problem was resolved in Dash 1.11.0, which the change-log indicates was when Pattern Matching Callbacks was added, which apparently fixed a bunch of callback issues, including callbacks being triggered multiple times.
@alexcjohnson I have a hunch, that like #1049, this bug may have now been resolved. |
Thanks @ned2! I agree, this one can be closed 🎉 |
Hi, I noticed a small issue with dcc.Location. Callbacks having Input('url', 'search') are fired twice with every change of the parameter. Below is a small demo
Each time the button is submitted, the output is like this, which shows that update_div1 function runs twice
Environment
The text was updated successfully, but these errors were encountered: