Skip to content

Commit

Permalink
Connect onBlur prop for TextField (#3370)
Browse files Browse the repository at this point in the history
This is needed for propper error message display when validation fails after touch field
  • Loading branch information
rikr2sanchez committed Jul 7, 2023
1 parent fef389d commit b35b9ba
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/with-material-ui/index.js
Expand Up @@ -38,6 +38,7 @@ const WithMaterialUI = () => {
label="Email"
value={formik.values.email}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
error={formik.touched.email && Boolean(formik.errors.email)}
helperText={formik.touched.email && formik.errors.email}
/>
Expand All @@ -49,6 +50,7 @@ const WithMaterialUI = () => {
type="password"
value={formik.values.password}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
error={formik.touched.password && Boolean(formik.errors.password)}
helperText={formik.touched.password && formik.errors.password}
/>
Expand Down

0 comments on commit b35b9ba

Please sign in to comment.