Browse Source
Merge pull request #12607 from abpframework/issues/9392
Add input the by pass markAssubmit
pull/12705/head
Mahmut Gundogdu
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
1 deletions
-
npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
|
|
|
@ -26,6 +26,9 @@ export class FormSubmitDirective implements OnInit { |
|
|
|
|
|
|
|
@Input() |
|
|
|
notValidateOnSubmit: string | boolean; |
|
|
|
|
|
|
|
@Input() |
|
|
|
markAsDirtyWhenSubmit: boolean = true |
|
|
|
|
|
|
|
@Output() readonly ngSubmit = new EventEmitter(); |
|
|
|
|
|
|
|
@ -40,7 +43,10 @@ export class FormSubmitDirective implements OnInit { |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
this.subscription.addOne(this.formGroupDirective.ngSubmit, () => { |
|
|
|
this.markAsDirty(); |
|
|
|
if(this.markAsDirtyWhenSubmit){ |
|
|
|
this.markAsDirty(); |
|
|
|
} |
|
|
|
|
|
|
|
this.executedNgSubmit = true; |
|
|
|
}); |
|
|
|
|
|
|
|
|