问题
I am using
[enableCellChangeFlash]="true"
and doing
var params = { force: true };
this.gridApi.refreshCells(params);
for force refresh of all cells.
The Flash refresh is happening but the color is green or Greenish. Is there a way to change this default color how?
Example can be seen here :https://www.ag-grid.com/javascript-grid-refresh/
回答1:
Have a look at the plunk I've created: Refresh Cells - override color
You need to update the CSS
.ag-theme-balham-dark .ag-row .ag-cell-data-changed {
background-color: red !important;
}
Simply .ag-theme-balham-dark .ag-cell-data-changed { ... }
won't work because ag-grid applies the styles having !important
. We also need to override it.
回答2:
based on my another post
styles: [`
.ag-theme-balham-dark .ag-cell-data-changed {
background-color:red !important;
}
`],
DEMO
来源:https://stackoverflow.com/questions/53770930/ag-grid-angular6-color-change-for-flashing-on-grid-refresh