Navigate should use input type params not output type params.
Looks like there's not a way to control the input type of search params. calls to
navigate
still require search params even if they are marked as optional and resolved with default or catch. Unless I'm missing something. Stackblitz with example: https://stackblitz.com/edit/tanstack-router-vkzaga?file=src%2Froutes%2Fposts.tsx
mfrancis107
StackBlitz
Tanstack Router - Search Params Input Type - StackBlitz
Run official live example code for Router Basic React Query File Based, created by Tanstack on StackBlitz
2 Replies
molecular-blue•16mo ago
this has been discussed previously
https://github.com/TanStack/router/issues/1701#issuecomment-2145706277
GitHub
search
seems to be inferring the output type of the `validateSear...Describe the bug I want to validate my search params while also making it optional when navigating from other routes but I'll provide the default value if there isn't one so I'm expecti...
molecular-blue•16mo ago
if the documentation is lacking about this please raise a PR to improve this