-
-
Notifications
You must be signed in to change notification settings - Fork 490
Closed
Labels
Description
Discussed in #1159
Originally posted by wilson12365 February 19, 2025
right now the only way to handle reset a field based on other actions of the form is the following
listeners={{
onChange: ({value}) => {
const defaultMeta = {
isValidating: false,
isTouched: false,
isBlurred: false,
isDirty: false,
errorMap: {}
}
if (value === ‘personal’) {
setFieldValue(‘businessName’, ‘’)
setFieldValue(‘businessLabel’, ‘’)
setFieldMeta(’businessName’, defaultMeta)
setFieldMeta(’businessLabel’, defaultMeta)
}
}}
@crutchcorn has suggested to add resetField('fieldName')
OriginalEXE, MinyoungRsup2, blipk, flyingonionman, Gruak and 3 more