our application is currently using the newest version, and found the autoload option is not working now. We want to disable autoload when react-select initialize. We hope the async loadOptions will only be called when user have input some text on the input.
Was there a solution to this?
Looks like this prop changed. From CHANGES.md:
`autoload` changed to `minimumInput` and now controls the minimum input to load options
I tested this solution and it appears to be missing a very important case.
I'd like to be able to async-load the default options without forcing user to type any input - but do that only if the user actually interacts with the widgets, e.g. by clicking the dropdown.
However with minimumInput == 0 the load is triggered immediately (even if user does not interact with select), while with minimumInput > 0 when the user clicks the dropdown - it shows nothing
This silent prop change (still undocumented in the README) caused us some serious headaches :D. Some of our unit tests broke because of it, and we couldn't identify the issue. Eventually figured out what was wrong after production users started reporting the bug (of options not loading in a certain situation). Maybe toss the change from autoload -> minimumInput in the README @JedWatson, not just the CHANGES? Or do you want me to submit a PR for that? I think there are a few issues that have been created related to this in one way or another. I only found it by diffing CHANGES between the versions we were using on a whim.
autoload -> minimumInput is not just a rename
It is a major change in logic per my above comment ...
Did autoload previously fulfill the use case you're talking about in your comment? I know it isn't a rename, but for us, setting minimumInput = 0 duplicated the behaviour we were getting with autoload = true. Either way I was asking for documentation of the change from having autoload to having minimumInput, not just a rename.
It seems like they were swapped back in master in ed8d087d4d5d1c46b0b1f7a11c71eb3949be5dd1
No, minimumInput = 0 does not provide very user-friendly behavior, though I have not actually run autoload = true with older version to compare side-by-side
The issue is that if users click a dropdown there are no options to see until they type at least something. This is extremely counter-intuitive and comes across as either "no data" or "broken app"
Version 1 of react-select is no longer supported.
In the best interest of the community we've decided to spend the time we have available on the latest version.
We apologise for any inconvenience.
Please see:
Most helpful comment
I tested this solution and it appears to be missing a very important case.
I'd like to be able to async-load the default options without forcing user to type any input - but do that only if the user actually interacts with the widgets, e.g. by clicking the dropdown.
However with
minimumInput == 0the load is triggered immediately (even if user does not interact with select), while withminimumInput > 0when the user clicks the dropdown - it shows nothing