material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Change Header row Height

Open denis-sk opened this issue 7 years ago • 15 comments

Make it possible to change the header row height.

Now I do not know how to do it. I can change only header cell style.

denis-sk avatar May 08 '19 10:05 denis-sk

Hi @denis-sk You can use options.headerStyle to change header rowHeight.

image

mbrn avatar May 09 '19 04:05 mbrn

No. Header Style change th cell style, but tr style not changes.

image

denis-sk avatar May 10 '19 10:05 denis-sk

I will add cellStyle to options to effect all cells.

mbrn avatar May 12 '19 16:05 mbrn

Do you mean the cellstyle will be applied to the header cell and row cell? If yes, I think they should work independently of each other.

denis-sk avatar May 13 '19 09:05 denis-sk

No it will be applied to all cells(not headers)

mbrn avatar May 14 '19 04:05 mbrn

#1214 PR for passing cellStyle down to ColumnDef for options to take effect.

sshanzel avatar Oct 17 '19 05:10 sshanzel

Problem here is tr has a height of 56px so if cell height is smaller is does not matter. 56px is used.

sshaw avatar Nov 22 '19 19:11 sshaw

I found a solution for my use, I need to edit this property to change the size of the table header and table body: .MuiTableCell-root { height: 10px !important; padding: 0px !important; font-size: 0.7rem !important; }

.MuiButtonBase-root{ height: 10px !important; }

with this you can adjust for you

ghost avatar Jan 23 '20 17:01 ghost

I found a solution changing the paddingTop and paddingBottom on HeaderStyle

Forsaiken avatar Apr 17 '20 10:04 Forsaiken

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Jul 16 '20 10:07 stale[bot]

I found a solution for my use, I need to edit this property to change the size of the table header and table body: .MuiTableCell-root { height: 10px !important; padding: 0px !important; font-size: 0.7rem !important; }

.MuiButtonBase-root{ height: 10px !important; }

with this you can adjust for you

This seems to be hiding the footer as well

asok-mirror avatar Nov 19 '20 16:11 asok-mirror

The row height is not getting applied though I can see the height property at tr level. weird though!!

Any thoughts?

asok-mirror avatar Nov 19 '20 16:11 asok-mirror

height dose not work :( , have tried multiple solutions

solisadeqi avatar Dec 12 '21 12:12 solisadeqi

any fix for the issue?

yashaswinibprasad87 avatar Feb 08 '22 07:02 yashaswinibprasad87

Could use some help here as well if anyone has found a solution?

jason-zeiler-bayer avatar Feb 07 '24 22:02 jason-zeiler-bayer