(value?: unknown)
| 334 | } |
| 335 | |
| 336 | private _reset(value?: unknown) { |
| 337 | this.pendingSync()?.abort(); |
| 338 | |
| 339 | if (value !== undefined) { |
| 340 | this.value.set(value); |
| 341 | } |
| 342 | |
| 343 | // controlValue is a linkedSignal that only auto-resets when value *changes*. |
| 344 | // When the reset value equals the current value (or no value was passed), |
| 345 | // controlValue retains the typed text. Force it to match value by setting |
| 346 | // directly via the raw interface, which doesn't trigger a sync. |
| 347 | this.controlValue.rawSet(this.value()); |
| 348 | |
| 349 | this.nodeState.markAsUntouched(); |
| 350 | this.nodeState.markAsPristine(); |
| 351 | |
| 352 | for (const binding of this.formFieldBindings()) { |
| 353 | binding.reset(); |
| 354 | } |
| 355 | |
| 356 | for (const child of this.structure.materializedChildren()) { |
| 357 | child._reset(); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | /** |
| 362 | * Reloads all asynchronous validators for this field and its descendants. |
no test coverage detected