Closed duongvanha closed 6 years ago
oh, some minutes ago I faced that bug too
we can use the sync & async validation example to reproduce the bug
https://codesandbox.io/s/qq8xq7j2w
try to put some a char in password field and immediately delete the char, then click outside the field
expected behavior: the field has marked as touched
current behavior: the field remains untouched
yep =)). I hope he knows different between angular and react. Because many functions missing it
@duongvanha Thanks for reporting the issue, I'll look in to it.
Actually markAsTouched
doesn't call the stateChanges
when call explicitly.
@saculbr That example uses the old one reactiveForm
api which is no longer recommended, with Field
components it works perfectly.
You can try it with that example https://codesandbox.io/s/4rxokpr270.
markAsTouched should trigger stateChanges to rerender field