-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug]: Multiselect Controlled state is selecting disabled items #16445
Labels
Comments
tay1orjones
added
severity: 3
User can complete task, and/or has a workaround
and removed
status: needs triage 🕵️♀️
labels
May 13, 2024
Hello, if you agree, I am willing to help with a PR to change this example I added. It should be simple, just filter out the disabled options when clicking the select all button: setSelectedItems(items.filter(item => !item.disabled)) |
@ychavoya : Sure, Please go ahead. Thanks for looking into this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Package
@carbon/react
Browser
No response
Package version
v11.57.0
React version
No response
Description
In MultiSelect Controlled state, there is an example of selecting all items by clicking the 'Select all' button. On click to this button, it select all the items of list, including the disabled ones.
I understand that it's just an example to show user that they can pass their custom actions as a prop to select/deselect items, but selecting disabled items is wrong as an example to be present in storybook.
Please check my comment in original PR:
Reproduction/example
#16139 (comment)
Steps to reproduce
Go to Storybook > Multiselect > Controlled
On click to Select all button selects all items including disabled ones.
Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: