Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

dcc.Location props fix for callbacks #774

Merged
merged 11 commits into from
Mar 23, 2020
Merged

dcc.Location props fix for callbacks #774

merged 11 commits into from
Mar 23, 2020

Conversation

HammadTheOne
Copy link
Collaborator

@HammadTheOne HammadTheOne commented Mar 11, 2020

As pointed out in #769, dcc.Location was firing callbacks for the pathname when the href was changed. This behaviour carried over to all props, including hash and search. This PR fixes that behaviour by adding in conditionals to check whether the new value is different from the previous one.

To Do:

  • Add a basic integration test
  • Update changelog with PR tag and link.

@alexcjohnson
Copy link
Collaborator

Nice! supersedes community PR #765 - take a look at the app there as a test case.

@ma-ts
Copy link

ma-ts commented Mar 12, 2020

Hi, thanks for this! We found this bug while developing a multi-page app with one part listening for the pathname changes, and one part for the search-changes, resulting in double callbacks for the search callback. In what version do you expect this fix to be included? We can then remove a custom component (and an entire step in our DDS deployment script)

@alexcjohnson alexcjohnson added this to the Dash v1.10 milestone Mar 12, 2020
@alexcjohnson
Copy link
Collaborator

@AHMatsWillemsen this fix is expected to be included in the next Dash version (1.10)

@HammadTheOne HammadTheOne merged commit 139607d into dev Mar 23, 2020
@HammadTheOne HammadTheOne deleted the 769-location-fix branch March 23, 2020 21:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants