Rerender table automatically on Change
All checks were successful
E2E Testing / test (push) Successful in 1m33s

This commit is contained in:
Sebastian Böckelmann 2024-05-09 07:06:51 +02:00
parent db0bd14ea8
commit 34c139eecf
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<table mat-table [dataSource]="datasource" class="mat-elevation-z8"> <table mat-table [dataSource]="findCharacteristicValuesByItemgroup(inheritedItemgroup!)" class="mat-elevation-z8">
<ng-container matColumnDef="characteristic"> <ng-container matColumnDef="characteristic">
<th mat-header-cell *matHeaderCellDef>Characteristic</th> <th mat-header-cell *matHeaderCellDef>Characteristic</th>
<td mat-cell *matCellDef="let characteristicValue">{{characteristicValue.key.characteristicName}}</td> <td mat-cell *matCellDef="let characteristicValue">{{characteristicValue.key.characteristicName}}</td>

View File

@ -24,7 +24,7 @@ export class InheritedItemCharacteristicEditorComponent implements OnInit{
} }
private findCharacteristicValuesByItemgroup(itemGroup: ItemGroup): ItemgroupCharacteristicValue[] { findCharacteristicValuesByItemgroup(itemGroup: ItemGroup): ItemgroupCharacteristicValue[] {
const result = this.item?.itemCharacteristicValues.filter(value => value.key.itemgroup.componentName === itemGroup.componentName); const result = this.item?.itemCharacteristicValues.filter(value => value.key.itemgroup.componentName === itemGroup.componentName);
if(result != undefined) { if(result != undefined) {
return result; return result;