I'm trying to add some data from my backend to the AGGrid cell renderer component but it is not reading the observable data
Here's what I've tried so far
- Call the service directly from within the cellRenderer component
- Call the service in the data grid and pass the value as a cellRendererParams
// My Grid Options
gridOptions: {
columnTypes: {
"actionColumn": {
cellRenderer: 'actionColumnRenderer',
cellRendererParams: {
canEdit$: this.userInfo.getUserRole() // Returns a Observable<boolean>
}
}
}
//Inside ActionColumnRenderer
<div *ngIf="(canEdit$|async)></div>
// Calling in the service in the actionRenderer directly
agInit(params:any){
this.params = params;
this.canEdit$ = this.userInfo.getUserRole();
}
There's nothing wrong with the observable as I am able to access it in all my other components(even inside the data grid component)
Any ideas?
gridOptionsinside subscription part ofgetUserRole- Paritosh<ag-grid-angular *ngIf="gridOptions" gridOptions="gridOptions"....></ag-grid-angular>- Paritosh