[ADF-4430] Metadata- fix error message (#4635)

This commit is contained in:
Silviu Popa
2019-04-22 20:19:39 +03:00
committed by Eugenio Romano
parent 54adfaa56f
commit 32647c8af5

View File

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