Skip to content

Commit

Permalink
fix: form update state error before form mounted
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan committed Jan 15, 2025
1 parent 816d1f5 commit b71dcf5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/@core/ui-kit/form-ui/src/form-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit b71dcf5

Please sign in to comment.