fix(grid): correct Excel filter virtual sizing - #17524
Open
viktorkombov wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes Excel-style filtering virtualization sizing in igx-grid by measuring the first rendered filter item and using that height to initialize the virtualizer’s item size, addressing scrollbar thumb lag and ensuring the last item is reachable (notably in Indigo). It also adjusts theme spacing/styling (Indigo + Fluent) to keep visual spacing inside the measured item size and adds unit coverage for the new sizing behavior.
Changes:
- Measure the first rendered Excel filter list item to derive a stable virtual
itemSizeinIgxExcelStyleSearchComponent. - Update Indigo styles to move spacing inside list items (so it’s included in virtualization measurements) and add a Fluent theme override for stable last-item height.
- Add a unit test asserting the measured rendered height is applied to the virtualizer, plus sample updates for the
igxFordemo.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/app/virtual-for-directive/virtual-for.sample.html | Adjusts virtualization demo markup to apply fixed heights on igx-list-item and sets size prop name for variable height example. |
| src/app/virtual-for-directive/virtual-for.sample.css | Ensures list item content fills the fixed-height host in the demo (height: 100%). |
| projects/igniteui-angular/grids/grid/src/grid-filtering-ui.spec.ts | Adds unit coverage verifying the measured DOM height is applied as the virtual itemSize. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/themes/shared/_indigo.scss | Moves spacing from container gap into list item padding so virtualization measures the correct height. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/themes/shared/_index.scss | Exposes the new Fluent shared theme via @forward. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/themes/shared/_fluent.scss | Adds Fluent-specific styling intended to stabilize last-item height during virtualization. |
| projects/igniteui-angular/grids/core/src/filtering/excel-style/excel-style-search.component.ts | Measures first rendered item height and uses it to drive the virtualizer’s item sizing. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1
to
+9
| @use 'igniteui-theming/sass/bem' as *; | ||
| @use '../../../../../../../core/src/core/styles/themes/scoping' as *; | ||
|
|
||
| @include themed-block(igx-excel-filter, fluent) { | ||
| // Keep the rendered list item height stable while virtual items are recycled. | ||
| .igx-list__item-base:last-of-type { | ||
| border-bottom: var(--border-width) solid transparent; | ||
| } | ||
| } |
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 #17513
Closes #17521
Description
Uses the first rendered Excel-style filter item to initialize the virtual item size. Theme-specific spacing is kept within the measured item, stabilizing the scrollbar and ensuring the last Indigo item is reachable.
Motivation / Context
The configured virtual item size could differ from the rendered height, causing scrollbar thumb lag. In the Indigo theme, the scroll range could also end before the last item was fully visible.
Type of Change (check all that apply):
Component(s) / Area(s) Affected:
How Has This Been Tested?
Added unit coverage verifying that the rendered item height is applied to the virtualizer. Manually verified the Indigo StackBlitz reproduction by dragging the scrollbar thumb to the bottom.
Test Configuration:
Screenshots / Recordings
See the recording attached to the related issue.
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdatesng updatemigrations for breaking changes (migrations guidelines)