-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add Option to Prevent URL Updates on Initial Render #143
Comments
@paoloricciuti, hey! |
Uh sorry, i need to check but i'm pretty sure you can already do something...it should be something like |
@paoloricciuti, thanks for your response! I tried setting |
Sorry but i need an actual reproduction then...i tried and it's working for me. |
@paoloricciuti, got it! I'll try to provide the working example ASAP! |
Describe the problem
Hey, thanks for the great library! It’s super handy for working with query parameters in SvelteKit.
I noticed that when you set a defaultValue, it updates the URL on the initial render if the parameter isn’t already there. For example:
If I load
/
, it immediately changes the URL to/?count=10
.It would be nice to have an option to apply the default value without modifying the URL right away.
Describe the proposed solution
Maybe something like:
This way, count would still default to 10 internally, but the URL stays clean until the user interacts with it.
Let me know if this makes sense or if there’s already a way to do this. Thanks again for your hard work on this library!
The text was updated successfully, but these errors were encountered: