How to stay on the same route and update search parameters #4333
Replies: 1 comment
-
In version 112.18, I was able to use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a page with a list of users at the route
/users
and a details panel opens o the side when a user ID is present in the route
/users/$userId
The users list includes a search bar that uses the
useNavigate
hookWhen I'm on
/users/$userId
callingnavigate
takes me to/users?phrase=test
instead of/users/123?phrase=test
, so the details panel disappears when I searchI can remove
from:
option fromuseNavigate
and use relative path.
But then the search params isn’t strongly typed anymore without
from
. Is there a better way to do this?It used to work fine in earlier versions, so maybe something changed or it's a bug 🤔
Beta Was this translation helpful? Give feedback.
All reactions