We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Is it possible to reset a single param if any others change?
I have a pagination param which I would like to reset to 0 if any other filter params change.
I was thinking of something like const { query, setQuery } = useFiltering(queryParamDefaults, () => ({ page: 0 }));
const { query, setQuery } = useFiltering(queryParamDefaults, () => ({ page: 0 }));
Also, I notice the library hasn't been update all that much recently. Is it still being maintained? If not, are there other solutions you'd recommend?
Many thanks for your hard work 👍
The text was updated successfully, but these errors were encountered:
Hmm, I'd probably just do something like:
const [query, setQueryRaw] = useQueryParams(...) const setQuery = useCallback((newParams) => setQueryRaw({ page: 0, ...newParams }), [setQueryRaw])
I haven't made updates to this lib in a long time mostly because it still works fine for me and I'm quite busy.
Sorry, something went wrong.
Thank for the response; that seems to be doing the trick 👍 Wrestling with typescript to make it happy....I'll get there 🤞
No branches or pull requests
Hi,
Is it possible to reset a single param if any others change?
I have a pagination param which I would like to reset to 0 if any other filter params change.
I was thinking of something like
const { query, setQuery } = useFiltering(queryParamDefaults, () => ({ page: 0 }));
Also, I notice the library hasn't been update all that much recently. Is it still being maintained? If not, are there other solutions you'd recommend?
Many thanks for your hard work 👍
The text was updated successfully, but these errors were encountered: