enterprise-wc icon indicating copy to clipboard operation
enterprise-wc copied to clipboard

IdsDataGrid: resetDirtyCells for specific row

Open fabiojpoli opened this issue 7 months ago • 3 comments

Is your feature request related to a problem or use case? Please describe. After editing a record and sending to the server, I need to remove the dirty but just for that record not for the whole grid.

Describe the solution you'd like A method like resetDirtyCells(row|rowIdx)

Describe alternatives you've considered

resetFlagRow: function(rec) {
   var rowIdx = this.store.indexOf(rec),
      row = this.idsDom.rowByIndex(rowIdx),
      flagCls = 'is-dirty';

   Ext.each(row.querySelectorAll('ids-data-grid-cell.' + flagCls), function(cell) {
      cell.classList.remove(flagCls);
   });

   if (flagCls === 'is-dirty' && row.dirtyCells) {
      delete row.dirtyCells;
   }
}

fabiojpoli avatar Jul 12 '24 14:07 fabiojpoli