fix: correct the default value for the select field in the pre-launch form

pull/21192/head
antonko 11 months ago
parent 3b92b42284
commit 073ed54bb0

@ -158,7 +158,7 @@ const FormItem: FC<Props> = ({
type === InputVarType.select && ( type === InputVarType.select && (
<Select <Select
className="w-full" className="w-full"
defaultValue={value || ''} defaultValue={value || payload.default || ''}
items={payload.options?.map(option => ({ name: option, value: option })) || []} items={payload.options?.map(option => ({ name: option, value: option })) || []}
onSelect={i => onChange(i.value)} onSelect={i => onChange(i.value)}
allowSearch={false} allowSearch={false}

Loading…
Cancel
Save