diff --git a/apps/portal/src/components/questions/filter/FilterSection.tsx b/apps/portal/src/components/questions/filter/FilterSection.tsx index 4d878887..20324718 100644 --- a/apps/portal/src/components/questions/filter/FilterSection.tsx +++ b/apps/portal/src/components/questions/filter/FilterSection.tsx @@ -1,7 +1,7 @@ import { useMemo } from 'react'; import type { UseFormRegisterReturn } from 'react-hook-form'; import { useForm } from 'react-hook-form'; -import { CheckboxInput, Collapsible, RadioList } from '@tih/ui'; +import { CheckboxInput, CheckboxList, Collapsible, RadioList } from '@tih/ui'; export type FilterChoice = { id: string; @@ -96,7 +96,7 @@ export default function FilterSection({
{!showAll && ( -
+
{renderInput({ field, onOptionChange: async (option: FilterOption) => { @@ -110,8 +110,8 @@ export default function FilterSection({ })}
)} - {isSingleSelect ? ( -
+
+ {isSingleSelect ? ( ({ /> ))} -
- ) : ( -
- {options - .filter((option) => showAll || option.checked) - .map((option) => ( - { - onOptionChange({ - ...option, - checked, - }); - }} - /> - ))} -
- )} + ) : ( + + {options + .filter((option) => showAll || option.checked) + .map((option) => ( + { + onOptionChange({ + ...option, + checked, + }); + }} + /> + ))} + + )} +
diff --git a/apps/storybook/stories/checkbox-list.stories.tsx b/apps/storybook/stories/checkbox-list.stories.tsx index 1bfd9c00..5a4b0bea 100644 --- a/apps/storybook/stories/checkbox-list.stories.tsx +++ b/apps/storybook/stories/checkbox-list.stories.tsx @@ -14,6 +14,9 @@ export default { description: { control: 'text', }, + isLabelHidden: { + control: 'boolean', + }, label: { control: 'text', },