Skip to content

Commit 677ddb0

Browse files
committed
chore(*): Reflow grid after generation of column hierarchy.
1 parent 3174297 commit 677ddb0

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
806806
);
807807
}
808808
columns = this.generateColumnHierarchy(fieldsMap, data);
809+
this.reflow();
809810
this._autoGeneratedCols = columns;
810811

811812
this.columnList.reset(columns);
@@ -889,7 +890,7 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
889890
}
890891
}
891892
});
892-
this.reflow();
893+
893894
return columns;
894895
}
895896

src/app/pivot-grid/pivot-grid.sample.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,16 @@ export class PivotGridSampleComponent {
2424

2525
public pivotConfigHierarchy: IPivotConfiguration = {
2626
columns: [
27-
2827
{
2928
memberName: 'Country',
3029
enabled: true
3130
}
32-
]
33-
,
34-
rows: [{
35-
memberName: 'City',
36-
enabled: true
37-
},
31+
],
32+
rows: [
33+
{
34+
memberName: 'City',
35+
enabled: true
36+
},
3837
new IgxPivotDateDimension(
3938
{
4039
memberName: 'Date',
@@ -43,17 +42,18 @@ export class PivotGridSampleComponent {
4342
{
4443
months: false
4544
}
46-
), {
47-
memberFunction: () => 'All',
48-
memberName: 'AllProducts',
49-
enabled: true,
50-
childLevel:
51-
{
45+
),
46+
{
47+
memberFunction: () => 'All',
48+
memberName: 'AllProducts',
49+
enabled: true,
50+
childLevel: {
5251
memberFunction: (data) => data.ProductCategory,
5352
memberName: 'ProductCategory',
5453
enabled: true
5554
}
56-
}],
55+
}
56+
],
5757
values: [
5858
{
5959
member: 'UnitsSold',

0 commit comments

Comments
 (0)