From 32647c8af54b03b1b6d1aadbe8ba9418756dc962 Mon Sep 17 00:00:00 2001 From: Silviu Popa Date: Mon, 22 Apr 2019 20:19:39 +0300 Subject: [PATCH] [ADF-4430] Metadata- fix error message (#4635) --- .../card-view-textitem/card-view-textitem.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts index deeabaf1b7..2b3108cec2 100644 --- a/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts +++ b/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts @@ -87,6 +87,11 @@ export class CardViewTextItemComponent implements OnChanges { reset(): void { this.editedValue = this.property.multiline ? this.property.displayValue : this.property.value; this.setEditMode(false); + this.resetErrorMessages(); + } + + private resetErrorMessages() { + this.errorMessages = []; } update(): void { @@ -95,6 +100,7 @@ export class CardViewTextItemComponent implements OnChanges { this.cardViewUpdateService.update(this.property, updatedValue); this.property.value = updatedValue; this.setEditMode(false); + this.resetErrorMessages(); } else { this.errorMessages = this.property.getValidationErrors(this.editedValue); }