Change route query without triggering a page reload #1806
Replies: 1 comment
-
I will close this discussion since it was an error in my application with watchers :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I need to update a query parameter when the user enters a search input so it is persistet in the route query when the user reloads the page.
My code
Current behavior
A page reload is triggered
Expected behavior
Query parameter should be changed without reloading the page.
Is there any way to solve this?
Additional information
If I use
history.replaceState()
instead ofrouter.replace()
the behavior is as expected (although the vue-router docs state that it should be the same which is obviously not the case.Example:
Beta Was this translation helpful? Give feedback.
All reactions