diff --git a/src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts b/src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts index 05f57d56b..563df7431 100644 --- a/src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts +++ b/src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts @@ -25,9 +25,9 @@ export class GridRowReorderComponent { const currRowIndex = this.getCurrentRowIndex(this.grid.rowList.toArray(), { x: event.clientX, y: event.clientY }); if (currRowIndex === -1) { return; } - this.grid.deleteRow(args.dragData.key); - this.data.splice(currRowIndex, 0, args.dragData.data); - this.data = [...this.data]; + const newData = this.data.filter(r => r.ID !== args.dragData.key); + newData.splice(currRowIndex, 0, args.dragData.data); + this.data = newData; } private getCurrentRowIndex(rowList: IgxRowDirective[], cursorPosition) {