Skip to content

Commit b35b9ba

Browse files
authored
Connect onBlur prop for TextField (#3370)
This is needed for propper error message display when validation fails after touch field
1 parent fef389d commit b35b9ba

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/with-material-ui/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const WithMaterialUI = () => {
3838
label="Email"
3939
value={formik.values.email}
4040
onChange={formik.handleChange}
41+
onBlur={formik.handleBlur}
4142
error={formik.touched.email && Boolean(formik.errors.email)}
4243
helperText={formik.touched.email && formik.errors.email}
4344
/>
@@ -49,6 +50,7 @@ const WithMaterialUI = () => {
4950
type="password"
5051
value={formik.values.password}
5152
onChange={formik.handleChange}
53+
onBlur={formik.handleBlur}
5254
error={formik.touched.password && Boolean(formik.errors.password)}
5355
helperText={formik.touched.password && formik.errors.password}
5456
/>

0 commit comments

Comments
 (0)