jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
34.02k stars 2.79k forks source link

Docs - Fomik React Material-UI example missing onBlur for touched #3183

Open JoshSinghEscreen opened 3 years ago

JoshSinghEscreen commented 3 years ago

Bug report

Current Behavior

On the docs https://formik.org/docs/examples/with-material-ui

the example is missing a very important prop to be passed into the TextField component onBlur={formik.handleBlur}

This is needed to show errors when the user has clicked away from the TextField. Otherwise the errors wont show until you click submit. But in a lot of use cases, you want the submit button to be disabled until the form is valid.

Expected behavior

Add onBlur={formik.handleBlur}

I think this is straight-forward. let me know if you need actual examples to try this. i figure you can just add this prop to the editor at https://formik.org/docs/examples/with-material-ui and try it there.

JayaDeHart commented 3 years ago

Because the editor is a linked codesandbox, what I think needs to happen is for the codesandbox itself to be edited. Do you know what the procedure for that is? Here is the sandbox in question: https://codesandbox.io/embed/github/formik/formik/tree/master/examples/with-material-ui?fontsize=14&hidenavigation=1&theme=dark

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 60 days

JoshSinghEscreen commented 3 years ago

not stale. this should be a simple fix if we know where to do the change