[ACA-3499] Cardview textitem update on change (#5882)

This commit is contained in:
Baptiste Mahé 2020-07-16 15:56:32 +01:00 committed by GitHub
parent e293aa048e
commit 389a65860c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -14,8 +14,7 @@
class="adf-property-value"
[placeholder]="property.default"
[(ngModel)]="editedValue"
(blur)="update()"
(keydown.enter)="update()"
(ngModelChange)="update()"
[disabled]="!isEditable"
(dblclick)="copyToClipboard(property.displayValue)"
matTooltipShowDelay="1000"
@ -30,8 +29,7 @@
class="adf-property-value"
[placeholder]="property.default"
[(ngModel)]="editedValue"
(blur)="update()"
(keydown.enter)="update()"
(ngModelChange)="update()"
[disabled]="!isEditable"
[attr.data-automation-id]="'card-textitem-value-' + property.key"></textarea>
<button mat-button
@ -104,8 +102,7 @@
[ngClass]="{ 'adf-textitem-clickable-value': !isEditable }"
[placeholder]="property.default"
[(ngModel)]="editedValue"
(blur)="update()"
(keydown.enter)="update()"
(ngModelChange)="update()"
[disabled]="!isEditable"
[attr.data-automation-id]="'card-textitem-value-' + property.key">
<button mat-icon-button

View File

@ -736,7 +736,6 @@ describe('CardViewTextItemComponent', () => {
const editInput = fixture.debugElement.query(By.css(`[data-automation-id="card-textitem-value-${key}"]`));
editInput.nativeElement.value = value;
editInput.nativeElement.dispatchEvent(new Event('input'));
editInput.nativeElement.dispatchEvent(new Event('blur'));
fixture.detectChanges();
}