MatBlazor icon indicating copy to clipboard operation
MatBlazor copied to clipboard

MatTableHeader - bug when setting column widths

Open ldcroberts opened this issue 4 years ago • 2 comments

When I try to set the column widths sometimes it creates a huge white space on the right side of the table, and makes the table much narrower than the full 100% width its supposed to be - its very problematic.

Example here: https://blazorfiddle.com/s/60ed0fn6

I'm setting the widths directing in the TH tag - e.g. <th style="width: 70%">

I've played with widths and sizes and sometimes have to change to use 69% instead of 70% and things like that to get around it, but other times I can't find a satisfactory way around it

ldcroberts avatar Jan 12 '21 20:01 ldcroberts

@ldcroberts , Thanks for reporting! We are always looking for contributors if you want to open a PR and tackle this. 🙂

Christian-Oleson avatar Mar 08 '21 00:03 Christian-Oleson

It might be .mdc-table:display is set to inline-block sometime. But still don't know why. It appears randomly. So I rewrite .mdc-table:diplay to table, the table looks like correct.

.mdc-table {
  display: table !important;
}

image Before: image

After: image

charset avatar Sep 09 '23 05:09 charset