Replies: 1 comment
-
Indeed, having built-in support for debouncing in AsyncSelect would be a very useful feature! Many applications would benefit from this approach, especially to reduce unnecessary requests to the server and improve the user experience. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I think it would be great to add built-in debouncing for the async select. I would imagine it to be a prop that would accept a number of milliseconds for the debounce. The function loadOptions would then be called only after the set time has elapsed from the last user input.
I know it is possible to implement debouncing using, for example, the
debounce-promise
orlodash
libraries as described here #3075, but to me this seems a bit too complex for something that many people would probably benefit from using to limit unnecessary requests to the server. I have tried to implement it myself using useDebounce hook, but I didn't manage to do it (probably because I'm a react beginner)Thank you for considering this request, and thanks again for your hard work on react-select!
Beta Was this translation helpful? Give feedback.
All reactions