Skip to content
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

updateState no longer called when changing URL query parameter #484

Closed
ryanaston opened this issue Mar 1, 2022 · 3 comments
Closed

updateState no longer called when changing URL query parameter #484

ryanaston opened this issue Mar 1, 2022 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@ryanaston
Copy link

Describe the bug
I have a BeamLocation that overrides updateState in order to notify some widgets down the tree when a query parameter in the URL has changed. In 1.3.0 this worked perfectly. However, when I upgraded to 1.4.0 this stopped working. After a bit of digging I found that "updateState" is no longer being called when the query parameter changes, thus preventing me from notifying my child widgets that the parameter has changed. I have a hunch this is related to change #475. Unfortunately I don't have much time to dig further and have rolled back to 1.3.0.

Beamer version: 1.4.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a BeamLocation which overrides "updateState"
  2. Go to that URL with a query parameter: /#/?date=2022-02-28
  3. Print or put a breakpoint in the overridden updateState method
  4. Change the query parameter value: /#/?date=2022-02-27
  5. Observe the print statement/breakpoint is not triggered

Expected behavior
updateState would be called when the query parameter changes

Desktop (please complete the following information):

  • OS: macOS
  • Browser: Chrome
  • Version: 98
@slovnicki
Copy link
Owner

Hey @ryanaston
Thanks for the detailed report.

I will try to reproduce and will let you know when v1.4.1 with a fix is available. At first glance, it shouldn't be due to #475 because query is a part of RouteInformation.location, but we'll see.

@ryanaston
Copy link
Author

Hey @ryanaston Thanks for the detailed report.

I will try to reproduce and will let you know when v1.4.1 with a fix is available. At first glance, it shouldn't be due to #475 because query is a part of RouteInformation.location, but we'll see.

Was this issue addressed in 1.4.1?

@slovnicki
Copy link
Owner

Hey @ryanaston
sorry for late response.

Thanks for reminding me of this as I clearly forgot. I managed to find the culprit and fix it - you can see in the commit what was wrong. It was a bit tricky to test it (I'll need to restructure the tests some time soon...), but it should work now.

Thanks again for your patience.

@slovnicki slovnicki added the bug Something isn't working label Apr 21, 2022
@slovnicki slovnicki added this to the v1.5.0 milestone Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants