Q: Regarding the sharing behaviour of query params between routes
My question is regarding the sharing of search query param values across path routes.
This is the route setup I've got.
rootRoute
| / -
| agreements -
| / -
| reservations -
| / -
Both the index routes of 'agreements' and 'reservations' have a validateSearch zod schema of:
and a preSearchFilters functions of on both index routes of 'agreements' and 'reservations':
Currently,
* if I am on
* and click on a link that ONLY has the following prop of
* it takes me to
Q1: Is this expected behaviour?
Q2: To get it to go to
This is the route setup I've got.
rootRoute
| / -
index.ts index route| agreements -
agreements.path.ts path| / -
agreements.index.ts index route of 'agreements'| reservations -
reservations.path.ts path| / -
reservations.index.ts index route of 'reservations'Both the index routes of 'agreements' and 'reservations' have a validateSearch zod schema of:
and a preSearchFilters functions of on both index routes of 'agreements' and 'reservations':
Currently,
* if I am on
/reservations?page=2* and click on a link that ONLY has the following prop of
to='/agreements' on <Link />* it takes me to
/agreements?page=2 instead of /agreements?page=1.Q1: Is this expected behaviour?
Q2: To get it to go to
/agreements?page=1 I should explicitly provide the following of to='/agreements' search={(s) => ({ ...s, page: 1 })} to <Link />?