Skip to content

Commit

Permalink
fix: fix multiselect docs examples (#2347)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgutsol committed Dec 5, 2022
1 parent 29d830a commit e12d43b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default function MultiselectBasicUsageExample() {
if (checked) {
setSelectedSpaces((prevState) => [...prevState, value]);
} else {
const newSelectedSpaces = spaces.filter((space) => space !== value);
const newSelectedSpaces = selectedSpaces.filter(
(space) => space !== value,
);
setSelectedSpaces(newSelectedSpaces);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function MultiselectSearchExample() {
if (checked) {
setSelectedItems((prevState) => [...prevState, value]);
} else {
const newSelectedFruits = spaces.filter((fruit) => fruit !== value);
const newSelectedFruits = selectedItems.filter(
(fruit) => fruit !== value,
);
setSelectedItems(newSelectedFruits);
}
};
Expand Down

1 comment on commit e12d43b

@vercel
Copy link

@vercel vercel bot commented on e12d43b Dec 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.