SamProf / MatBlazor

Material Design components for Blazor and Razor Components
http://www.matblazor.com
MIT License
2.84k stars 386 forks source link

MatTableHeader - bug when setting column widths #827

Open ldcroberts opened 3 years ago

ldcroberts commented 3 years ago

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

Christian-Oleson commented 3 years ago

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

charset commented 1 year ago

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