Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numeric Select values are converted to a string #351

Open
schester44 opened this issue Dec 5, 2022 · 0 comments
Open

numeric Select values are converted to a string #351

schester44 opened this issue Dec 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@schester44
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant