Skip to content
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

removeDefaultsFromUrl: true doesn't take equals into account #263

Open
meros opened this issue Apr 28, 2023 · 2 comments
Open

removeDefaultsFromUrl: true doesn't take equals into account #263

meros opened this issue Apr 28, 2023 · 2 comments

Comments

@meros
Copy link

meros commented Apr 28, 2023

In removeDefaults.ts, I would expect equals to be used (if defined) to check for equality between default and encoded value. If there is no equals, shallowEqual should be used instead.

Now, when I set a value that is not ===, but equals() to the default, the param is still present in the URL for no reason.

@juancho11gm
Copy link

+1.
I'm using the withDefault(NumericArrayParam, [0, 100]); with the removeDefaultsFromUrl but it is not removed from the URL when the value did not change.

@chrisbag
Copy link

Yes same on my side :)
Would definitely make sense to remove from params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants