Skip to content

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

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

fix(IgxGrid): Do not apply width constraint to groups.#17071
MayaKirova wants to merge 2 commits into20.1.xfrom
mkirova/fix-17042-20.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

@MayaKirova MayaKirova added ❌ status: awaiting-test PRs awaiting manual verification grid labels Mar 20, 2026
Copilot AI review requested due to automatic review settings March 20, 2026 17:11
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 layout issue where collapsed column groups were incorrectly constrained by the default minimum column width, leading to header/cell misalignment when explicit child widths are used.

Changes:

  • Adjust column size computation so default min-width constraint is not applied to column groups.
  • Add a new grid test sample component representing a collapsible group with explicit child widths.
  • Add a regression test ensuring a collapsed group’s calculated width matches the visible child column width.

Reviewed changes

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

File Description
projects/igniteui-angular/src/lib/test-utils/grid-samples.spec.ts Adds a standalone test component with a collapsed group whose visible child has an explicit width.
projects/igniteui-angular/src/lib/grids/grid/grid-collapsible-columns.spec.ts Adds a regression test for #17042 verifying group width isn’t forced to the default min width.
projects/igniteui-angular/src/lib/grids/columns/column.component.ts Updates constrained-width logic to avoid applying default min width to column groups and uses the correct constraint target when filling child column sizes.

Comment on lines +622 to +623
it('should not constrain collapsed column group width by default min width when children have explicit widths (#17042)', () => {
const fix = TestBed.createComponent(CollapsibleGroupWithExplicitChildWidthsComponent);
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 this spec and cause the rest of the suite to be skipped in CI/local runs. Replace fit with it (or remove focus) so the full test suite executes.

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