How to retain only search params of Route
I have two routes where I am using search params for filtering and sorting. The search params between the two routes are completely independent of each other so I would like to only show the search params of the active route in URL while ALSO stripping default params.
I'm using the middlewards like so:
and have also tried doing
but I am still seeing the params from route 1 carry over to route 2.
Here is a minimal reproduction of my setup:
https://stackblitz.com/edit/tanstack-router-vazxth?file=src%2Froutes%2Findex.tsx
You'll notice that when changing between the Home and the About route that the search param of the non active route is displayed
I'm using the middlewards like so:
and have also tried doing
but I am still seeing the params from route 1 carry over to route 2.
Here is a minimal reproduction of my setup:
https://stackblitz.com/edit/tanstack-router-vazxth?file=src%2Froutes%2Findex.tsx
You'll notice that when changing between the Home and the About route that the search param of the non active route is displayed
StackBlitzOwen Vey
Run official live example code for Router Quickstart File Based, created by Tanstack on StackBlitz