This commit is contained in:
parent
79eee273a0
commit
c0bdbd5f40
@ -37,7 +37,7 @@
|
|||||||
<ng-container matColumnDef="edit">
|
<ng-container matColumnDef="edit">
|
||||||
<th mat-header-cell *matHeaderCellDef></th>
|
<th mat-header-cell *matHeaderCellDef></th>
|
||||||
<td mat-cell *matCellDef="let condition;">
|
<td mat-cell *matCellDef="let condition;">
|
||||||
<button mat-icon-button color="primary" *ngIf="editedCondition == undefined"><mat-icon>edit</mat-icon></button>
|
<button mat-icon-button color="primary" *ngIf="editedCondition == undefined" (click)="edit(condition)"><mat-icon>edit</mat-icon></button>
|
||||||
<button mat-icon-button color="primary" *ngIf="editedCondition === condition" (click)="finishEditing()"><mat-icon>done</mat-icon></button>
|
<button mat-icon-button color="primary" *ngIf="editedCondition === condition" (click)="finishEditing()"><mat-icon>done</mat-icon></button>
|
||||||
</td>
|
</td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -41,8 +41,11 @@ export class ScriptaccountConditionEditorComponent implements OnInit{
|
|||||||
this.dataSource.data = this.conditions;
|
this.dataSource.data = this.conditions;
|
||||||
}
|
}
|
||||||
this.addedCondition = undefined;
|
this.addedCondition = undefined;
|
||||||
} else {
|
|
||||||
this.editedCondition = undefined;
|
|
||||||
}
|
}
|
||||||
|
this.editedCondition = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
edit(condition: ScriptAccountCondition) {
|
||||||
|
this.editedCondition = condition;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user