Skip to content

fix(for-of): correct virtualized sizing for bordered lists - 22.0.x - #17495

Open
viktorkombov wants to merge 2 commits into
22.0.xfrom
vkombov/fix-17493-22.0.x
Open

fix(for-of): correct virtualized sizing for bordered lists - 22.0.x#17495
viktorkombov wants to merge 2 commits into
22.0.xfrom
vkombov/fix-17493-22.0.x

Conversation

@viktorkombov

@viktorkombov viktorkombov commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes #17490

Description

Fixes virtualized list sizing when item and container borders are present.

igxFor now includes item borders alongside margins when measuring rendered
items. 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):

  • 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 IgxForOfDirective node size measurement to include element borders alongside margins.
  • Adjust Excel-style filtering list virtualization to use the list’s clientHeight (content box) rather than offsetHeight (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);
@viktorkombov
viktorkombov requested a review from mddragnev August 12, 2026 08:04
@mddragnev mddragnev added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Aug 13, 2026
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.

3 participants