From d7459b30c3b036a837726ac264c24626b24593aa Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Fri, 6 Nov 2026 20:16:42 +0200 Subject: [PATCH 1/3] fix(pivot-grid): highlight the row header that Home and End scroll to Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + .../src/pivot-grid-navigation.service.ts | 4 +- .../grids/pivot-grid/src/pivot-grid.spec.ts | 47 ++++++++++++++++++- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b3d10e190b..44b2c385e03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -119,6 +119,7 @@ All notable changes for each version of this project will be documented in this - Setting `data` before the grid is initialized while `autoGenerate` is enabled no longer throws an error. In Ignite UI for Web Components this happened when `data` was set on `igc-tree-grid` before the element was attached to the page. - `IgxPivotGridComponent` - Autosizing a column now fits its content, instead of keeping its current width. + - In the horizontal row layout, a key press that scrolls to another row dimension header, such as `Home` or `End`, now highlights that header. Previously the header that was active before the key press stayed highlighted (#17932). - Ignite UI for Web Components grids - Writable properties that are not inputs, such as `selected` of `igc-column` and `totalPages` of `igc-paginator`, are now applied when set on the element. Previously the value was ignored and an `NG0303` error was logged. - The deprecated `getFilterFactory` method is now available on `igc-grid`, as intended for backwards compatibility. diff --git a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts index 4d2d586815d..ff9a8659b25 100644 --- a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts +++ b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts @@ -114,7 +114,9 @@ export class IgxPivotGridNavigationService extends IgxGridNavigationService { } this.setActiveNode(newActiveNode); - if (!this.grid.hasHorizontalLayout && verticalContainer.isIndexOutsideView(newActiveNode.row)) { + if (this.grid.hasHorizontalLayout) { + this.grid.notifyChanges(); + } else if (verticalContainer.isIndexOutsideView(newActiveNode.row)) { verticalContainer.scrollTo(newActiveNode.row); } } else { diff --git a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts index 1b1495e3262..713d4047a7f 100644 --- a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts +++ b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts @@ -1,7 +1,8 @@ -import { SimpleChange } from '@angular/core'; +import { provideZonelessChangeDetection, SimpleChange } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { firstValueFrom } from 'rxjs'; import { ColumnPinningPosition, FilteringExpressionsTree, @@ -4664,6 +4665,50 @@ describe('IgxPivotGrid #pivotGrid', () => { }); }); + describe('IgxPivotGrid Horizontal Layout zoneless #pivotGrid', () => { + beforeEach(() => { + TestBed.configureTestingModule({ providers: [provideZonelessChangeDetection()] }); + }); + + it('should highlight the row dimension header that End and Home scroll to.', async () => { + const fixture = TestBed.createComponent(IgxPivotGridTestComplexHierarchyComponent); + fixture.detectChanges(); + const pivotGrid = fixture.componentInstance.pivotGrid; + pivotGrid.pivotUI = { showRowHeaders: true, rowLayout: PivotRowLayoutType.Horizontal }; + pivotGrid.data = Array.from({ length: 40 }, (_, i) => ({ + ProductCategory: i % 2 ? 'Bikes' : 'Clothing', City: `City ${i}`, Country: 'Bulgaria', Date: '01/01/2012', UnitsSold: i + })); + pivotGrid.pivotConfiguration.rows = [{ + memberName: 'AllProducts', memberFunction: () => 'All Products', enabled: true, horizontalSummary: true, + childLevel: { memberName: 'ProductCategory', enabled: true, horizontalSummary: true, childLevel: { memberName: 'City', enabled: true } } + }]; + pivotGrid.pipeTrigger++; + fixture.detectChanges(); + await fixture.whenStable(); + + const headers = () => fixture.debugElement.queryAll(By.directive(IgxPivotRowDimensionHeaderComponent)); + const activeHeaders = () => headers() + .filter(x => x.parent.nativeElement.classList.contains('igx-grid-th--active')) + .map(x => x.componentInstance.column.header); + const container = fixture.debugElement.query(By.css('.igx-grid__tbody-pivot-mrl-dimension')).nativeElement; + const pressKey = async (key: string) => { + const activeNodeChanged = firstValueFrom(pivotGrid.activeNodeChange); + UIInteractions.triggerKeyDownEvtUponElem(key, container); + await activeNodeChanged; + await fixture.whenStable(); + }; + + UIInteractions.simulateClickAndSelectEvent(headers().find(x => x.componentInstance.column.header === 'All Products')); + await fixture.whenStable(); + + await pressKey('End'); + expect(activeHeaders()).toEqual(['All Products Total']); + + await pressKey('Home'); + expect(activeHeaders()).toEqual(['All Products']); + }); + }); + describe('Template directives #pivotGrid', () => { let fixture: ComponentFixture; From c731b86cb35f2cc1395881ae8b22a40929d975d9 Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Tue, 17 Nov 2026 14:04:20 +0200 Subject: [PATCH 2/3] refactor(pivot-grid): wait for chunkLoad instead of forcing a render Co-Authored-By: Claude Opus 5.5 --- .../grids/pivot-grid/src/pivot-grid-navigation.service.ts | 4 +--- .../igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts index ff9a8659b25..976b30f0e69 100644 --- a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts +++ b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts @@ -387,13 +387,11 @@ export class IgxPivotGridNavigationService extends IgxGridNavigationService { if (verticalContainer.isIndexOutsideView(nextDataViewIndex)) { verticalContainer.scrollTo(nextDataViewIndex); await new Promise((resolve) => { - this.grid.gridScroll.pipe(take(1), timeout({ first: 10000 })).subscribe({ + verticalContainer.chunkLoad.pipe(take(1), timeout({ first: 10000 })).subscribe({ next: (value) => resolve(value), error: (err) => resolve(err) }); }); - // Large scroll jumps only reassign the row contexts, so update the row dimension rows before looking them up. - this.grid.cdr.detectChanges(); } } diff --git a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts index 713d4047a7f..bdf19767cd3 100644 --- a/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts +++ b/projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts @@ -4584,6 +4584,7 @@ describe('IgxPivotGrid #pivotGrid', () => { }); it("should scroll to the row dimension cells outside of the view.", async () => { + fixture.autoDetectChanges(); pivotGrid.data = Array.from({ length: 30 }, (_, i) => ({ ProductCategory: 'Clothing', UnitPrice: 10, SellerName: `Seller ${i}`, Country: 'Bulgaria', City: `City ${i}`, Date: '01/01/2012', UnitsSold: i @@ -4622,6 +4623,7 @@ describe('IgxPivotGrid #pivotGrid', () => { }); it("should jump to the first and last row dimension cells outside of the view.", async () => { + fixture.autoDetectChanges(); pivotGrid.data = Array.from({ length: 30 }, (_, i) => ({ ProductCategory: 'Clothing', UnitPrice: 10, SellerName: `Seller ${i}`, Country: 'Bulgaria', City: `City ${i}`, Date: '01/01/2012', UnitsSold: i From 1a131dd649fbe71f96bff1985cee51f3802dc117 Mon Sep 17 00:00:00 2001 From: Viktor Kombov Date: Wed, 18 Nov 2026 13:38:12 +0200 Subject: [PATCH 3/3] docs(changelog): move the pivot grid Home and End entry to 22.3.1 Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4785cc3b08b..f3f72360ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes for each version of this project will be documented in this file. +## 22.3.1 + +### Bug Fixes + +- `IgxPivotGridComponent` + - In the horizontal row layout, a key press that scrolls to another row dimension header, such as `Home` or `End`, now highlights that header. Previously the header that was active before the key press stayed highlighted (#17932). + ## 22.3.0 ### General @@ -138,7 +145,6 @@ All notable changes for each version of this project will be documented in this - Setting `data` before the grid is initialized while `autoGenerate` is enabled no longer throws an error. In Ignite UI for Web Components this happened when `data` was set on `igc-tree-grid` before the element was attached to the page. - `IgxPivotGridComponent` - Autosizing a column now fits its content, instead of keeping its current width. - - In the horizontal row layout, a key press that scrolls to another row dimension header, such as `Home` or `End`, now highlights that header. Previously the header that was active before the key press stayed highlighted (#17932). - Ignite UI for Web Components grids - Writable properties that are not inputs, such as `selected` of `igc-column` and `totalPages` of `igc-paginator`, are now applied when set on the element. Previously the value was ignored and an `NG0303` error was logged. - The deprecated `getFilterFactory` method is now available on `igc-grid`, as intended for backwards compatibility.