Skip to content

Commit 3e9e785

Browse files
committed
chore(pivot): Use Array.flat() instead of flatten from utils
1 parent 968cba2 commit 3e9e785

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10431043
if (this.getDimensionType(dimension) === PivotDimensionType.Row) {
10441044
const relatedDims = PivotUtil.flatten([dimension]).map(x => x.memberName);
10451045
const content = this.rowDimensionContentCollection.filter(x => relatedDims.indexOf(x.dimension.memberName) !== -1);
1046-
const headers = flatten(content.map(x => x.headerGroups.toArray())).map(x => x.header.refInstance);
1046+
const headers = content.map(x => x.headerGroups.toArray()).flat().map(x => x.header && x.header.refInstance);
10471047
const autoWidth = this.getLargesContentWidth(headers);
10481048
dimension.width = autoWidth;
10491049
this.pipeTrigger++;

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"node_modules/@types"
1616
],
1717
"lib": [
18-
"es2017",
18+
"es2019",
1919
"dom"
2020
],
2121
"paths": {

0 commit comments

Comments
 (0)