Skip to content

Form statusChanges with async validators doesn't leave PENDING state #41519

@saramcicchi

Description

@saramcicchi

🐞 bug report

Affected Package

The issue is caused by package @angular/forms

Is this a regression?

No this has been around since early 2017 but version 11 claims to have fixed this, and yet the bug is still present.

Description

FormGroup and FormControl do not emit first statusChanges when async validators are present, leaving the form in the PENDING state. Issues #14542 and #20424 reported this problem and were closed by #38354, which is available in Angular 11. However, running both of the stackblitz examples from these issues in Angular 11 demonstrates the original problem still exists.

🔬 Minimal Reproduction

https://stackblitz.com/edit/angular-async-status-change

🌍 Your Environment

Angular Version:


Angular CLI: 11.2.8
Node: 14.15.4
OS: darwin x64

Angular: 11.2.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.8
@angular-devkit/build-angular   0.1102.8
@angular-devkit/core            11.2.8
@angular-devkit/schematics      11.2.8
@angular/cli                    11.2.8
@schematics/angular             11.2.8
@schematics/update              0.1102.8
rxjs                            6.6.7
typescript                      4.1.5

Anything else relevant?

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions