-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
See: https://codesandbox.io/s/charming-feistel-4ih65?file=/src/App.tsx
You have to click submit two times for both errors to appear.
I think the issue is that here
Lines 356 to 364 in 9b8647d
changed = | |
changed || | |
this.setError( | |
key, | |
errors[key] as any, | |
notifyChild, | |
false, // Will call updateParentErrors by itself after all values have been copied, see 3 lines down | |
false // Will call fireAnyListener by itself after all values have been copied, see 3 lines down | |
); |
changed
is true
setError
is not called.
I guess it's like this to avoid setting all errors when one field changes. One option I can think of is for it to behave differently if it's called from validate
.
CodeStix
Metadata
Metadata
Assignees
Labels
No labels