fix(IgxGrid): Do not apply width constraint to groups.#17070
Open
MayaKirova wants to merge 2 commits into21.1.xfrom
Open
fix(IgxGrid): Do not apply width constraint to groups.#17070MayaKirova wants to merge 2 commits into21.1.xfrom
MayaKirova wants to merge 2 commits into21.1.xfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes an IgxGrid column sizing edge case where collapsed column groups were being constrained by the grid’s default minimum column width, causing header/cell misalignment when child columns have explicit widths (per #17042).
Changes:
- Update column width constraint logic to avoid applying the default min width constraint to column groups.
- Adjust multi-row layout sizing gap-filling to apply constraints based on the referenced child column rather than the parent.
- Add a regression test covering collapsed groups with explicit child widths; update the sample to include an explicit child width.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/app/grid-column-groups/grid-column-groups.sample.html | Updates the sample markup to include an explicit column width and additional columns for repro scenarios. |
| projects/igniteui-angular/test-utils/grid-samples.spec.ts | Adds a dedicated test component for the collapsed-group-with-explicit-widths scenario. |
| projects/igniteui-angular/grids/grid/src/grid-collapsible-columns.spec.ts | Adds a regression test asserting group width matches visible child width when collapsed. |
| projects/igniteui-angular/grids/core/src/columns/column.component.ts | Prevents default min width constraint from being applied to column groups; uses referenced column constraints when filling size gaps. |
| expect(spans.length).toBe(2); | ||
| }); | ||
|
|
||
| fit('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => { |
There was a problem hiding this comment.
The test is declared with fit(...), which will focus the spec and skip the rest of the suite in Jasmine/Karma. This will break CI expectations and can hide other failing tests. Change it back to it(...) (or remove focus) before merging.
Suggested change
| fit('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => { | |
| it('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => { |
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 #17042
No need to apply default width constraint (136px) to groups, as individual child column already apply it.
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)