Skip to content

FormArray.value aggregates values of disabled FormControls #67759

@mwaibel-go

Description

@mwaibel-go

Which @angular/* package(s) are the source of the bug?

forms

Is this a regression?

Yes

(Not actually sure, but the field is mandatory.)

Description

The docs for FormArray’s value property says (emphasis mine):

The current value of the control.

[…]

  • For a FormArray, the values of enabled controls as an array.

According to that, the following code snippet should log an empty array

const formArray = new FormArray([
  new FormControl(1)
])
formArray.disable()
console.log(formArray.value)

However, it logs [1].

Please provide a link to a minimal reproduction of the bug

https://github.com/mwaibel-go/form-array-disabled-value-repro

Please provide the exception or error you saw


Please provide the environment you discovered this bug in (run ng version)

Angular CLI       : 21.2.3
Angular           : 21.2.5
Node.js           : 24.13.0
Package Manager   : npm 11.11.1
Operating System  : linux x64

┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package                   │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build            │ 21.2.3            │ ^21.2.3           │
│ @angular/cli              │ 21.2.3            │ ^21.2.3           │
│ @angular/common           │ 21.2.5            │ ^21.2.0           │
│ @angular/compiler         │ 21.2.5            │ ^21.2.0           │
│ @angular/compiler-cli     │ 21.2.5            │ ^21.2.0           │
│ @angular/core             │ 21.2.5            │ ^21.2.0           │
│ @angular/forms            │ 21.2.5            │ ^21.2.0           │
│ @angular/platform-browser │ 21.2.5            │ ^21.2.0           │
│ @angular/router           │ 21.2.5            │ ^21.2.0           │
│ rxjs                      │ 7.8.2             │ ~7.8.0            │
│ typescript                │ 5.9.3             │ ~5.9.2            │
│ vitest                    │ 4.1.0             │ ^4.0.8            │
└───────────────────────────┴───────────────────┴───────────────────┘

Anything else?

Link to the relevant file in the repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions