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

Fix debounce #4349

Merged
merged 8 commits into from
Jul 16, 2024
Merged

Fix debounce #4349

merged 8 commits into from
Jul 16, 2024

Conversation

RobertJoonas
Copy link
Contributor

Changes

A new, cleaner version of #4331 with the review comments addressed.

Tests

  • This PR does not require tests

Changelog

  • This PR does not make a user-facing change

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

Copy link

Preview environment👷🏼‍♀️🏗️
PR-4349

@RobertJoonas RobertJoonas mentioned this pull request Jul 12, 2024
4 tasks
@RobertJoonas RobertJoonas requested review from apata and ukutaht and removed request for ukutaht and apata July 12, 2024 12:53
@RobertJoonas RobertJoonas marked this pull request as draft July 15, 2024 06:28
@RobertJoonas RobertJoonas force-pushed the fix-debounce branch 3 times, most recently from dc1732b to 79b14e3 Compare July 15, 2024 11:17
This commit refactors the debouncing mechanism in a more extendable way.
Using debounce as a hook that returns a callback (rather than an effect)
makes it reusable for Combobox. This way the useDebounce hook does not
need to worry about whether the function should be called on the first
render or not.

This commit also gets rid of redundant doubled search state.
@RobertJoonas RobertJoonas marked this pull request as ready for review July 16, 2024 07:13
@RobertJoonas RobertJoonas requested a review from apata July 16, 2024 07:15
Copy link
Contributor

@apata apata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@RobertJoonas RobertJoonas merged commit 5a58b5c into master Jul 16, 2024
10 checks passed
@RobertJoonas RobertJoonas deleted the fix-debounce branch July 16, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants