File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
projects/igniteui-angular/src/lib/grids/pivot-grid Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -281,18 +281,13 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
281
281
return ;
282
282
}
283
283
const dimType = this . getDimensionsType ( dim ) ;
284
- const currentDimChild = currentDim . find ( x => x && x . memberName === dragId ) ;
285
- if ( currentDimChild ) {
286
- currentDimChild . enabled = true ;
287
- const dragChipIndex = currentDim . indexOf ( currentDimChild ) ;
288
- currentDim . splice ( dragChipIndex , 1 ) ;
289
- currentDim . splice ( dragChipIndex > chipIndex ? targetIndex : targetIndex - 1 , 0 , currentDimChild ) ;
290
- } else {
291
- const prevDimensionCollection = this . getDimensionsByType ( dimType ) ;
292
- // delete from previous dimension collection and add to current.
293
- prevDimensionCollection . splice ( prevDimensionCollection . indexOf ( dim ) , 1 ) ;
294
- currentDim . splice ( targetIndex , 0 , dim ) ;
295
- }
284
+
285
+ // Dragged chip from a different dimension to the current one.
286
+ const prevDimensionCollection = this . getDimensionsByType ( dimType ) ;
287
+ // delete from previous dimension collection and add to current.
288
+ prevDimensionCollection . splice ( prevDimensionCollection . indexOf ( dim ) , 1 ) ;
289
+ currentDim . splice ( targetIndex , 0 , dim ) ;
290
+
296
291
const isDraggedFromColumn = ! ! this . grid . pivotConfiguration . columns ?. find ( x => x && x . memberName === dragId ) ;
297
292
if ( isDraggedFromColumn ) {
298
293
// columns have changed.
You can’t perform that action at this time.
0 commit comments