enterprise-wc
enterprise-wc copied to clipboard
IdsDataGrid: resetDirtyCells for specific row
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;
}
}