inventory-slots #49
@ -36,7 +36,7 @@
|
||||
<button mat-icon-button (click)="addInventorySlotCharacteristic()"><mat-icon>add</mat-icon></button>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let slotCharacteristic">
|
||||
<button mat-icon-button color="warn"><mat-icon>delete</mat-icon></button>
|
||||
<button mat-icon-button color="warn" (click)="deleteSlotCharacteristic(slotCharacteristic)"><mat-icon>delete</mat-icon></button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
|
@ -60,4 +60,9 @@ export class InventorySlotCharacteristicEditorComponent implements OnInit{
|
||||
editSlotCharacteristic(slotCharacteristic: InventoryCharacteristic) {
|
||||
this.editedCharacteristic = slotCharacteristic;
|
||||
}
|
||||
|
||||
deleteSlotCharacteristic(slotCharacteristic: InventoryCharacteristic) {
|
||||
this.inventorySlot!.slotCharacteristics = this.inventorySlot!.slotCharacteristics.filter(characteristic => characteristic !== slotCharacteristic);
|
||||
this.datasource.data = this.inventorySlot!.slotCharacteristics;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user