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

Customizable useSelect input debounce wait #1533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tpict
Copy link

@tpict tpict commented Aug 30, 2023

What: The hard-coded 500ms wait until useSelect's input is cleared is being changed to a customizable prop.

Why: So this behavior can be customized or opted out of.

How: Replaced the hard-coded number with a prop. If the customized value is below zero, the value won't be cleared at all.

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

Let me know what you think, and I can write docs etc if needed 🙂

@silviuaavram
Copy link
Collaborator

Hi @tpict !

I can understand the need for having a custom value option instead of the hardcoded 500ms, but I don't understand the need to never clear the search query. Once you start typing stuff, but mistyped something, or just want to start typing for something else, you will never be able to do it, consequently you will get stuck and unable to use the character keys to search for anything, unless you remount the component.

Can you describe the use case better, please? Thanks!

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