diff --git a/src/inputs/IconCardGroup.tsx b/src/inputs/IconCardGroup.tsx index 89e1ad6d8..7bc16aac0 100644 --- a/src/inputs/IconCardGroup.tsx +++ b/src/inputs/IconCardGroup.tsx @@ -53,10 +53,11 @@ export function IconCardGroup(props: IconCardGroupProps) { (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], );