T
TanStack11mo ago
adverse-sapphire

Is there a way to change the default navigation behavior to preserve search params?

Question speaks for itsself haha. But I'd like to not have to write this everywhere....
search={(n) => n}
search={(n) => n}
Just to stop from losing my search param state, not a big deal but was curious
2 Replies
xenophobic-harlequin
xenophobic-harlequin11mo ago
retainSearchParams search middleware?
adverse-sapphire
adverse-sapphireOP11mo ago
yup that will do it, haha I didn't even know I coudl do middleware on mysearch params wtf this library is too good IT's not workign for me for some reason, or do I have to plug this into every route Oh wait got it, just a little derp on my part Works like a charm ❤️

Did you find this page helpful?