MCPcopy Index your code
hub / github.com/angular/angular / markAsUntouched

Function markAsUntouched

packages/forms/src/model/abstract_model.ts:1084–1103  ·  view source on GitHub ↗
(
    opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},
  )

Source from the content-addressed store, hash-verified

1082 sourceControl?: AbstractControl;
1083 }): void;
1084 markAsUntouched(
1085 opts: {onlySelf?: boolean; emitEvent?: boolean; sourceControl?: AbstractControl} = {},
1086 ): void {
1087 const changed = this.touched === true;
1088 this.touched = false;
1089 this._pendingTouched = false;
1090
1091 const sourceControl = opts.sourceControl ?? this;
1092 this._forEachChild((control: AbstractControl) => {
1093 control.markAsUntouched({onlySelf: true, emitEvent: opts.emitEvent, sourceControl});
1094 });
1095
1096 if (!opts.onlySelf) {
1097 this._parent?._updateTouched(opts, sourceControl);
1098 }
1099
1100 if (changed && opts.emitEvent !== false) {
1101 this._events.next(new TouchedChangeEvent(false, sourceControl));
1102 }
1103 }
1104
1105 /**
1106 * Marks the control as `dirty`. A control becomes dirty when

Callers

nothing calls this directly

Calls 3

_forEachChildMethod · 0.65
markAsUntouchedMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…