[v2] Loading indicator disappears once the menu is opened
See original GitHub issueIf we open the menu
while Async component is loading the options, loadingIndicator
disappears even though loadOptions
is not yet completed. noOptionsMessage
displayed until the options are loaded but no more loadingIndicator
(Even if you open/close the menu
, it’s same). There is no indication if the options are still loading.
Although it’s a simple scenario, I couldn’t find a similar bug report. Simple test case forked from the web site: https://codesandbox.io/s/14919k7q4
Would there be an alternative way to fix this problem?
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Bootstrap dropdown menu disappears after clicking toggler-icon
When I click on the menu, all of my appear, but they disappear very quickly after that. I also have to click the...
Read more >Fix a Spinning Wheel Loading Indicator on iPhone or iPad ...
It looks like a spinning wheel made up of little dashes, and when it has gone haywire it will rotate endlessly, never going...
Read more >How to manually show and hide loading or spinning image?
Instead of default datasource config/method to load remote data, I am using a custom function to load data and I like to manually...
Read more >How to show Page Loading div until the page has finished ...
Once the page has completely loaded we set loader's display to none and ... Step 2: Open the .html file you saved then...
Read more >Apps running in background get closed/refreshed
... bar and when i reopen it from the recents menu, it opens like i am opening ... the icon disappears, i lose...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Atralbus So the problem is here: https://github.com/JedWatson/react-select/blob/master/src/Async.js#L108
It looks like when you click away from the dropdown, it triggers an
onInputChange
and sinceinputValue
is""
, it sets theisLoading
state tofalse
.I think this is definitely a bug, @jossmac, can you please confirm this?
@matthova I think the best option is to handle loading indicator manually with
isLoading
prop. And I’m usingSelect
component instead ofAsync
since theloadOptions
is causing different problems. I reload options when it’s necessary.Sample code with RxJS to show how I handle
loading
in the state;