Behaviour of retainSearchParams & stripSearchParams not what expected.
When using both retainSearchParams and stripSearchParams together, the default values are no longer stripped, and then its is not possible to navigate back to the default values after navigating away. Is this the expected behaviour or a bug?
For example the params in the url look like this by default
gallery?tag=all&sort=popularity&page=1
and when navigating to a different search param, I cannot navigate back to the default
2 Replies
eastern-cyan•3w ago
It's a bug. Most likely https://github.com/TanStack/router/issues/2845
GitHub
Router searchParameter gets reset to default value (of zod schema) ...
Which project does this relate to? Router Describe the bug Using retained searchParams, if we change the retained param x form a to b on some route (lets say route-a) and we navigate to route-b, wh...
eastern-cyan•3w ago
or possibly https://github.com/TanStack/router/issues/2830
GitHub
Navigation with retainSearchParams middleware not working · Issue ...
Which project does this relate to? Router Describe the bug Navigating when using a retainSearchParams middleware seems to be broken. The URL for the link shows the search parameter but once we navi...