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

rowStyle height does not work for anything under 49px in height

Open calebhypes opened this issue 7 years ago • 5 comments

Describe the bug rowStyle={ height: ''} does not work properly. If you set the height to anything under 49 pixels this fails to render properly.

To Reproduce Steps to reproduce the behavior:

  1. Create a new material table or go to https://material-table.com/#/docs/features/styling
  2. Add options={{ rowStyle: { height: '10px'}} in your table or the example table in the official docs
  3. See that the table row height does not change.

Expected behavior Previously this was working, if I set the row height to 10px it should apply that style.

Screenshots materialTableRowHeight

Desktop (please complete the following information):

  • OS: MacOS Mojave 10.14.4

  • Browser: Chrome

  • Version: 74.0.3729.169 (Official Build) (64-bit)

  • Browser: Firefox

  • Version: 66.0.5

Additional context There is nothing indicating that another style is overriding this rowStyle change, as shown in the screenshot provided.

calebhypes avatar Jun 10 '19 18:06 calebhypes

It requires 49px at least. But i will take a look at it to decrease minimum size.

mbrn avatar Jun 13 '19 07:06 mbrn

Hi @mbrn,

Thanks for taking up this enhancement. may I knw if there is any update about this issue? :)

arash-sadr avatar Oct 22 '19 05:10 arash-sadr

@mbrn, do you have some update related to the row height less the 49px ?

ghost avatar Jan 23 '20 16:01 ghost

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

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 Jun 30 '20 21:06 stale[bot]