Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper method's field type update #3686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/formik/src/types.tsx
Expand Up @@ -92,12 +92,16 @@ export interface FormikHelpers<Values> {
shouldValidate?: boolean
) => void;
/** Set value of form field directly */
setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
setFieldValue: (
field: keyof Values,
value: any,
shouldValidate?: boolean
) => void;
/** Set error message of a form field directly */
setFieldError: (field: string, message: string | undefined) => void;
setFieldError: (field: keyof Values, message: string | undefined) => void;
/** Set whether field has been touched directly */
setFieldTouched: (
field: string,
field: keyof Values,
isTouched?: boolean,
shouldValidate?: boolean
) => void;
Expand Down