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

Prevent duplicate selections in multiple mode #68

Open
DavidStirling opened this issue Jul 17, 2024 · 2 comments
Open

Prevent duplicate selections in multiple mode #68

DavidStirling opened this issue Jul 17, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@DavidStirling
Copy link

In the "multiple" examples it's currently possible to select the same option repeatedly. Ideally there'd be a simple way to drop selected items from the options list. Apologies if this already exists and I've just missed it!

options
@martinpengellyphillips
Copy link
Contributor

The kitchen sink has an example of disabling picked options (you could also filter them out from the available options if you prefer).

  const disable = (value) => selectedValues().includes(value);

Let me know if that helps!

@DavidStirling
Copy link
Author

That'll work for my case, much appreciated!

For ease of use I'd still suggest that this behaviour be a setting if possible.

@martinpengellyphillips martinpengellyphillips added enhancement New feature or request documentation Improvements or additions to documentation labels Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants