(
opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},
)
| 1201 | sourceControl?: AbstractControl; |
| 1202 | }): void; |
| 1203 | markAsPristine( |
| 1204 | opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {}, |
| 1205 | ): void { |
| 1206 | const changed = this.pristine === false; |
| 1207 | this.pristine = true; |
| 1208 | this._pendingDirty = false; |
| 1209 | |
| 1210 | const sourceControl = opts.sourceControl ?? this; |
| 1211 | this._forEachChild((control: AbstractControl) => { |
| 1212 | /** We don't propagate the source control downwards */ |
| 1213 | control.markAsPristine({onlySelf: true, emitEvent: opts.emitEvent}); |
| 1214 | }); |
| 1215 | |
| 1216 | if (!opts.onlySelf) { |
| 1217 | this._parent?._updatePristine(opts, sourceControl); |
| 1218 | } |
| 1219 | |
| 1220 | if (changed && opts.emitEvent !== false) { |
| 1221 | this._events.next(new PristineChangeEvent(true, sourceControl)); |
| 1222 | } |
| 1223 | } |
| 1224 | |
| 1225 | /** |
| 1226 | * Marks the control as `pending`. |
nothing calls this directly
no test coverage detected