Repository navigation
fix(pivot-grid): highlight the row header that Home and End scroll to - #17939
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the horizontal-layout row-header highlighting fix.
No open issues 🎉
What changed in this PR
Fixes Pivot Grid issue #17932 so horizontal-layout keyboard navigation highlights the destination row header rather than leaving the previous header highlighted.
Changes:
- Notifies change detection after updating the active node in horizontal layouts.
- Adds a zoneless regression test for highlighting after End and Home navigation.
- Documents the fix in the changelog.
| File | Description |
|---|---|
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.spec.ts |
Adds regression coverage for End and Home row-header highlighting. |
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid-navigation.service.ts |
Requests a rendering update after horizontal-layout navigation changes the active node. |
CHANGELOG.md |
Records the corrected highlighting behavior and links issue #17932. |
Review effort: Balanced
mddragnev
left a comment
There was a problem hiding this comment.
The root cause is right. However, I'd rather remove that call than add a notifyChanges() to undo its side effect.
It's there because, for jumps of more than 4 rows (MAX_PERF_SCROLL_DIFF), the row dimension igxGridFor only reassigns the row contexts and calls markForCheck(). The rows render on the next tick, but gridScroll fires before that tick, so the lookup saw stale rows. The grid emits verticalScrollContainer.chunkLoad after that render, which is what the base grid navigation already waits on (performVerticalScrollToCell). If we wait on chunkLoad, the rows are current without forcing a render. The notifyChanges() after setActiveNode() is still needed, because navigation now resumes after that render and activeNode is mutated in place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Agreed, waiting on |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #17932
Description
In the horizontal row layout, a key press that scrolls to another row dimension header, such as
HomeorEnd, now highlights that header. Before, the header that was active before the key press stayed highlighted.Motivation / Context
Regression from #17699 (22.2.1):
scrollToNextHorizontalDimRow()callsdetectChanges()after the scroll so that the new rows can be looked up, and that renders the row headers beforesetActiveNode()changes the active node. Nothing marked the grid for check after that, so the headers kept the old highlight.handleNavigation()now callsnotifyChanges()after it sets the active node in the horizontal layout.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Pivot Grid
How Has This Been Tested?
A new zoneless spec in
pivot-grid.spec.tssets up a horizontal layout like the Pivot Grid Layout sample, presses End and Home with real key events and checks the highlighted row header (fails without the fix). Thepivot-grid.spec.tsandpivot-grid-keyboard-nav.spec.tsspecs pass. Thepivot-noopdev demo with the sample's row configuration shows the bug without the fix and the right highlight with it.Test Configuration:
Screenshots / Recordings
The issue shows the actual and the expected result.
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)🤖 Generated with Claude Code