diff --git a/src/components/forms/CheckBoxWithLabelForm.tsx b/src/components/forms/CheckBoxWithLabelForm.tsx index 815daa8..6d155d6 100644 --- a/src/components/forms/CheckBoxWithLabelForm.tsx +++ b/src/components/forms/CheckBoxWithLabelForm.tsx @@ -37,16 +37,15 @@ export const CheckBoxWithLabelForm = ({ ...formState, [questionText]: [ ...formState[questionText], - { value: true }, + { value: option.value }, ], }); } else { setFormState({ ...formState, - [questionText]: [ - ...formState[questionText], - { value: false }, - ], + [questionText]: formState[questionText].filter( + (state) => state.value !== option.value, + ), }); } }}