Add input the byp ass markAsssubmit

pull/12607/head
Mahmut Gundogdu 3 years ago
parent 682e06ce39
commit 2ad158e27d

@ -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;
});

Loading…
Cancel
Save