ds command changes.

This commit is contained in:
David Lebee 2021-09-10 16:33:36 -04:00
parent e3b24915e6
commit 0bf06fd9bc
2 changed files with 11 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@poweredsoft/ngx-cdk-ui",
"version": "0.0.17",
"version": "0.0.18",
"peerDependencies": {
"@angular/common": "^9.1.9",
"@angular/core": "^9.1.9",

View File

@ -48,8 +48,8 @@ export class DsCommandComponent implements OnInit, OnDestroy {
@ContentChild(DsCommandValidationDirective) validationDirective: DsCommandValidationDirective;
@ContentChildren(DsCommandSubmitDirective) submitDirectives: QueryList<DsCommandSubmitDirective>;
lastErrorMessage: string;
lastValidationResult: DsCommandPropertyError[];
lastErrorMessage: string | null;
lastValidationResult: DsCommandPropertyError[] | null;
protected _command: any = null;
@ -101,6 +101,14 @@ export class DsCommandComponent implements OnInit, OnDestroy {
}
clearValidationError() {
this.lastValidationResult = null;
}
clearLastErrorMessage() {
this.lastErrorMessage = null;
}
ngOnDestroy() {
this._validationErrorSubscription?.unsubscribe();
this._notifyMessageSubscription?.unsubscribe();