Skip to content

fix(IgxGrid): Do not apply width constraint to groups.#17069

Open
MayaKirova wants to merge 2 commits intomasterfrom
mkirova/fix-17042-master
Open

fix(IgxGrid): Do not apply width constraint to groups.#17069
MayaKirova wants to merge 2 commits intomasterfrom
mkirova/fix-17042-master

Conversation

@MayaKirova
Copy link
Contributor

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):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

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

Copilot AI review requested due to automatic review settings March 20, 2026 17:03
@MayaKirova MayaKirova added ❌ status: awaiting-test PRs awaiting manual verification 20.2.x labels Mar 20, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a regression in IgxGrid where collapsed column groups could be incorrectly constrained to the grid’s default minimum column width (e.g. 136px), leading to header/cell misalignment when child columns have explicit widths.

Changes:

  • Adjust column sizing logic to avoid applying the default min-width constraint to column groups and to constrain “gap-filled” sizes using the referenced child column.
  • Add a targeted unit test reproducing the “collapsed group + explicit child widths” scenario from #17042.
  • Update the demo/sample markup to include an explicit width on a visibleWhenCollapsed child column (to better match the reported scenario).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
projects/igniteui-angular/grids/core/src/columns/column.component.ts Prevents default min-width constraint from being applied to column groups; constrains computed sizes using the appropriate column reference.
projects/igniteui-angular/grids/grid/src/grid-collapsible-columns.spec.ts Adds a regression test asserting collapsed group width matches the sum of visible child widths.
projects/igniteui-angular/test-utils/grid-samples.spec.ts Introduces a new standalone test component used by the new regression test.
src/app/grid-column-groups/grid-column-groups.sample.html Tweaks the sample to set an explicit width on a collapsed-visible column.

expect(spans.length).toBe(2);
});

fit('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => {
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

Focused spec fit(...) is committed; this will cause the test runner to execute only this spec and skip the rest of the suite in CI. Replace fit with a regular it (or remove focus) so the full suite runs.

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)', () => {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

20.2.x grid ❌ status: awaiting-test PRs awaiting manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IgxGrid: headers & cells misalignment when there are column groups and columns have widths set

3 participants