Skip to content
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

Closed
cadrimiranda opened this issue Jul 8, 2019 · 1 comment
Closed

Comments

@cadrimiranda
Copy link

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.

@bladey
Copy link
Contributor

bladey commented May 28, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues.

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 react-select please consider upgrading to see if it resolves any issues you're having.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants