Skip to content

Commit c3324f6

Browse files
authored
Merge pull request #10739 from IgniteUI/mkirova/fix-10498
fix(pivot): Ensure that when columns are created for row dimensions w…
2 parents 77bbb70 + 58a84c3 commit c3324f6

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
315315
*/
316316
public dragRowID = null;
317317

318+
/**
319+
* @hidden @internal
320+
*/
321+
public get rootSummariesEnabled(): boolean {
322+
return false;
323+
}
324+
318325
protected _defaultExpandState = false;
319326
private _data;
320327
private _filteredData;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent {
120120
this.grid.setupColumns();
121121
this.grid.filteringService.clearFilter(col.memberName);
122122
this.grid.pipeTrigger++;
123-
this.grid.dimensionsChange.emit({ dimensions: this.grid.pivotConfiguration.columns, dimensionCollectionType: PivotDimensionType.Row });
123+
this.grid.dimensionsChange.emit({dimensions: this.grid.pivotConfiguration.columns, dimensionCollectionType: PivotDimensionType.Row});
124+
this.grid.reflow();
124125
}
125126

126127
public valueRemoved(event: IBaseChipEventArgs) {

projects/igniteui-angular/src/lib/grids/watch-changes.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ export function notifyChanges(repaint = false) {
7474

7575

7676
const originalSetter = propDesc ? propDesc.set : null;
77-
7877
propDesc.get = propDesc.get || (function(this) {
7978
return this[privateKey];
8079
});
@@ -83,15 +82,17 @@ export function notifyChanges(repaint = false) {
8382
if (originalSetter) {
8483
originalSetter.call(this, newValue);
8584
if (this.grid) {
86-
this.grid.notifyChanges(repaint);
85+
const shouldRepaint = this.grid.isPivot ? false : repaint;
86+
this.grid.notifyChanges(shouldRepaint);
8787
}
8888
} else {
8989
if (newValue === this[key]) {
9090
return;
9191
}
9292
this[privateKey] = newValue;
9393
if (this.grid) {
94-
this.grid.notifyChanges(repaint);
94+
const shouldRepaint = this.grid.isPivot ? false : repaint;
95+
this.grid.notifyChanges(shouldRepaint);
9596
}
9697
}
9798
};

src/app/pivot-grid-hierarchy/pivot-grid-hierarchy.sample.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
placeholder="Dimension(s)" searchPlaceholder="Search...">
77
</igx-combo>
88
</div>
9-
<igx-pivot-grid #grid1 [data]="origData" [pivotConfiguration]="pivotConfigHierarchy" (dimensionsChange)='dimensionChange($event)' [defaultExpandState]='true'>
9+
<igx-pivot-grid [displayDensity]='"compact"' #grid1 [data]="origData" [pivotConfiguration]="pivotConfigHierarchy" (dimensionsChange)='dimensionChange($event)' [defaultExpandState]='true'>
1010
</igx-pivot-grid>
1111

0 commit comments

Comments
 (0)