TanStackT
TanStack10mo ago
3 replies
faint-white

Resetting search parameters when leaving a location / route?

I'm using search parameters for pagination vales like page and offset. When navigating away from a route with a table that uses these, to a different route that also has a table that uses page and offset, I want those values to be reset. Is there some way to solve this in the route setup (ie with onLeave), or do I have to do what I do now, setting these search paramaters to 0 on every mavigate/link in the page?
Was this page helpful?