-
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
Get more options from API without the select loses focus and close menu #3673
Comments
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'm using the react-select to show my dropdowns items. My options come from a API, but API doesn't return all list just some part of her. When i click in the option that have the label like
Show more options
i call the api again to get a bit more from the list, like a lazy loading. But when i click in the option to call a API the dropdown menu goes to close, because the select options is refresh with more itens.The official documentation give two ways to control the menu. The first is with the props closeMenuOnSelect that allows the menu doesn't close when select, but dont work. The second way i found is controll the open and close menu with the controlled props but the select dont offer some prop to
onClick
to show or hide menu. I tried to wrap the select with a div with onClick to control the open or close menu, but when i select one option the bubble event call the wrapper click and close the menu and the o onChange dont pass the event to stopPropagation.I expect the menu dont close when the options data is changed.
The text was updated successfully, but these errors were encountered: