2017-05-17 6 views
0

우리는이 같은 우리의 cellRendererFramework에 종속성과 같은 구성 요소를 전달할 수 "colDef.cellRendererFramework.component가되지 않습니다" 이 ag-grid blog.AG-그리드 각도 AG-그리드의 이전 버전 이후

colDef.cellRendererFramework.component is deprecated - please refer to https://ag-grid.com/best-angular-2-data-grid/ 

어떤이를 달성하는 방법은 지금 추천 있습니까 :

Unfortunatelly 버전 9 나에게 이것에 대해 사용되지 않는 경고를 제공? Ag Grid의 변경 내역에서이 항목을 찾을 수 없었습니다.

답변

0

오른쪽, 상위 구성 요소와 통신 할 수있는 트릭을 사용하는 컨텍스트 개체 :

this.gridOptions = <GridOptions>{ 
      context: { 
       componentParent: this 
      } 
     }; 

from Simple Dynamic Component example

0

블로그의이 부분을 놓치셨습니까?

대신 :

{ 
    headerName: "Clickable Component", 
    field: "name", 
    cellRendererFramework: { 
     component: ClickableParentComponent, 
     dependencies: [ClickableComponent] 
    }, 
    width: 200 
} 

이제 만이 수행해야합니다

{ 
    headerName: "Clickable Component", 
    field: "name", 
    cellRendererFramework: ClickableParentComponent, 
    width: 250 
} 
+0

어떻게 의존성을 전달합니까? 나는 당신의 코드에서 그것을 보지 못한다. –

+0

제가 이해하기에 더 이상 종속성을 전달할 필요가 없습니다 –

+0

내가 찾고있는 대답은 현재 권장되지 않는 종속성을 전달하는 데 현재 권장되는 방법입니다. 그 사실을 알 필요가 없다고 말하는 것은 실제로 도움이되지 않습니다. –