简体   繁体   English

AG-grid-angular6-颜色更改以在刷新网格时闪烁

[英]AG-grid - angular6 - color change for flashing on grid refresh

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. 正在进行Flash刷新,但是颜色为绿色或绿色。 Is there a way to change this default color how? 有没有办法改变这种默认颜色?

Example can be seen here : https://www.ag-grid.com/javascript-grid-refresh/ 示例可以在这里看到: https//www.ag-grid.com/javascript-grid-refresh/

Have a look at the plunk I've created: Refresh Cells - override color 看看我创建的插件: 刷新单元格-覆盖颜色

You need to update the CSS 您需要更新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 applies the styles having !important . 只是.ag-theme-balham-dark .ag-cell-data-changed { ... }不起作用,因为应用了具有!important的样式。 We also need to override it. 我们还需要覆盖它。

based on my another post 根据我的另一篇文章

styles: [`
    .ag-theme-balham-dark .ag-cell-data-changed {
        background-color:red !important;
    }
`],

DEMO 演示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM