New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(forms): ensure to emit statusChanges
on subsequent value update…
#38354
fix(forms): ensure to emit statusChanges
on subsequent value update…
#38354
Conversation
0fdc615
to
8544dd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding tests @sonukapoor 👍
I've left a few comments (most of them are applicable to many tests), please have a look when you get a chance. Once the feedback is addressed, I will have another look.
Thank you.
@AndrewKushnir All changes are done. The PR is ready for the second review. |
5997d3b
to
a300076
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sonukapoor, thanks for additional changes. I've left a few more comments, please have a look when you get a chance. Thank you.
@AndrewKushnir It's ready for another review. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating tests @sonukapoor, great work 👍
I've a few more comments, they are mostly around comments/test descriptions, so I think we should move this PR to the "Ready for Review" state and perform a final round of review.
Thank you.
85f007d
to
3a84683
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating descriptions in tests, this is super helpful 👍
I've just left a comment on the last test, everything else looks great!
Since this is a change in behavior, could you please include a draft of the breaking changes note into the commit description (we can review and update it)?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Sonu 👍
a245226
to
ba5f4dc
Compare
…/validations This commit ensures that the `updateValueAndValidity` method takes the `asyncValidator` into consideration to emit on the `statusChanges` observables. This is necessary so that any subsequent changes are emitted properly to any subscribers. Closes angular#20424 Closes angular#14542 BREAKING CHANGE: Previously if FormControl, FormGroup and FormArray class instances had async validators defined at initialization time, the status change event was not emitted once async validator completed. After this change the status event is emitted into the `statusChanges` observable. If your code relies on the old behavior, you can filter/ignore this additional status change event.
ba5f4dc
to
9d59b7d
Compare
Note to Caretaker: the global presubmit went well (only pre-existing failures), however since it's technically a breaking change, it might make sense to merge it and sync as a separate change (in case a rollback is needed). Thank you. |
…/validations (angular#38354) This commit ensures that the `updateValueAndValidity` method takes the `asyncValidator` into consideration to emit on the `statusChanges` observables. This is necessary so that any subsequent changes are emitted properly to any subscribers. Closes angular#20424 Closes angular#14542 BREAKING CHANGE: Previously if FormControl, FormGroup and FormArray class instances had async validators defined at initialization time, the status change event was not emitted once async validator completed. After this change the status event is emitted into the `statusChanges` observable. If your code relies on the old behavior, you can filter/ignore this additional status change event. PR Close angular#38354
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
… / validations
This commit ensures that the
updateValueAndValidity
method takes theasyncValidator
into consideration to emit on thestatusChanges
observables.This is necessary so that any subsequent changes are emitted properly to any
subscribers.
BREAKING CHANGE:
Previously if FormControl, FormGroup and FormArray class instances had async validators
defined at initialization time, the status change event was not emitted once async validator
completed. After this change, the status event is emitted into the
statusChanges
observable.If your code relies on the old behaviour, you can filter/ignore this additional status change
event.
Closes #20424
Closes #14542
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information