Skip to content

bug: (Mat-Table) multiple header rows and sticky creates a gap between columns #25225

@Woogielicious

Description

@Woogielicious

Description

I created a table with multiple headers, after set some columns to sticky i had a gap between one of my columns, it happens if you use multiple headers and sticky together. Multiple Headers works fine without sticky and also sticky works fine without using multiple headers.

image

Reproduction

Steps to reproduce:

  1. Add a multiple Header to a table
  2. add sticky to first and second column

Happens in any Version, i tried 14 and also 7.3.1 from table examples

Angular VS: 14
https://stackblitz.com/edit/angular-gvv7uw?file=src%2Fapp%2Ftable-basic-example.html,src%2Fapp%2Ftable-basic-example.ts

Angular VS: 7.3.1
https://stackblitz.com/edit/angular-material-table-multiple-header-rows-icpxfz?file=app%2Ftable-basic-example.html

Expected Behavior

There should be no gap between the columns

Actual Behavior

You get a big gap between Columns if you set some columns to sticky.

Environment

  • Angular: 14.0, 7.3.1
  • CDK/Material: 14.0, 7.3.1
  • Browser(s): Chrome
  • Operating System (e.g. Windows):

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions