Skip to content

Commit a3e18b9

Browse files
authored
Merge branch 'master' into mkirova/fix-6411-9.0.x
2 parents 169d55f + 8746d4b commit a3e18b9

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
498498
this.onPagingDone.emit({ previous: this._page, current: val });
499499
this._page = val;
500500
this.pageChange.emit(this._page);
501+
this.navigateTo(0);
501502
this.notifyChanges();
502503
}
503504

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,12 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
407407
ngAfterContentInit() {
408408
this.updateColumnList(false);
409409
this.childLayoutKeys = this.parent ?
410-
this.parentIsland.children.map((item) => item.key) :
411-
this.childLayoutKeys = this.childLayoutList.map((item) => item.key);
410+
this.parentIsland.children.map((item) => item.key) :
411+
this.childLayoutKeys = this.childLayoutList.map((item) => item.key);
412412
this.childLayoutList.notifyOnChanges();
413-
this.childLayoutList.changes.pipe(takeUntil(this.destroy$))
414-
.subscribe(() => this.onRowIslandChange());
413+
this.childLayoutList.changes.pipe(takeUntil(this.destroy$)).subscribe(() =>
414+
this.onRowIslandChange()
415+
);
415416
super.ngAfterContentInit();
416417
}
417418

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ViewChild } from '@angular/core';
1+
import { Component, ViewChild, ChangeDetectorRef } from '@angular/core';
22
import {
33
IgxRowIslandComponent,
44
IgxHierarchicalGridComponent,
@@ -30,7 +30,7 @@ export class HierarchicalGridSampleComponent {
3030
@ViewChild('hGrid', { static: true })
3131
hGrid: IgxHierarchicalGridComponent;
3232

33-
constructor() {
33+
constructor(private cdr: ChangeDetectorRef) {
3434
// this.localData.push({ ID: -1, Name: ''});
3535
// for (let i = 0; i < 10000; i++) {
3636
// const prods = [];
@@ -54,6 +54,10 @@ export class HierarchicalGridSampleComponent {
5454
this.localData[2].childData[1].hasChild = false;
5555
}
5656

57+
ngAfterViewInit() {
58+
this.cdr.detectChanges();
59+
}
60+
5761
generateData(count: number, level: number) {
5862
const prods = [];
5963
const currLevel = level;

0 commit comments

Comments
 (0)