fix(pivot): Fix infinite ResizeObserver loop in Pivot Grid when horizontal layout#17289
Open
mddragnev wants to merge 1 commit into
Open
fix(pivot): Fix infinite ResizeObserver loop in Pivot Grid when horizontal layout#17289mddragnev wants to merge 1 commit into
mddragnev wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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
trackHorizontalRowGrouptrackBy function inIgxPivotGridComponentkeyed by the first record’sdataIndex. - Wires the trackBy into the horizontal row-dimensions
igxGridForvia[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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17264
Description
When using horizontal row layout, the
igxGridFordirective bound to the grouped row dimension data was comparing items by object reference. ThepivotGridHorizontalRowGroupingpipe always produces new array references viacloneArray, so after eachcontentSizeChangeevent triggeredregroupTriggerto increment and the pipe to rerun, the differ considered all items changed, causing_applyChanges()to touch the DOM, which triggered thecontentObserver, which firedcontentSizeChangeagain — creating an infinite loop.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)