Skip to content

Commit 7467a5a

Browse files
committed
refactor(grid): Update crudService begin method
1 parent cabb1a5 commit 7467a5a

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,23 +169,21 @@ export class IgxGridCRUDService {
169169
}
170170

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

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

0 commit comments

Comments
 (0)