(
opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},
)
| 1105 | sourceControl?: AbstractControl; |
| 1106 | }): void; |
| 1107 | markAsUntouched( |
| 1108 | opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {}, |
| 1109 | ): void { |
| 1110 | const changed = this.touched === true; |
| 1111 | this.touched = false; |
| 1112 | this._pendingTouched = false; |
| 1113 | |
| 1114 | const sourceControl = opts.sourceControl ?? this; |
| 1115 | this._forEachChild((control: AbstractControl) => { |
| 1116 | control.markAsUntouched({onlySelf: true, emitEvent: opts.emitEvent, sourceControl}); |
| 1117 | }); |
| 1118 | |
| 1119 | if (!opts.onlySelf) { |
| 1120 | this._parent?._updateTouched(opts, sourceControl); |
| 1121 | } |
| 1122 | |
| 1123 | if (changed && opts.emitEvent !== false) { |
| 1124 | this._events.next(new TouchedChangeEvent(false, sourceControl)); |
| 1125 | } |
| 1126 | } |
| 1127 | |
| 1128 | /** |
| 1129 | * Marks the control as `dirty`. A control becomes dirty when |
nothing calls this directly
no test coverage detected