From 305f3197703c8f873072890a6efcb6df5316d6f2 Mon Sep 17 00:00:00 2001 From: Davide Francescon Date: Mon, 21 Aug 2023 11:16:44 +0200 Subject: [PATCH] fix: return type of setValue in docs did not match the function typing --- docs/api/formik.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/formik.md b/docs/api/formik.md index 4da6b9ea2..09c0c159b 100644 --- a/docs/api/formik.md +++ b/docs/api/formik.md @@ -216,7 +216,7 @@ Set `touched` imperatively. Calling this will trigger validation to run if `vali If `validateOnBlur` is set to `true` and there are errors, they will be resolved in the returned `Promise`. -#### `setValues: (fields: React.SetStateAction<{ [field: string]: any }>, shouldValidate?: boolean) => void` +#### `setValues: (fields: React.SetStateAction<{ [field: string]: any }>, shouldValidate?: boolean) => Promise>` Set `values` imperatively. Calling this will trigger validation to run if `validateOnChange` is set to `true` (which it is by default). You can also explicitly prevent/skip validation by passing a second argument as `false`.