File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
projects/igniteui-angular/src/lib/grids Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -599,6 +599,13 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
599599 */
600600 public rowDragging = false ;
601601
602+ /**
603+ * Gets the row ID that is being dragged.
604+ * @remarks
605+ * The row ID is either the primaryKey value or the data record instance.
606+ */
607+ public dragRowID = null ;
608+
602609
603610 /**
604611 * Gets/Sets whether the rows are editable.
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export class IgxRowDragDirective extends IgxDragDirective implements OnDestroy {
6060 this . _clicked = false ;
6161 return ;
6262 }
63- this . row . dragging = true ;
63+ this . row . grid . dragRowID = this . row . rowID ;
6464 this . row . grid . rowDragging = true ;
6565 this . row . grid . markForCheck ( ) ;
6666
@@ -143,7 +143,7 @@ export class IgxRowDragDirective extends IgxDragDirective implements OnDestroy {
143143
144144 private endDragging ( ) {
145145 this . onTransitionEnd ( null ) ;
146- this . row . dragging = false ;
146+ this . row . grid . dragRowID = null ;
147147 this . row . grid . rowDragging = false ;
148148 this . row . grid . markForCheck ( ) ;
149149 this . _unsubscribe ( ) ;
Original file line number Diff line number Diff line change @@ -248,7 +248,9 @@ export class IgxRowDirective<T extends IgxGridBaseDirective & GridType> implemen
248248 /**
249249 * @hidden
250250 */
251- public dragging = false ;
251+ public get dragging ( ) {
252+ return this . grid . dragRowID === this . rowID ;
253+ }
252254
253255 // TODO: Refactor
254256 public get inEditMode ( ) : boolean {
You can’t perform that action at this time.
0 commit comments