Skip to content

Commit ce305f5

Browse files
authored
Merge pull request #3871 from SophanySC/fix/ISSUE-3846-setValue-docs
fix-docs: return type of setValue in docs did not match the function typing
2 parents fe4ed7e + 405578c commit ce305f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/api/formik.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ Set `touched` imperatively. Calling this will trigger validation to run if `vali
216216

217217
If `validateOnBlur` is set to `true` and there are errors, they will be resolved in the returned `Promise`.
218218

219-
#### `setValues: (fields: React.SetStateAction<{ [field: string]: any }>, shouldValidate?: boolean) => void`
219+
#### `setValues: (fields: React.SetStateAction<{ [field: string]: any }>, shouldValidate?: boolean) => Promise<void | FormikErrors<Values>>`
220220

221221
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`.
222222

0 commit comments

Comments
 (0)