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): changes to status not always being emitted to statusChanges observable for async validators. #42553
Conversation
Just as an additional context: the original changes were added in PR #38354 (we can look at that PR to see which tests we should add in this PR). |
For reference, here's a TGP run: https://test.corp.google.com/ui#id=OCL:378802147:BASE:378802259:1623386981464:3da3dae8 While there is breakage, it's a very limited amount which can probably be fixed by hand. |
TGP was green (surprisingly) after rerunning flakes. Also updated the issue number in the original PR, which was incorrect. |
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 the fix @dylhunn 👍
The changes look good, I've just added a few minor comments related to tests.
@dylhunn FYI I've also added the |
…es observable for async validators. When a FormControl, FormArray, or FormGroup is first constructed, if an async validator is attached, the `statusChanges` observable should receive a message when the validator complete (i.e. pending -> valid/invalid). If the validator was provided as part of the constructor options, it was not fired at construction time, which is fixed in this PR. Fixes angular#35309.
…es observable for async validators. (#42553) When a FormControl, FormArray, or FormGroup is first constructed, if an async validator is attached, the `statusChanges` observable should receive a message when the validator complete (i.e. pending -> valid/invalid). If the validator was provided as part of the constructor options, it was not fired at construction time, which is fixed in this PR. Fixes #35309. PR Close #42553
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. |
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?
When a FormControl, FormArray, or FormGroup is first constructed, if an async validator is attached, the
statusChanges
observable should receive a message when the validator complete (i.e. pending -> valid/invalid).Issue Number: 42553
What is the new behavior?
If the validator was provided as part of the constructor options, it was previously not fired at construction time. That is fixed in this PR.
Does this PR introduce a breaking change?
Other information
Fixes #42553