Skip to content

Commit 59215a8

Browse files
committed
refactor(grid): Update crudService begin method
1 parent 0d82645 commit 59215a8

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

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

+7-9
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,21 @@ export class IgxGridCRUDService {
168168
}
169169

170170
if (this.rowEditing) {
171-
if (!this.row) {
172-
this.cell = this.createCell(cell);
173-
this.cell.primaryKey = this.primaryKey;
171+
if (this.row && !this.sameRow(newCell.id.rowID)) {
172+
this.grid.endEdit(true);
173+
this.cell = newCell;
174174
this.beginRowEdit();
175175
return;
176176
}
177177

178-
if (this.row && !this.sameRow(newCell.id.rowID)) {
179-
this.grid.endEdit(true);
180-
this.cell = this.createCell(cell);
181-
this.cell.primaryKey = this.primaryKey;
178+
this.cell = newCell;
179+
180+
if (!this.row) {
182181
this.beginRowEdit();
183182
return;
184183
}
185184
} else {
186-
this.cell = this.createCell(cell);
187-
this.cell.primaryKey = this.primaryKey;
185+
this.cell = newCell;
188186
this.endRowEdit();
189187
}
190188
}

0 commit comments

Comments
 (0)