-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncCreatable not adding to options list #2021
Comments
Switched to just using Creatable, which initially produced an error relating to the mutation of the Options array issue (see #1477). The setup and pattern to get Creatable working without error is:
onChange deals with the selection of options that already exist in the list:
onNewOptionClick deals with adding new options to the list:
Its seems now that AsyncCreatable is probably not writing new options because the loadOptions prop was talking to a local method which returns a promise, which AsyncCreatable cannot write to. At the very least, this highlights the need to update the documentation. Perhaps this would have been more appropriate to post on SO, but that would fail to highlight what seems to be a bug (or documentation issue) around AsyncCreatable. |
Is there any plan on fixing this issue? |
The same issue, if I use |
@minhquankq I ended up forking the repo and fixing it on my own: |
i know its very late, |
Hello - In an effort to sustain the We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our efforts towards the current major version. If you aren't using the latest version of However, if you feel this issue is still relevant and you'd like us to review it - please leave a comment and we'll do our best to get back to you! |
I am having the similar issue. |
Thank you for maintaining this very useful component, I have used it with great success until I have tried to implement the AsyncCreatable component. The documentation would benefit from clear code examples.
My code:
handleEventSearch is working fine, a list of events is loaded and appears in the dropdown
handleChangeEvents returns the following object when a new option is selected:
newOptionCreator returns returns the object:
I have checked the options array in the Select component, no new options are added.
The text was updated successfully, but these errors were encountered: