-
Notifications
You must be signed in to change notification settings - Fork 176
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
Navigating to the current route but with different query params does not update the URL when using @PreserveOnRefresh #19701
Comments
It looks like a regression introduced by #15331 If you replace the buttons with |
The issue was triaged and currently added to the backlog priority queue for further investigation |
The issue was assigned to a developer and is currently being investigated |
…P: 24.4) (#19719) * fix: update browser URL on preserve on refresh navigation (#19718) Programmatic self navigation with query parameters on view with preserve on refresh do not update the URL in the browser. This change fixes the regression introduced by #15331, updating push history also for navigation events with trigger REFRESH. Fixes #19701 * restore removed imports --------- Co-authored-by: Marco Collovati <[email protected]>
…P: 24.3) (#19720) * fix: update browser URL on preserve on refresh navigation (#19718) Programmatic self navigation with query parameters on view with preserve on refresh do not update the URL in the browser. This change fixes the regression introduced by #15331, updating push history also for navigation events with trigger REFRESH. Fixes #19701 * restore removed imports --------- Co-authored-by: Marco Collovati <[email protected]>
The PR fixing the issue was merged and changes will be delivered in the following versions: Flow 24.4.5 (Vaadin 24.4.8), 24.3.14 (Vaadin 24.3.17) |
This ticket/PR has been released with Vaadin 24.5.0.alpha6 and is also targeting the upcoming stable 24.5.0 version. |
This ticket/PR has been released with Vaadin 24.4.8. |
Description of the bug
In my repro example there is a route called TreeView ("/tree"). It contains 3 buttons. If you click the first button it navigated to /tree?param=one. If you click the second, it navigates to /tree?param=two etc.
My demo app has @PreserveOnRefresh on the TreeView route. When clicking the buttons, the URL does not update.
If you remove @PreserveOnRefresh, the buttons do cause the URL to update.
The actual navigation is fine but the URL does not change correctly.
We had previously worked around this by calling ui.getPage().getHistory().replaceState(..) to set the correct URL. However, we are now unable to upgrade to 24.4 due to #19613
I don't really want to be calling replaceState so I'd like to get this bug fixed so we don't have to.
Expected behavior
URL should change when the buttons are pressed
Minimal reproducible example
preserveonrefresh-nav-issue.zip
Versions
The text was updated successfully, but these errors were encountered: