Skip to content

fix(pivot): Fix infinite ResizeObserver loop in Pivot Grid when horizontal layout#17289

Open
mddragnev wants to merge 1 commit into
masterfrom
mdragnev/fix-17264
Open

fix(pivot): Fix infinite ResizeObserver loop in Pivot Grid when horizontal layout#17289
mddragnev wants to merge 1 commit into
masterfrom
mdragnev/fix-17264

Conversation

@mddragnev
Copy link
Copy Markdown
Member

Closes #17264

Description

When using horizontal row layout, the igxGridFor directive bound to the grouped row dimension data was comparing items by object reference. The pivotGridHorizontalRowGrouping pipe always produces new array references via cloneArray, so after each contentSizeChange event triggered regroupTrigger to increment and the pipe to rerun, the differ considered all items changed, causing _applyChanges() to touch the DOM, which triggered the contentObserver, which fired contentSizeChange again — creating an infinite loop.

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

@mddragnev mddragnev requested a review from MayaKirova May 21, 2026 14:20
Copilot AI review requested due to automatic review settings May 21, 2026 14:20
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

This PR fixes an infinite ResizeObserver/contentSizeChange feedback loop in the Pivot Grid when horizontal row layout is enabled, by ensuring the virtualized igxGridFor can track grouped row-dimension items stably across pipe re-executions.

Changes:

  • Adds a trackHorizontalRowGroup trackBy function in IgxPivotGridComponent keyed by the first record’s dataIndex.
  • Wires the trackBy into the horizontal row-dimensions igxGridFor via [igxForTrackBy] to prevent full re-diff/re-render on each regroup.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.component.ts Introduces a dedicated trackBy function for horizontal grouped row-dimension rendering.
projects/igniteui-angular/grids/pivot-grid/src/pivot-grid.component.html Applies the new trackBy to the igxGridFor that iterates horizontal row groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pivot Grid vertical scrollbar flickering when horizontal layout is applied

3 participants