Created
April 4, 2024 15:06
-
-
Save jsdevtom/dc7fc20d36b27dd27da0c27ce9f4b8c9 to your computer and use it in GitHub Desktop.
Angular Debug Form Control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-ignore | |
class DebugFormControl<T> extends FormControl<T> { | |
// @ts-ignore | |
override get pristine(): boolean { | |
return this._pristine; | |
} | |
override set pristine(value: boolean) { | |
this._pristine = value; | |
} | |
private _pristine: boolean = true; | |
override markAsTouched(opts?: { onlySelf?: boolean }) { | |
super.markAsTouched(opts); | |
} | |
override markAsDirty(opts?: { onlySelf?: boolean }) { | |
super.markAsDirty(opts); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment