Skip to content

Commit

Permalink
fix type of setFieldValue (#3808)
Browse files Browse the repository at this point in the history
* fix(types): setFieldValue

* chore(changesets): minor version
  • Loading branch information
NagaiKoki authored May 31, 2023
1 parent 4fcf01c commit 2b194c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-zoos-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'formik': patch
---

fix type of setFieldValue function
4 changes: 2 additions & 2 deletions packages/formik/src/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ export interface FormikHelpers<Values> {
shouldValidate?: boolean
) => void;
/** Set value of form field directly */
setFieldValue(
setFieldValue: (
field: string,
value: any,
shouldValidate?: boolean
): Promise<void | FormikErrors<Values>>;
) => Promise<void | FormikErrors<Values>>;
/** Set error message of a form field directly */
setFieldError: (field: string, message: string | undefined) => void;
/** Set whether field has been touched directly */
Expand Down

1 comment on commit 2b194c2

@vercel
Copy link

@vercel vercel bot commented on 2b194c2 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

formik-docs – ./website

formik-docs-formik.vercel.app
www.formik.org
formik-docs-git-main-formik.vercel.app
formik-docs.vercel.app
formik.org

Please sign in to comment.