diff --git a/web/app/components/base/form/components/field/options.tsx b/web/app/components/base/form/components/field/options.tsx index f265300ea2..9ba9c4d398 100644 --- a/web/app/components/base/form/components/field/options.tsx +++ b/web/app/components/base/form/components/field/options.tsx @@ -2,6 +2,7 @@ import cn from '@/utils/classnames' import { useFieldContext } from '../..' import type { LabelProps } from '../label' import Label from '../label' +import type { Options } from '@/app/components/app/configuration/config-var/config-select' import ConfigSelect from '@/app/components/app/configuration/config-var/config-select' type OptionsFieldProps = { @@ -15,7 +16,7 @@ const OptionsField = ({ className, labelOptions, }: OptionsFieldProps) => { - const field = useFieldContext() + const field = useFieldContext() return (
diff --git a/web/app/components/base/form/form-scenarios/input-field/utils.ts b/web/app/components/base/form/form-scenarios/input-field/utils.ts index d7a31893b3..2b5e988f5a 100644 --- a/web/app/components/base/form/form-scenarios/input-field/utils.ts +++ b/web/app/components/base/form/form-scenarios/input-field/utils.ts @@ -21,6 +21,12 @@ export const generateZodSchema = (fields: InputFieldConfiguration[]) => { case InputFieldType.checkbox: zodType = z.boolean() break + case InputFieldType.options: + zodType = z.array(z.string()) + break + case InputFieldType.select: + zodType = z.string() + break case InputFieldType.fileTypes: zodType = z.array(z.string()) break