Current url is
/search
New url should be
/search?foo=bar
I just want to update my query params being on the same route as a result of application of some filters on the page
My code:
this.$router.push({query: params})
There is a way to handle the "NavigationDuplicated" error using a catch block but that only supresses the error, the query parameters in the route are still not updated.
Related issue:
How to use router.push for same path, different query parameter in Vue.js
But this gives the path '/' but i need to remain on the same page