fix(client): fix undefined field method on button (#2795)

This commit is contained in:
Junyi 2023-10-10 23:20:47 +08:00 committed by GitHub
parent 59f74326b4
commit 488aac2e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -763,8 +763,8 @@ export const useCurrentSchema = (action: string, key: string, find = findSchema,
remove() { remove() {
removeActiveFieldName?.(schema.name); removeActiveFieldName?.(schema.name);
form?.query(schema.name).forEach((field: Field) => { form?.query(schema.name).forEach((field: Field) => {
field.setInitialValue(null); field.setInitialValue?.(null);
field.reset(); field.reset?.();
}); });
schema && rm(schema, remove); schema && rm(schema, remove);
}, },