feat: default value option for select input fields (#21192)
Co-authored-by: crazywoola <427733928@qq.com> Co-authored-by: GuanMu <ballmanjq@gmail.com>
This commit is contained in:
@@ -73,7 +73,7 @@ const InputsFormContent = ({ showTip }: Props) => {
|
||||
{form.type === InputVarType.select && (
|
||||
<PortalSelect
|
||||
popupClassName='w-[200px]'
|
||||
value={inputsFormValue?.[form.variable]}
|
||||
value={inputsFormValue?.[form.variable] ?? form.default ?? ''}
|
||||
items={form.options.map((option: string) => ({ value: option, name: option }))}
|
||||
onSelect={item => handleFormChange(form.variable, item.value as string)}
|
||||
placeholder={form.label}
|
||||
|
||||
Reference in New Issue
Block a user