Presently, the URL shows
/search
The new URL should display
/search?foo=bar
I am looking to modify my query parameters on the current route after applying some filters on the page.
This is my code:
this.$router.push({query: params})
Although I can handle the "NavigationDuplicated" error using a catch block, it only hides the error message and doesn't actually update the query parameters in the route as intended.
Related issue:
How to use router.push for same path, different query parameter in Vue.js
However, this leads to the main path '/' instead of retaining the user on the same page.