Browse Source

fix: form update state error before form mounted (#5406)

pull/5407/head
Netfan 1 year ago
committed by GitHub
parent
commit
c3129663eb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      packages/@core/ui-kit/form-ui/src/form-api.ts

3
packages/@core/ui-kit/form-ui/src/form-api.ts

@ -404,9 +404,8 @@ export class FormApi {
const deletedSchema = prevSchema.filter(
(item) => !currentFields.has(item.fieldName),
);
for (const schema of deletedSchema) {
this.form?.setFieldValue(schema.fieldName, undefined);
this.form?.setFieldValue?.(schema.fieldName, undefined);
}
}
}

Loading…
Cancel
Save