I'm trying to add a simple component in ag-grid table cell . I flow the instructions in aggrid website but it dos'nt render the component . here is my code :
columnDefs = [
{ headerName: "Name", field: "name" ,width: 400},
{ headerName: "GoodsFinalCode", field: "goodsFinalCode" ,width: 200},
{ headerName: "operation", field: "operation" ,cellRendererFramework: OperationComponent, width: 450}
];
rowData = [ {
name : 'b',
goodsFinalCode :6,
}
]
the gridoptiopns is :
this.gridOptions = <GridOptions>{
rowData: this.rowData,
columnDefs: this.columnDefs,
context: {
componentParent: this
},
enableColResize: true
};
and the componet is :
import { Component } from '@angular/core';
@Component({
selector: 'app-operation',
templateUrl: './operation.component.html',
styleUrls: ['./operation.component.scss']
})
export class OperationComponent {
private params: any;
agInit(params: any): void {
this.params = params;
}
}
in operation html I just have a button. but nothing appear in aggrid cell.