formik
formik copied to clipboard
FormikTouched is typed incorrectly for primitive array values
Bug report
Current Behavior
For values { x: string [] }, touched is being typed as { x?: boolean }
Expected behavior
For values { x: string [] }, touched should be typed as { x?: boolean[] }
Reproducible example
https://codesandbox.io/s/infallible-shape-nhd9i?file=/index.tsx:537-685 Edit the names of one of the friends. Note that in the console touched.friends is an array of booleans.
Suggested solution(s)
Replace boolean with boolean[] here
I ~plan on making~ opened up a one line PR.
Opened a PR
I think this is intended behavior, touched is describing the field not the contents of the field.