You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using retained searchParams, if we change the retained param x form a to b on some route (lets say route-a) and we navigate to route-b, which doesn't change param x, param x will revert back to its default value.
This is a regression because it works on using older versions.
click on Home route:
4.a older version: Auth remains as false (which is expected)
4.b newer version: Auth changes back to true (which is unexpected)
Expected behavior
after chaning the retained searchParams, it should stay unchanged after navigations, and only change if explicitly said so.
some other weird thing here is that even without using this middle params stay on URL, kinda making retainSearchParams useless, unless im not grasping the use of it correctly.
Screenshots or Videos
No response
Platform
OS: [e.g. macOS, Windows, Linux]
Browser: [e.g. Chrome, Safari, Firefox]
Version: [e.g. 91.1]
Additional context
No response
The text was updated successfully, but these errors were encountered:
hakoomen
changed the title
Router searchParameter gets reset eventhough we tell it to be persisted using retainSearchParams
Router searchParameter gets reset to default value (of zod schema) after navigations (and using retainSearchParams)
Nov 24, 2024
Which project does this relate to?
Router
Describe the bug
Using retained searchParams, if we change the retained param
x
forma
tob
on some route (lets say route-a) and we navigate to route-b, which doesn't change paramx
, paramx
will revert back to its default value.This is a regression because it works on using older versions.
Same code older versions:
stackblitz
Same code latest versions:
stackblitz
Your Example Website or App
-see desc
Steps to Reproduce the Bug or Issue
4.a older version: Auth remains as false (which is expected)
4.b newer version: Auth changes back to true (which is unexpected)
Expected behavior
after chaning the retained searchParams, it should stay unchanged after navigations, and only change if explicitly said so.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: