Open kmurgic opened 2 years ago
For values { x: string [] }, touched is being typed as { x?: boolean }
{ x: string [] }
{ x?: boolean }
For values { x: string [] }, touched should be typed as { x?: boolean[] }
{ x?: boolean[] }
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.
Replace boolean with boolean[] here I ~plan on making~ opened up a one line PR.
boolean
boolean[]
Opened a PR
I think this is intended behavior, touched is describing the field not the contents of the field.
touched
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
withboolean[]
here I ~plan on making~ opened up a one line PR.