docs(forms): clarify disabled FormArray value behavior

Document that FormArray.value includes only enabled child controls when the array is enabled, but includes all child values when the FormArray itself is disabled.

Fixes #67759
This commit is contained in:
Harmeet Singh 2026-03-19 18:42:11 -05:00 committed by Andrew Scott
parent 24c5400185
commit 789c2cd9fb
2 changed files with 4 additions and 2 deletions

View file

@ -554,7 +554,8 @@ export abstract class AbstractControl<
* with a key-value pair for each member of the group.
* * For a disabled `FormGroup`, the values of all controls as an object
* with a key-value pair for each member of the group.
* * For a `FormArray`, the values of enabled controls as an array.
* * For an enabled `FormArray`, the values of enabled controls as an array.
* * For a disabled `FormArray`, the values of all controls as an array.
*
*/
public readonly value!: TValue;

View file

@ -54,7 +54,8 @@ export type ɵFormArrayRawValue<T extends AbstractControl<any>> = ɵTypedOrUntyp
*
* A `FormArray` aggregates the values of each child `FormControl` into an array.
* It calculates its status by reducing the status values of its children. For example, if one of
* the controls in a `FormArray` is invalid, the entire array becomes invalid.
* the controls in a `FormArray` is invalid, the entire array becomes invalid. Similarly, if all
* controls in a `FormArray` are disabled, the entire array becomes disabled.
*
* `FormArray` accepts one generic argument, which is the type of the controls inside.
* If you need a heterogenous array, use {@link UntypedFormArray}.