fix(for-of): correct virtualized sizing for bordered lists - #17496
Open
viktorkombov wants to merge 3 commits into
Open
fix(for-of): correct virtualized sizing for bordered lists#17496viktorkombov wants to merge 3 commits into
viktorkombov wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes virtualized sizing edge-cases where borders cause incorrect measurements/clipping, affecting both igxFor item measurement and the Excel-style filtering list viewport sizing in grids.
Changes:
- Updates
IgxForOfDirectivenode size calculation to account for item borders in addition to margins. - Adjusts Excel-style filtering search virtualization to size the virtual viewport by the list’s
clientHeight(content box) instead ofoffsetHeight. - Adds regression tests covering bordered item sizing and Excel-style filtering container 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 for Excel-style filtering virtual container sizing. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-search.component.ts | Uses clientHeight for virtualization container sizing to avoid border-related clipping. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.ts | Includes borders in igxFor rendered item size measurement. |
| projects/igniteui-angular/directives/src/directives/for-of/for_of.directive.spec.ts | Adds tests ensuring borders + margins are included in item size calculations. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+4094
to
+4099
| const searchComponent = fix.debugElement.query(By.css('igx-excel-style-search')).componentInstance; | ||
| const listElement = searchComponent.list.element.nativeElement as HTMLElement; | ||
|
|
||
| expect(listElement.offsetHeight).toBeGreaterThan(listElement.clientHeight); | ||
| expect(searchComponent.containerSize).toBe(listElement.clientHeight); | ||
| }); |
| 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): |
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)