Field submit error is removed on field blur without a change #1242
Send to my agentLeCarbonator(GitHub profile, opens in a new tab) added labelsv1
LeCarbonator(GitHub profile, opens in a new tab) added labelsv2: needs investigation
LeCarbonator(GitHub profile, opens in a new tab) removed labelsv2: needs investigation
LeCarbonator(GitHub profile, opens in a new tab) added labelsquestion
LeCarbonator(GitHub profile, opens in a new tab) added labelsv2
LeCarbonator(GitHub profile, opens in a new tab) added labelsarea: runtime
LeCarbonator(GitHub profile, opens in a new tab) added labelsscope: core
chatman-media(GitHub profile, opens in a new tab) linked this to #2211
Sign in to join this conversation.
From what I find, the onChange validator will rightly handle the blurring by maintaining errors in the state.meta.errors. onSubmit however, is causing the blur event to clear the errors.
I might be wrong but I think this is where the problem is in
FieldApi.ts:Since blur's cause is not submit, but rather "change" in the case where we blur out of a field after submitting, it won't remap the hasErrored or the errorMap. I don't know if this is by design so I will let a maintainer comment on this.