Default Search Params
Based on the documentation and the example projects, it seems like you should be able to set default search parameters either by returning a default parameter in validateSearch, or using a preSearchFilter.
For example if I have:
This should run before the route and child component render, so when using
It should be
I've also tried setting it in the preSearchFilters but am unable to get a default value to populate when navigating to the route with a Link component.
Does
Edit: for clarification - I am able to set a default, but it doesn't get populated into the URL's search params. So the value in
For example if I have:
This should run before the route and child component render, so when using
It should be
"one" by default, right?I've also tried setting it in the preSearchFilters but am unable to get a default value to populate when navigating to the route with a Link component.
Does
useSearch() actually run before validateSearch?Edit: for clarification - I am able to set a default, but it doesn't get populated into the URL's search params. So the value in
myParam is what I expect but the URL for the page looks wrong because nothing is populated for that param.