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

improve use-filter hook to run only on change (and not on first render anymore) #307

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

lukasvice
Copy link
Contributor

Previously, userFilter called setValue on the first render, which caused problems with resetting the pagination on page load. Now setValue is only called when the value actually changes. In addition, the hook has been refactored to no longer use useDebounce, but to manually debounce setValue.

@lukasvice lukasvice self-assigned this Feb 7, 2024
@lukasvice lukasvice requested a review from alexlanz February 7, 2024 14:54
Copy link

github-actions bot commented Feb 7, 2024

Preview link: https://307.react-ui.aboutbits.dev

@lukasvice lukasvice merged commit 1f7d0d3 into main Feb 7, 2024
5 checks passed
@lukasvice lukasvice deleted the improve-use-filter branch February 7, 2024 15:00
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

Successfully merging this pull request may close these issues.

2 participants