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:
parent
fce126b206
commit
15757110cf
24 changed files with 113 additions and 11 deletions
|
|
@ -158,7 +158,7 @@ const FormItem: FC<Props> = ({
|
|||
type === InputVarType.select && (
|
||||
<Select
|
||||
className="w-full"
|
||||
defaultValue={value || ''}
|
||||
defaultValue={value || payload.default || ''}
|
||||
items={payload.options?.map(option => ({ name: option, value: option })) || []}
|
||||
onSelect={i => onChange(i.value)}
|
||||
allowSearch={false}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue