Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Disabled form control value appears in form value if all controls are disabled #60785

Copy link
Copy link
Open
@jnizet

Description

@jnizet
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.