Skip to content

Commit

Permalink
fix: #728 完善Form ref的ts声明 (#729)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyuefeng committed Mar 30, 2022
1 parent affe5ba commit 46f7ec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-form/src/Form.tsx
Expand Up @@ -59,7 +59,7 @@ export type FormElementProps = {
onChange?: (env: React.BaseSyntheticEvent<HTMLInputElement>, list?: string[]) => void;
};

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

function newFormState<T>(
fields: FormProps<T>['fields'],
Expand Down

0 comments on commit 46f7ec2

Please sign in to comment.