diff --git a/src/components/forms/FormMultiselect.tsx b/src/components/forms/FormMultiselect.tsx index 5dfd283..7568839 100644 --- a/src/components/forms/FormMultiselect.tsx +++ b/src/components/forms/FormMultiselect.tsx @@ -26,7 +26,7 @@ export interface FormMultiselectProps extends MultiselectProps { } -export function FormMultiselect({label, validity, pairProps, labelProps, onSimpleChange, options, ...props}: FormMultiselectProps): JSX.Element { +export function FormMultiselect({label, validity, pairProps, labelProps, onSimpleChange, options, value, ...props}: FormMultiselectProps): JSX.Element { const onSimpleChangeWrapped = React.useCallback( values => { onSimpleChange?.(values.map((val: string) => options[val])) @@ -35,7 +35,7 @@ export function FormMultiselect({label, validity, pairProps, labelProps, onSimpl ) const optionComponents = React.useMemo( - () => Object.keys(options).map(key => ), + () => Object.keys(options).map(key => ), [options], ) diff --git a/src/components/forms/FormSelect.tsx b/src/components/forms/FormSelect.tsx index 3da509e..0e32b96 100644 --- a/src/components/forms/FormSelect.tsx +++ b/src/components/forms/FormSelect.tsx @@ -26,7 +26,7 @@ export interface FormSelectProps extends SelectProps { } -export function FormSelect({label, validity, options, pairProps, labelProps, onSimpleChange, ...props}: FormSelectProps): JSX.Element { +export function FormSelect({label, validity, options, pairProps, labelProps, onSimpleChange, value, ...props}: FormSelectProps): JSX.Element { const onSimpleChangeWrapped = React.useCallback( value => { onSimpleChange?.(options[value]) @@ -35,7 +35,7 @@ export function FormSelect({label, validity, options, pairProps, labelProps, onS ) const optionComponents = React.useMemo( - () => Object.keys(options).map(key => ), + () => Object.keys(options).map(key => ), [options], )