Skip to content

Commit 2eb8a68

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Remove unused code.
1 parent a4daa34 commit 2eb8a68

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

projects/igniteui-angular/src/lib/grids/pivot-grid/pivot-header-row.component.ts

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,13 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
281281
return;
282282
}
283283
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+
296291
const isDraggedFromColumn = !!this.grid.pivotConfiguration.columns?.find(x => x && x.memberName === dragId);
297292
if (isDraggedFromColumn) {
298293
// columns have changed.

0 commit comments

Comments
 (0)