-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link href
doesn't update when search params change when localePrefix
is set to never
.
#918
Comments
I can unfortunately not follow your reproduction steps in the provided reproduction, seems like the template is unchanged. Any chance you didn't commit the latest changes? |
Yes, you're correct, should work now. Sorry about that. 🙏 |
Thanks! I can reproduce the issue and a fix is coming! |
This is fixed in Thank you so much for taking the time to build a great reproduction, that helped a lot with finding the cause and fixing it! |
Thanks for the quick fix! |
Description
If a
Link
is present in a client component and the url depends on the existingsearchParams
, the url is not updated when thesearchParams
change. For some reason this happens whencreateSharedPathnamesNavigation
is invoked withlocalePrefix: "never"
, default value seems to work fine.Mandatory reproduction URL
https://codesandbox.io/p/github/jorgemoya/next-intl-bug-repro-app-router/main?import=true
Reproduction description
Steps to reproduce:
Foo
linkBroken Link
and notice it doesn't includefoo=bar
search params when it should.Alternate:
Foo
linkHome
linkBroken Link
and notice it does includefoo=bar
search params when it shouldn't.Expected behaviour
The expected behavior would be for the
Broken Link
link the match the search params present, even after they update.The text was updated successfully, but these errors were encountered: