Browse Source
Merge pull request #13797 from abpframework/deprecated/form-submit.direcrive
Mark as "Deprecated" FormSubmitDirective
pull/13814/head
Muhammed Altuğ
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
1 deletions
-
npm/ng-packs/packages/core/src/lib/directives/form-submit.directive.ts
|
|
|
@ -14,7 +14,9 @@ import { debounceTime, filter } from 'rxjs/operators'; |
|
|
|
import { SubscriptionService } from '../services/subscription.service'; |
|
|
|
|
|
|
|
type Controls = { [key: string]: FormControl } | FormGroup[]; |
|
|
|
|
|
|
|
/** |
|
|
|
* @deprecated FormSubmitDirective will be removed in V7.0.0. Use `ngSubmit` instead. |
|
|
|
*/ |
|
|
|
@Directive({ |
|
|
|
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
|
|
selector: 'form[ngSubmit][formGroup]', |
|
|
|
@ -43,6 +45,7 @@ export class FormSubmitDirective implements OnInit { |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
this.subscription.addOne(this.formGroupDirective.ngSubmit, () => { |
|
|
|
|
|
|
|
if (this.markAsDirtyWhenSubmit) { |
|
|
|
this.markAsDirty(); |
|
|
|
} |
|
|
|
|