Closed
Description
Which project does this relate to?
Router
Describe the bug
When using this code to do a search param change on the current page, the route is changing incorrectly:
navigate({
to: ".",
search: (prev) => ({
...prev,
[`_${name}`]: open ? true : undefined,
}),
resetScroll: false,
});
Your Example Website or App
https://github.com/checkerschaf/tanstack-start-buildlocation-bug
Steps to Reproduce the Bug or Issue
- Go to http://localhost:3000/en/hello
- Press the top
Add test
button - The url should stay the same, but it changes to
/en
instead
Expected behavior
The url should stay http://localhost:3000/en/hello
and append ?_test=true
as a search param
Screenshots or Videos
No response
Platform
- Router / Start Version: 1.125.1
- OS: macOS
- Browser: Chrome
- Browser Version: latest
- Bundler: vite
Additional context
No response
Metadata
Metadata
Assignees
Labels
No labels