mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Prior to this commit, the `patchValue()` of the `FormGroup` and `FormArray` classes used to throw an exception when the `value` argument contained a data structure that has `null` or `undefined` as a value for a field that represents an instance of `FormGroup` or `FormArray` (for `FormControl` it's not a problem, since it doesn't have nested controls), since the `patchValue()` method tried to iterate over provided values to match current data structure. This commit updates the `patchValue()` logic in `FormGroup` and `FormArray` classes to just ignore `null` and `undefined` values (without any changes to corresponding `FormGroup` and `FormArray` instances). This behavior looks inline with the `patchValue()` method goal of "doing its best to match the values to the correct controls" (quote from docs). Fixes #36672. Fixes #21021. PR Close #40534 |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| directives_spec.ts | ||
| form_array_spec.ts | ||
| form_builder_spec.ts | ||
| form_control_spec.ts | ||
| form_group_spec.ts | ||
| reactive_integration_spec.ts | ||
| spies.ts | ||
| template_integration_spec.ts | ||
| util.ts | ||
| validators_spec.ts | ||
| value_accessor_integration_spec.ts | ||