-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
Internal state not reflecting actual state of query params after route change #862
Comments
The issue still occurs with the preview version. Thanks |
Solved the issue by adding a key to the |
Could this have been a caching thing from React Router, of it reusing the component rather than unmounting/remounting (which would explain your fix)? Even so, it feels like there is a bug here, if the state is out of sync with the URL. I'll see if I can reproduce it, could you please confirm what the issue was that the search params in the URL were cleared by a manual call to |
I can't reproduce it in #863, could you please take a look at the test and see if it matches with the setup you had? |
Context
What's your version of
nuqs
?What framework are you using?
Which version of your framework are you using?
Description
The internal state of
nuqs
id not reflecting the actual state of query params after route changeReproduction
When switching between
/orders
and/orders/history
throughreact-router
navigate
, the filters will carry over.E.g., Say we have
search=bob
whenorderType
ishistorical
, and then we navigate, the url will not have any search params, but the search part of filters will remain the same.The text was updated successfully, but these errors were encountered: