Skip to content

fix(igxGrid): In case zone is already stable emit detect and emit chu…#17269

Open
MayaKirova wants to merge 2 commits into21.2.xfrom
mkirova/fix-17258-21.2.x
Open

fix(igxGrid): In case zone is already stable emit detect and emit chu…#17269
MayaKirova wants to merge 2 commits into21.2.xfrom
mkirova/fix-17258-21.2.x

Conversation

@MayaKirova
Copy link
Copy Markdown
Contributor

…nkLoad.

Closes #17258

Description

Motivation / Context

Type of Change (check all that apply):

  • Bug fix
  • New functionality
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (no functional changes)
  • Documentation
  • Demos
  • CI/CD
  • Tests
  • Changelog
  • Skills/Agents

Component(s) / Area(s) Affected:

How Has This Been Tested?

  • Unit tests
  • Manual testing
  • Automated e2e tests

Test Configuration:

  • Angular version:
  • Browser(s):
  • OS:

Screenshots / Recordings

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
  • Accessibility (ARIA, keyboard navigation, focus management) has been verified
    d

Copilot AI review requested due to automatic review settings May 8, 2026 14:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a virtualization/navigation edge case in IgxGrid where vertical scrolling can leave NgZone already stable, preventing the chunkLoad emission and causing keyboard navigation (arrow keys) to stop working after a vertical scroll.

Changes:

  • Refactored the vertical scroll stabilization logic into a reusable callback.
  • Added an NgZone.isStable fast-path to run detectChanges() and emit chunkLoad immediately when the zone is already stable.
  • Kept the existing zone.onStable.pipe(first()) path for non-stable cases.

Comment on lines +7775 to +7779
if (this.zone.isStable) {
this.cdr.detectChanges();
callback();
} else {
this.zone.onStable.pipe(first()).subscribe(callback);
Comment on lines +7775 to +7779
if (this.zone.isStable) {
this.cdr.detectChanges();
callback();
} else {
this.zone.onStable.pipe(first()).subscribe(callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants