From 0bf06fd9bce5d5cb53b1d66c2be4b5c6a1f9d600 Mon Sep 17 00:00:00 2001 From: David Lebee Date: Fri, 10 Sep 2021 16:33:36 -0400 Subject: [PATCH] ds command changes. --- projects/poweredsoft/ngx-cdk-ui/package.json | 2 +- .../src/lib/ds-command/ds-command.component.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/projects/poweredsoft/ngx-cdk-ui/package.json b/projects/poweredsoft/ngx-cdk-ui/package.json index 08ebafe..2c57aa2 100644 --- a/projects/poweredsoft/ngx-cdk-ui/package.json +++ b/projects/poweredsoft/ngx-cdk-ui/package.json @@ -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", diff --git a/projects/poweredsoft/ngx-cdk-ui/src/lib/ds-command/ds-command.component.ts b/projects/poweredsoft/ngx-cdk-ui/src/lib/ds-command/ds-command.component.ts index d779939..0b4990a 100644 --- a/projects/poweredsoft/ngx-cdk-ui/src/lib/ds-command/ds-command.component.ts +++ b/projects/poweredsoft/ngx-cdk-ui/src/lib/ds-command/ds-command.component.ts @@ -48,8 +48,8 @@ export class DsCommandComponent implements OnInit, OnDestroy { @ContentChild(DsCommandValidationDirective) validationDirective: DsCommandValidationDirective; @ContentChildren(DsCommandSubmitDirective) submitDirectives: QueryList; - lastErrorMessage: string; - lastValidationResult: DsCommandPropertyError[]; + lastErrorMessage: string | null; + lastValidationResult: DsCommandPropertyError[] | null; protected _command: any = null; @@ -100,6 +100,14 @@ export class DsCommandComponent implements OnInit, OnDestroy { constructor() { } + + clearValidationError() { + this.lastValidationResult = null; + } + + clearLastErrorMessage() { + this.lastErrorMessage = null; + } ngOnDestroy() { this._validationErrorSubscription?.unsubscribe();