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