Skip to content

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

Open
MayaKirova wants to merge 2 commits into21.1.xfrom
mkirova/fix-17042-21.1.x
Open

fix(IgxGrid): Do not apply width constraint to groups.#17070
MayaKirova wants to merge 2 commits into21.1.xfrom
mkirova/fix-17042-21.1.x

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

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants