(
opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},
)
| 1178 | sourceControl?: AbstractControl; |
| 1179 | }): void; |
| 1180 | markAsPristine( |
| 1181 | opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {}, |
| 1182 | ): void { |
| 1183 | const changed = this.pristine === false; |
| 1184 | this.pristine = true; |
| 1185 | this._pendingDirty = false; |
| 1186 | |
| 1187 | const sourceControl = opts.sourceControl ?? this; |
| 1188 | this._forEachChild((control: AbstractControl) => { |
| 1189 | /** We don't propagate the source control downwards */ |
| 1190 | control.markAsPristine({onlySelf: true, emitEvent: opts.emitEvent}); |
| 1191 | }); |
| 1192 | |
| 1193 | if (!opts.onlySelf) { |
| 1194 | this._parent?._updatePristine(opts, sourceControl); |
| 1195 | } |
| 1196 | |
| 1197 | if (changed && opts.emitEvent !== false) { |
| 1198 | this._events.next(new PristineChangeEvent(true, sourceControl)); |
| 1199 | } |
| 1200 | } |
| 1201 | |
| 1202 | /** |
| 1203 | * Marks the control as `pending`. |
nothing calls this directly
no test coverage detected
searching dependent graphs…