Skip to content

Commit

Permalink
added prestine()
Browse files Browse the repository at this point in the history
  • Loading branch information
raygig committed Dec 7, 2024
1 parent 95f3825 commit 3c0547b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@firestitch/form",
"title": "Form",
"version": "18.0.5",
"version": "18.0.6",
"repository": {
"type": "git",
"url": "https://github.com/Firestitch/ngx-form"
Expand Down
5 changes: 5 additions & 0 deletions src/app/directives/form/form.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ export class FsFormDirective implements OnInit, OnDestroy, AfterContentInit, OnC
this._updateDirtySubmitButtons();
}

public pristine(): void {
this.ngForm.form.markAsPristine();
this._updateDirtySubmitButtons();
}

public triggerSubmit(options?: { confirmed: boolean }): void {
this._confirmed = options?.confirmed;
this.ngForm.ngSubmit.emit();
Expand Down

0 comments on commit 3c0547b

Please sign in to comment.