diff --git a/apps/client/src/widgets/type_widgets/options/advanced.tsx b/apps/client/src/widgets/type_widgets/options/advanced.tsx index 739bb3227..958180063 100644 --- a/apps/client/src/widgets/type_widgets/options/advanced.tsx +++ b/apps/client/src/widgets/type_widgets/options/advanced.tsx @@ -189,6 +189,7 @@ function ExperimentalOptions() { values={experimentalFeatures} keyProperty="id" titleProperty="name" + descriptionProperty="description" currentValue={enabledExperimentalFeatures} onChange={setEnabledExperimentalFeatures} /> diff --git a/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx b/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx index a2f48a04f..baa37baf5 100644 --- a/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx +++ b/apps/client/src/widgets/type_widgets/options/components/CheckboxList.tsx @@ -1,14 +1,17 @@ +import FormCheckbox from "../../../react/FormCheckbox"; + interface CheckboxListProps { values: T[]; keyProperty: keyof T; titleProperty?: keyof T; disabledProperty?: keyof T; + descriptionProperty?: keyof T; currentValue: string[]; onChange: (newValues: string[]) => void; columnWidth?: string; } -export default function CheckboxList({ values, keyProperty, titleProperty, disabledProperty, currentValue, onChange, columnWidth }: CheckboxListProps) { +export default function CheckboxList({ values, keyProperty, titleProperty, disabledProperty, descriptionProperty, currentValue, onChange, columnWidth }: CheckboxListProps) { function toggleValue(value: string) { if (currentValue.includes(value)) { // Already there, needs removing. @@ -22,20 +25,17 @@ export default function CheckboxList({ values, keyProperty, titleProperty, di return (
    {values.map(value => ( -
  • - +
  • + toggleValue(String(value[keyProperty]))} + />
  • ))}
- ) -} \ No newline at end of file + ); +}