I am facing an issue where I have an angular grid ag-grid in component1, which is being used in some other component2. Now, I need to use the same component1 in component3 but with a different class for ag-grid, specifically 'ag-grid-theme-dark'. How can I pass the configuration class to the component?
Here is the code for component1:
<ag-grid-angular class="ag-theme-balham" [gridOptions]="gridOptions"
[rowData]="gridSource" [columnDefs]="columnDefs" [rowClassRules]="rowClassRules"
(gridReady)="onGridReady($event)">
</ag-grid-angular>
this.gridOptions = {
rowData: this.gridSource
};
And here is the code for component3:
On click of a button icon, a popup will open displaying the ag-grid, but we want it to have the 'ag-grid-theme-dark' class.
private dialogRef: MatDialogRef<component3>;
dataValues() {
this.dialogRef = this.openDialog.open(component3, {
width: '100%',
height: '100%',
data: {
context: this, dataTable: this.comingData, Col: this.column
}
});
}
}