I'm using replace in vue to add query to the current url .
and i assigned undefined if the value is not there.
this.$router.replace({
name: "admin-frs",
query: {
limit: this.pageSize,
page: this.currentPage,
sort: this.sortbyapi || undefined,
language: this.sortbyapiLang || undefined,
},
})
this makes the query item disappear from the URL when the query data is getting updated which is fine.
it does not remove it from the query object.
any idea if there's a better approach than this?
plus is it possible to get the query as it is from the route? like &limit=10...etc