Hello,
I noticed that AsyncSelect behaviour is weird when I use a lodash debounce function together with defaultOptions={true}. When I use keyboard to focus the Select component, I can start typing and both loading state in the menu and options appear as intended. However, when I click the Select component, I can see a Loading state in the Menu for a moment which I think isn't supposed to be visible and then it disappears. Looks like there is some difference in handling this between onClick and onFocus events.
Here is a Sandbox where you can check this bug.
How to reproduce?
- On first render click on AsyncSelect with an empty input
- Menu with Loading state appears which is not an intended behaviour. If the Menu with Loading doesn't appear, try reloading the page and it will be there.
- After that component works as intended. Loading state doesn't appear on next clicks with an empty input.
Can be compared to the keyboard behaviour:
- On first render
Tab to AsyncSelect
- Menu with Loading state doesn't appear
- Component works as intended
Are you reporting a bug or runtime error?
Bug
Hello,
I noticed that AsyncSelect behaviour is weird when I use a lodash
debouncefunction together withdefaultOptions={true}. When I use keyboard to focus the Select component, I can start typing and both loading state in the menu and options appear as intended. However, when I click the Select component, I can see a Loading state in the Menu for a moment which I think isn't supposed to be visible and then it disappears. Looks like there is some difference in handling this between onClick and onFocus events.Here is a Sandbox where you can check this bug.
How to reproduce?
Can be compared to the keyboard behaviour:
Tabto AsyncSelectAre you reporting a bug or runtime error?
Bug