T
TanStack6mo ago
eager-peach

Type helper - Route Ids limited by by a specific search param

We’re attempting to build some re-usable hooks for common uses cases like search. The idea to have a shared Zod schema so that all our list pages have a shared schema for search and then we were looking to create a shared hook. I found the example in the TanStack Table examples (https://tanstack.com/table/latest/docs/framework/react/examples/query-router-search-params) which has a hook that asks for a routeId to type match navigate and search params, but I’m wondering if anyone has any ideas on how to limit the ids only to routes which contain the specific search param of say q.
React TanStack Table Query Router Search Params Example | TanStack ...
An example showing how to implement Query Router Search Params in React using TanStack Table.
1 Reply
eager-peach
eager-peachOP6mo ago
Thanks to @Manuel Schiller I believe he already answered this in another thread here

Did you find this page helpful?