fix: form update state error before form mounted (#5406)
This commit is contained in:
parent
816d1f5a69
commit
c3129663eb
@ -404,9 +404,8 @@ export class FormApi {
|
|||||||
const deletedSchema = prevSchema.filter(
|
const deletedSchema = prevSchema.filter(
|
||||||
(item) => !currentFields.has(item.fieldName),
|
(item) => !currentFields.has(item.fieldName),
|
||||||
);
|
);
|
||||||
|
|
||||||
for (const schema of deletedSchema) {
|
for (const schema of deletedSchema) {
|
||||||
this.form?.setFieldValue(schema.fieldName, undefined);
|
this.form?.setFieldValue?.(schema.fieldName, undefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user