Ag-网格。更改单元格值后更改行颜色

Ag-grid. Change Row Color After Cell Value Is Changed

更新单元格时,我希望该行更改颜色。

我已经能够更新单元格颜色但不能更新行颜色

      onCellValueChanged: function(params) {
        if (params.oldValue !== params.newValue) {
          params.colDef.cellStyle = function(params) {
            return { backgroundColor: 'green' };
          };
        }
      }
gridOptions.getRowStyle = function(params) {
   if (params.node.rowIndex === 'the index of row you want to change color ') {
      return { background: 'red' }
   }
}