Skip to content

Commit

Permalink
docs(multiselect): do not select disabled items on "select all" button (
Browse files Browse the repository at this point in the history
  • Loading branch information
ychavoya authored May 15, 2024
1 parent 0d27e71 commit e273434
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,11 @@ export const _Controlled = () => {
/>
<br />
<ButtonSet>
<Button id="all" onClick={() => setSelectedItems(items)}>
<Button
id="all"
onClick={() =>
setSelectedItems(items.filter((item) => !item.disabled))
}>
Select all
</Button>
<Button
Expand Down

0 comments on commit e273434

Please sign in to comment.