fix(for-of): correct virtualized sizing for bordered lists - 22.0.x - #17495
Open
viktorkombov wants to merge 2 commits into
Open
fix(for-of): correct virtualized sizing for bordered lists - 22.0.x#17495viktorkombov wants to merge 2 commits into
viktorkombov wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes virtualization sizing edge-cases when borders are present, ensuring igxFor measurements include item borders (in addition to margins) and the Excel-style filtering list uses the correct inner viewport height so the last item isn’t clipped by container borders.
Changes:
- Update
IgxForOfDirectivenode size measurement to include element borders alongside margins. - Adjust Excel-style filtering list virtualization to use the list’s
clientHeight(content box) rather thanoffsetHeight(border box). - Add regression tests covering bordered item sizing (vertical/horizontal) and the Excel-style filtering viewport sizing.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/igniteui-angular/grids/grid/src/grid-filtering-ui.spec.ts | Adds a regression test asserting Excel-style filtering virtualization uses the list content height as its container size. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-search.component.ts | Switches virtualization containerSize measurement from offsetHeight to clientHeight to avoid border-induced clipping. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts | Updates virtual item sizing logic to include border widths in measured size. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts | Adds a unit test validating size calculations include both borders and margins for vertical and horizontal orientations. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
| expect(listItems.length).toBe(6, 'incorrect rendered list items count'); | ||
| }); | ||
|
|
||
| it('Should use the list content height for the virtual container size', async () => { |
Comment on lines
848
to
+852
| const dimension = this.igxForScrollOrientation === 'horizontal' ? | ||
| this.igxForSizePropName : 'height'; | ||
| const nodeSize = dimension === 'height' ? | ||
| rNode.clientHeight + this.getMargin(rNode, dimension): | ||
| rNode.clientWidth + this.getMargin(rNode, dimension); | ||
| rNode.clientHeight + this.getBorder(rNode, dimension) + this.getMargin(rNode, dimension): | ||
| rNode.clientWidth + this.getBorder(rNode, dimension) + this.getMargin(rNode, dimension); |
mddragnev
approved these changes
Aug 13, 2026
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 #17490
Description
Fixes virtualized list sizing when item and container borders are present.
igxFornow includes item borders alongside margins when measuring rendereditems. The Excel-style filtering list uses its inner client height as the
virtual viewport, preventing its own borders from clipping the final item with
the Fluent theme.
Adds regression coverage for vertical and horizontal item sizing and the
Excel-style filtering viewport.
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)