Tanimodori
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
src/components/Form/src/hooks/useFormEvents.ts
|
|
|
@ -230,12 +230,14 @@ export function useFormEvents({ |
|
|
|
} |
|
|
|
|
|
|
|
const obj: Recordable = {}; |
|
|
|
const currentFieldsValue = getFieldsValue(); |
|
|
|
schemas.forEach((item) => { |
|
|
|
if ( |
|
|
|
item.component != 'Divider' && |
|
|
|
Reflect.has(item, 'field') && |
|
|
|
item.field && |
|
|
|
!isNullOrUnDef(item.defaultValue) |
|
|
|
!isNullOrUnDef(item.defaultValue) && |
|
|
|
!(item.field in currentFieldsValue) |
|
|
|
) { |
|
|
|
obj[item.field] = item.defaultValue; |
|
|
|
} |
|
|
|
|