Skip to content

Commit 02de3b5

Browse files
committed
chore(IgxCell): add comment that explain the fix for issue #6517
1 parent 4dcdb7e commit 02de3b5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

projects/igniteui-angular/src/lib/grids/cell.component.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,13 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
620620
if (this.editable && editMode && !this.row.deleted) {
621621
if (editableCell) {
622622
this.gridAPI.update_cell(editableCell, editableCell.editValue);
623+
/* This check is related with the following issue #6517:
624+
* when edit cell that belongs to a column which is sorted and press tab,
625+
* the next cell in edit mode is with wrong value /its context is not updated/;
626+
* So we reapply sorting before the next cell enters edit mode.
627+
* Also we need to keep the notifyChanges below, because of the current
628+
* change detection cycle when we have editing with enabled transactions
629+
*/
623630
if (this.grid.sortingExpressions.length && this.grid.sortingExpressions.indexOf(editableCell.column.field)) {
624631
this.grid.cdr.detectChanges();
625632
}

0 commit comments

Comments
 (0)