issue-15 #21
@ -37,7 +37,7 @@
 | 
			
		||||
  <ng-container matColumnDef="edit">
 | 
			
		||||
    <th mat-header-cell *matHeaderCellDef></th>
 | 
			
		||||
    <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>
 | 
			
		||||
    </td>
 | 
			
		||||
  </ng-container>
 | 
			
		||||
 | 
			
		||||
@ -41,8 +41,11 @@ export class ScriptaccountConditionEditorComponent implements OnInit{
 | 
			
		||||
        this.dataSource.data = this.conditions;
 | 
			
		||||
      }
 | 
			
		||||
      this.addedCondition = undefined;
 | 
			
		||||
    } else {
 | 
			
		||||
      this.editedCondition = undefined;
 | 
			
		||||
    }
 | 
			
		||||
    this.editedCondition = undefined;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  edit(condition: ScriptAccountCondition) {
 | 
			
		||||
    this.editedCondition = condition;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user