Skip to content

Commit e7829db

Browse files
MKirovaMKirova
authored andcommitted
chore(*): sync scrolls.
1 parent a1f1ea3 commit e7829db

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7007,7 +7007,7 @@ export abstract class IgxGridBaseDirective extends DisplayDensityBase implements
70077007
this.gridScroll.emit(args);
70087008
}
70097009

7010-
private horizontalScrollHandler(event) {
7010+
protected horizontalScrollHandler(event) {
70117011
const scrollLeft = event.target.scrollLeft;
70127012
this.headerContainer.onHScroll(scrollLeft);
70137013
this._horizontalForOfs.forEach(vfor => vfor.onHScroll(scrollLeft));

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,14 @@ export class IgxPivotGridComponent extends IgxGridBaseDirective implements OnIni
10301030
return this.values.length > 1;
10311031
}
10321032

1033+
protected horizontalScrollHandler(event) {
1034+
const scrollLeft = event.target.scrollLeft;
1035+
this.theadRow.headerContainers.forEach(headerForOf => {
1036+
headerForOf.onHScroll(scrollLeft);
1037+
});
1038+
super.horizontalScrollHandler(event);
1039+
}
1040+
10331041
/**
10341042
* @hidden
10351043
*/

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export class IgxPivotHeaderRowComponent extends IgxGridHeaderRowComponent implem
8282
public populateColumnDimensionsByLevel() {
8383
const res = [];
8484
const columnDimensions = this.grid.columnDimensions;
85+
if (columnDimensions.length === 0) {
86+
this.columnDimensionsByLevel = res;
87+
return;
88+
}
8589
const cols = this.unpinnedColumnCollection;
8690
let totalDepth = columnDimensions.map(x => PivotUtil.getDimensionDepth(x)).reduce((acc, val) => acc + val) + 1;
8791
if (this.grid.hasMultipleValues) {

0 commit comments

Comments
 (0)