Skip to content

Commit 46f7ec2

Browse files
authoredMar 30, 2022
fix: #728 完善Form ref的ts声明 (#729)
1 parent affe5ba commit 46f7ec2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/react-form/src/Form.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export type FormElementProps = {
5959
onChange?: (env: React.BaseSyntheticEvent<HTMLInputElement>, list?: string[]) => void;
6060
};
6161

62-
export type FormRefType = Record<'onSubmit' | 'resetForm' | 'getFieldValues' | 'setFields', Function>;
62+
export type FormRefType = Record<'onSubmit' | 'resetForm' | 'getFieldValues' | 'setFields' | 'getError' | 'setFieldValue', Function>;
6363

6464
function newFormState<T>(
6565
fields: FormProps<T>['fields'],

0 commit comments

Comments
 (0)
Please sign in to comment.