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

Hide MultiListSelect after specific option selecting. #192

Open
almostlow opened this issue Dec 4, 2023 · 1 comment
Open

Hide MultiListSelect after specific option selecting. #192

almostlow opened this issue Dec 4, 2023 · 1 comment

Comments

@almostlow
Copy link

almostlow commented Dec 4, 2023

Hello, there is possibility when i'm using MultiListSelect, don't hide menu, when i selecting specific option?
Goal is to implement "Load more" button in dropdown. Using 2.9.3 version

@ali-ahnaf
Copy link

ali-ahnaf commented Feb 29, 2024

Need to do something similar as well. Would be nice to programmatically close the dropdown menu OR disable showing the dropdown menu when an item has been discarded from the MultiSelect component.

Why is it needed? In cases where we need to trigger a fetch request based on the selected items and it takes quite a while to fetch the items, the user might select several items (while the fetch is still in progress) which has the potential to create race conditions. This can cause the old data to be shown instead of the new.

@moreta hi, if you think this is a relevant addition, I could perhaps create a PR for this, Maybe adding a boolean prop to stop showing the dropdown after an unselect event.

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