From 8c78afb7acc79d87d99e86a579bc63a43b549c0d Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Thu, 14 Mar 2019 17:38:02 +0000 Subject: [PATCH] Fix endpoint table --> card error --- .../table-cell-endpoint-details.component.ts | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-details/table-cell-endpoint-details.component.ts b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-details/table-cell-endpoint-details.component.ts index 2bb2f65cb5..cf6e771498 100644 --- a/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-details/table-cell-endpoint-details.component.ts +++ b/src/frontend/packages/core/src/shared/components/list/list-types/endpoint/table-cell-endpoint-details/table-cell-endpoint-details.component.ts @@ -1,4 +1,13 @@ -import { Component, ComponentFactoryResolver, Input, OnDestroy, Type, ViewChild, ViewContainerRef } from '@angular/core'; +import { + Component, + ComponentFactoryResolver, + ComponentRef, + Input, + OnDestroy, + Type, + ViewChild, + ViewContainerRef, +} from '@angular/core'; import { EndpointModel } from '../../../../../../../../store/src/types/endpoint.types'; import { getEndpointType } from '../../../../../../features/endpoints/endpoint-helpers'; @@ -12,8 +21,13 @@ import { EndpointListDetailsComponent, EndpointListHelper } from '../endpoint-li }) export class TableCellEndpointDetailsComponent extends TableCellCustom implements OnDestroy { + private componentRef: ComponentRef; @Input() component: Type; - @ViewChild('target', { read: ViewContainerRef }) target; + + private endpointDetails: ViewContainerRef; + @ViewChild('target', { read: ViewContainerRef }) set target(content: ViewContainerRef) { + this.endpointDetails = content; + } cell: EndpointListDetailsComponent; @@ -32,8 +46,8 @@ export class TableCellEndpointDetailsComponent extends TableCellCustom