-
Notifications
You must be signed in to change notification settings - Fork 13
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
Avoid empty query values #3
Comments
Returned to this proposal. I wonder, how we should figure out which value is not acceptable to the query param and which is not? For example, we've got a query state like this: $query = {
search: '',
checked: false,
selected: []
}; Should we remove the One more disadvantage is if we remove param from $query store we'll have to check all places to Any thoughts? |
Maybe it makes sense not to remove any parameters from the state object, but hide it from string before history.pushState? |
@zyxd The main issue is how to retrieve this state after page reload. So, this is exactly what I mean, our state is out of sync. |
@PaulMaly I think it should be optional and disabled by default. |
@zyxd Seems, this will cause us to lose information about the parameter type and be forced to check the value for existence in all places we use it:
|
No updates here. Closed for now. Feel fee to open again if needed. |
To avoid url like /path?page=&search= maybe better to check a value is not empty?
Or maybe it is better to add an option to 'clean' the query.
https://github.com/PaulMaly/svelte-pathfinder/blob/39aa6c177ebaade5d093501b715d9e8ef917a111/src/helpers.js#L52
The text was updated successfully, but these errors were encountered: