Description
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
No
Description
When a form control is disabled, its value normally doesn't appear anymore in its form group value. But that's not the case when all the controls of the form group are disabled.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-g241jxfq?file=src%2Fmain.ts
Please provide the exception or error you saw
In the Single control form section, toggle the disabled state of the unique control. Note how the form value doesn't change. This is incorrect: when a form control is disabled, its value isn't supposed to be in the form value.
In the Multiple control form section, toggle the disabled state of the text1 control. Note that text1's value correctly disappears from the form value.
Now disable text1 and text2. Now suddenly both form control values incorrectly reappear in the form value.
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 19.0.7
Node: 20.19.0
Package Manager: npm 10.8.2
OS: linux x64
Angular: 19.0.6
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, router
Package Version
------------------------------------------------------
@angular-devkit/architect 0.1900.7
@angular-devkit/core 19.0.7
@angular-devkit/schematics 19.0.7
@angular/build 19.0.7
@angular/cli 19.0.7
@schematics/angular 19.0.7
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0
Anything else?
No response