Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Prepending during horizontal viewport growth can leave display offsets stale in both directives.
1 open issue
What changed in this PR
Addresses #17575 by preserving virtualized row order when a scrolled grid’s viewport grows.
Changes:
- Prepends preceding items when expanding a chunk at the data boundary.
- Adds grid and directive regression tests for viewport shrink/grow cycles.
| File | Description |
|---|---|
| projects/igniteui-angular/grids/grid/src/grid.component.spec.ts | Tests grid row ordering after resizing. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts | Updates both directives to prepend boundary items. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts | Tests virtualized item ordering after resizing. |
Review effort: Balanced
Comment on lines
+1511
to
+1512
| elemIndex = --this.state.startIndex!; | ||
| prepend = true; |
Member
There was a problem hiding this comment.
@teodosiah ,enabled auto-merge but it won't happen until this comment is resolved one way or another. If you think it's wrong, you can resolve it with an explanation.
mddragnev
requested changes
Oct 26, 2026
mddragnev
left a comment
Member
There was a problem hiding this comment.
We might need a changelog entry for a bug fix.
- Sync the offset after a container resize through _updateScrollOffset, after the scrollbar size is recalculated, and make it RTL aware. - Extract the shared addLastElem logic into insertChunkElem with a createTemplateContext override for the grid directive. - Add LTR/RTL tests for the offset after igxForOf changes. - Add a changelog entry for #17575. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mddragnev
requested changes
Oct 28, 2026
- Use the isRTL getter in _updateScrollOffset instead of the scroll sign. - Drop @hidden from the protected insertChunkElem. - Grow the viewport without clamping the scroll position in the vertical test and assert the rows order and offset without re-scrolling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mddragnev
approved these changes
Oct 29, 2026
ChronosSF
enabled auto-merge (squash)
October 30, 2026 17:24
This branch has not been deployed
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 #17575
Description
Motivation / Context
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)