AG-grid - angular6 - color change for flashing on grid refresh

∥☆過路亽.° 提交于 2020-01-06 05:26:10

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!