@angular/forms 21.0.0-next.8 → 21.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/forms",
3
- "version": "21.0.0-next.8",
3
+ "version": "21.0.0-rc.0",
4
4
  "description": "Angular - directives and services for creating forms",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -11,9 +11,9 @@
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/core": "21.0.0-next.8",
15
- "@angular/common": "21.0.0-next.8",
16
- "@angular/platform-browser": "21.0.0-next.8",
14
+ "@angular/core": "21.0.0-rc.0",
15
+ "@angular/common": "21.0.0-rc.0",
16
+ "@angular/platform-browser": "21.0.0-rc.0",
17
17
  "@standard-schema/spec": "^1.0.0",
18
18
  "rxjs": "^6.5.3 || ^7.4.0"
19
19
  },
package/types/forms.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v21.0.0-next.8
2
+ * @license Angular v21.0.0-rc.0
3
3
  * (c) 2010-2025 Google LLC. https://angular.dev/
4
4
  * License: MIT
5
5
  */
@@ -1285,6 +1285,7 @@ declare class FormArray<TControl extends AbstractControl<any> = any> extends Abs
1285
1285
  reset(value?: ɵTypedOrUntyped<TControl, ɵFormArrayValue<TControl>, any>, options?: {
1286
1286
  onlySelf?: boolean;
1287
1287
  emitEvent?: boolean;
1288
+ overwriteDefaultValue?: boolean;
1288
1289
  }): void;
1289
1290
  /**
1290
1291
  * The aggregate value of the array, including any disabled controls.
@@ -1585,7 +1586,7 @@ interface FormControl<TValue = any> extends AbstractControl<TValue> {
1585
1586
  * value. See {@link FormControlOptions#nonNullable} for more information on configuring
1586
1587
  * a default value.
1587
1588
  */
1588
- readonly defaultValue: TValue;
1589
+ defaultValue: TValue;
1589
1590
  /**
1590
1591
  * Sets a new value for the form control.
1591
1592
  *
@@ -1661,11 +1662,13 @@ interface FormControl<TValue = any> extends AbstractControl<TValue> {
1661
1662
  * `valueChanges`
1662
1663
  * observables emit events with the latest status and value when the control is reset.
1663
1664
  * When false, no events are emitted.
1665
+ * * `overwriteDefaultValue`: When true, the value used to reset the control becomes the new default value of the control.
1664
1666
  *
1665
1667
  */
1666
1668
  reset(formState?: TValue | FormControlState<TValue>, options?: {
1667
1669
  onlySelf?: boolean;
1668
1670
  emitEvent?: boolean;
1671
+ overwriteDefaultValue?: boolean;
1669
1672
  }): void;
1670
1673
  /**
1671
1674
  * For a simple FormControl, the raw value is equivalent to the value.
@@ -2103,6 +2106,7 @@ declare class FormGroup<TControl extends {
2103
2106
  reset(value?: ɵTypedOrUntyped<TControl, ɵFormGroupArgumentValue<TControl>, any>, options?: {
2104
2107
  onlySelf?: boolean;
2105
2108
  emitEvent?: boolean;
2109
+ overwriteDefaultValue?: boolean;
2106
2110
  }): void;
2107
2111
  /**
2108
2112
  * The aggregate value of the `FormGroup`, including any disabled controls.