`validateSearch` prevents masking URL
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
Which project does this relate to?
Router
Describe the bug
When you return default values from validateSearch option, Masking URL does not work anymore.
Your Example Website or App
https://stackblitz.com/edit/tanstack-router-xqyz7u5c
Steps to Reproduce the Bug or Issue
- open Stackblitz
- open Browser window in a new tab as you can't see url changes inside Stackblitz
- click 'to redirect page' link
- url has its search params like
about?redirect=%2Feven though masking URL inredirect.tsxexists - once you remove
validateSearchinabout.tsxthis problem disappears
Expected behavior
Masking URL works with validateSearch default values.
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: Chrome
- Version: 133.0.6943.128
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked StackBlitz reproduction, focusing on redirect.tsx and about.tsx and the validateSearch and masking URL options described in the steps. Compare the URL after clicking the redirect link with and without validateSearch; done means default search values no longer prevent the masked URL from appearing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100