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
Unset route query on default value is not working anymore #3290
Comments
I just want to ask, when I use: const state = reactive({
name: useRouteQuery('name', ''),
})
watch(state, (newValue, oldValue) => {
console.log(newValue === oldValue) // true
console.log(newValue.name === oldValue.name) // true
}) when changing the value of state.name, console.log in watch returns true. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I have rebased the pull request to the latest commits of the main branch, so it is ready again to be reviewed |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It is fixed via #3583 |
Describe the bug
Setup
Package: @vueuse/router
Expected Beahviour and Behaviour of Version v10.2.1
When I change the value of
search
to the default value (in this case"defaultValue"
), the query parameter is removed from the URL:Behaviour in Version v10.3.0
When changing the value of
search
to the default value (in this case"defaultValue"
), the parameter remains in the URL.Further Notes
In my production use case the default value is
""
which leads to to a paramter?search=
Further observations
Reproduction
https://github.com/greenhalos/useRouteQuery-bug-default
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: