From c9d2144d417343803df8e9483dcf278742e71016 Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Thu, 11 Jun 2026 10:41:42 +0300 Subject: [PATCH 1/2] fix(grid-row-reorder): update row insertion logic during drag-and-drop --- src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 29070b8ed..4eb336f1a 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 @@ -27,7 +27,7 @@ export class GridRowReorderComponent { if (currRowIndex === -1) { return; } // remove the row that was dragged and place it onto its new location this.grid.deleteRow(args.dragData.key); - this.data.splice(currRowIndex, 0, args.dragData.data); + this.data = this.data.slice(0, currRowIndex).concat(args.dragData.data, this.data.slice(currRowIndex)); } private getCurrentRowIndex(rowList: IgxRowDirective[], cursorPosition) { From 8a7c43db518bdc1cc82f7a4fda40d5d4fb1ce081 Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Thu, 11 Jun 2026 15:56:55 +0300 Subject: [PATCH 2/2] fix(grid-row-reorder): improve row insertion logic during drag-and-drop --- src/app/grid/grid-row-reorder-sample/grid-row-reorder.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 4eb336f1a..7f32d7fd0 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; } - // remove the row that was dragged and place it onto its new location - this.grid.deleteRow(args.dragData.key); - this.data = this.data.slice(0, currRowIndex).concat(args.dragData.data, this.data.slice(currRowIndex)); + 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) {