-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Summary 💡
Not all use cases may wish to have the Formik onBlur function called to touch fields when blurring. Ideally there would be a way to disable this behaviour (see motiviation section). I do not know whether it would be possible for users to disable this globally, or whether it might just need to respect the Formik validateOnBlur maybe, or another option all together?
Obviously this can be disabled "manually" by passing a custom no-op onBlur function; however, this would require passing a no-op to every textfield (or general MUI form component) or wrapping in a custom component (not awful, but not ideal).
Motivation 🔦
While common, calling the blur function automatically results in fields being "touched" on blur, while some people may wish to only have them touched on submit. For example, it may be desired to not see errors until after the initial submit, which is not possible currently (as fields are touched on blur).