AW-915 Use proper container (not just the first).
FarmMaps.Develop/FarmMapsLib/develop This commit looks good Details

pull/1/head
Peter Bastiani 2020-02-17 12:49:08 +01:00
parent fd28af2f6c
commit fcef78dee0
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ export class SelectedItemContainerComponent {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithTypeAndTask['constructor'] as any);
} else {
let firstComponentWithType = this.selectedItemComponents
.find(value => value['forItemType'] == this.item.itemType);
.find(value => value['forSourceTask'] == null &&
value['forItemType'] == this.item.itemType);
if (firstComponentWithType) {
componentFactory = this.componentFactoryResolver.resolveComponentFactory(firstComponentWithType['constructor'] as any);