formik-mui icon indicating copy to clipboard operation
formik-mui copied to clipboard

numeric Select values are converted to a string

Open schester44 opened this issue 3 years ago • 0 comments

Numeric values that are passed to <MenuItem are converted to a string in Formik.

Reproduction: https://codesandbox.io/s/nostalgic-artem-iw3hh0?file=/src/index.tsx

<Field name="age" component={Select}>
 <MenuItem value={10}>Age 10</MenuItem>
</Field>

In the above example, I would expect formik's age value to be typeof number but it is typeof string when selecting the menu item.

schester44 avatar Dec 05 '22 18:12 schester44