diff --git a/packages/web/src/components/InputCreator/index.tsx b/packages/web/src/components/InputCreator/index.tsx index d2a1456e..5c19f53a 100644 --- a/packages/web/src/components/InputCreator/index.tsx +++ b/packages/web/src/components/InputCreator/index.tsx @@ -22,7 +22,6 @@ type RawOption = { }; const optionGenerator = (options: RawOption[]): IFieldDropdownOption[] => options?.map(({ name, value }) => ({ label: name as string, value: value })); -const getOption = (options: IFieldDropdownOption[], value?: string | boolean) => options?.find(option => option.value === value); export default function InputCreator(props: InputCreatorProps): React.ReactElement { const { @@ -62,7 +61,7 @@ export default function InputCreator(props: InputCreatorProps): React.ReactEleme disableClearable={required} options={preparedOptions} renderInput={(params) => } - value={getOption(preparedOptions, value)} + defaultValue={value as string} onChange={console.log} description={description} loading={loading}