Skip to content

Commit 5f47445

Browse files
authored
Merge pull request #5466 from IgniteUI/mvenkov/same-row-by-row-id
Revert sameRow check to use rowID
2 parents 36dba1d + 9bc7776 commit 5f47445

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

projects/igniteui-angular/src/lib/core/grid-selection.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ export class IgxGridCRUDService {
105105
return new IgxRow(cell.id.rowID, cell.rowIndex, cell.rowData);
106106
}
107107

108-
sameRow(rowIndex): boolean {
109-
return this.row && this.row.index === rowIndex;
108+
sameRow(rowID): boolean {
109+
return this.row && this.row.id === rowID;
110110
}
111111

112112
sameCell(cell: IgxCell): boolean {
@@ -175,7 +175,7 @@ export class IgxGridCRUDService {
175175
return;
176176
}
177177

178-
if (this.row && !this.sameRow(this.cell.rowIndex)) {
178+
if (this.row && !this.sameRow(this.cell.id.rowID)) {
179179
this.grid.endEdit(true);
180180
this.cell = this.createCell(cell);
181181
this.beginRowEdit();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ export class IgxGridCellComponent implements OnInit, OnChanges, OnDestroy {
594594
return;
595595
}
596596

597-
if (editableCell && crud.sameRow(this.rowIndex)) {
597+
if (editableCell && crud.sameRow(this.cellID.rowID)) {
598598
this.gridAPI.submit_value();
599-
} else if (editMode && !crud.sameRow(this.rowIndex)) {
599+
} else if (editMode && !crud.sameRow(this.cellID.rowID)) {
600600
this.grid.endEdit(true);
601601
}
602602
}

0 commit comments

Comments
 (0)