react-select
react-select copied to clipboard
Async select: inputChange bug
https://react-select.com/async bug on this page and in my project
- Write "o"
- Wait for an answer
- Add "c" and quickly erase "c"
As a result, the list of options will contain the result from entering "oc", but not "o". Works only on fresh load
Video https://youtu.be/jncTy-yxers
Need more information?
Hi @dinfyru I looked into this problem, it's because the setTimeout code set in the example docs
it's in docs/examples/AsyncCallbacks.tsx
lines 20-22
If you don't use setTimeout in your app, then it should be fine

Hi @idiglove . I need setTimeout
Any news?
Hey @dinfyru If you want the setTimeout, you can execute the function loadOption, making closure with the value of 'inputValue'. So when timeout ends, and function is ready to execute we have value, that user typed. It will execute a function on each 1 second with the input value.
I was working on a fix to this issue, but had to close it due to an strange issue with the workflow pipeline. If no one is working on it, I can rebase my branch and reopen my PR