Skip to content

fix(for-of): correct virtualized sizing for bordered lists - #17496

Open
viktorkombov wants to merge 3 commits into
21.2.xfrom
vkombov/fix-17493-21.2.x
Open

fix(for-of): correct virtualized sizing for bordered lists#17496
viktorkombov wants to merge 3 commits into
21.2.xfrom
vkombov/fix-17493-21.2.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 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 IgxForOfDirective node 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 of offsetHeight.
  • 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 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