Delete SlotCharacteristics from InventorySlot
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				E2E Testing / test (push) Successful in 1m37s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	E2E Testing / test (push) Successful in 1m37s
				
			This commit is contained in:
		
							parent
							
								
									bd243fc080
								
							
						
					
					
						commit
						1469f2e509
					
				| @ -36,7 +36,7 @@ | |||||||
|       <button mat-icon-button (click)="addInventorySlotCharacteristic()"><mat-icon>add</mat-icon></button> |       <button mat-icon-button (click)="addInventorySlotCharacteristic()"><mat-icon>add</mat-icon></button> | ||||||
|     </th> |     </th> | ||||||
|     <td mat-cell *matCellDef="let slotCharacteristic"> |     <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> |     </td> | ||||||
|   </ng-container> |   </ng-container> | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -60,4 +60,9 @@ export class InventorySlotCharacteristicEditorComponent implements OnInit{ | |||||||
|   editSlotCharacteristic(slotCharacteristic: InventoryCharacteristic) { |   editSlotCharacteristic(slotCharacteristic: InventoryCharacteristic) { | ||||||
|     this.editedCharacteristic = slotCharacteristic; |     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