Skip to content

Commit

Permalink
Update IconCardGroup.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
0ces committed Nov 30, 2023
1 parent c6dc8e6 commit ff5dc08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/inputs/IconCardGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ export function IconCardGroup<V extends Value>(props: IconCardGroupProps<V>) {
(value: V) => {
if (selected.includes(value)) {
setSelected(selected.filter((v) => v !== value));
onChange(selected.filter((v) => v !== value));
} else {
setSelected([...selected, value]);
onChange([...selected, value]);
}
onChange([...selected, value]);
},
[onChange, selected],
);
Expand Down

0 comments on commit ff5dc08

Please sign in to comment.