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

Strange actions width

Open Wint57 opened this issue 6 years ago • 5 comments

Hello. First of all, I want to say thank you for your work. This is very handy table.

I try to set up fix actions width.

options={{
            paging: false,
            actionsCellStyle:{maxWidth: '55px',  },
          }}

But when I hide some columns, actions width is expanding. I have tried Opera and Chrome brousers - all the same. Is this a bug?

Wint57 avatar May 12 '20 13:05 Wint57

this bug stinks. I'm sure there's a better fix.. but if you want a fix today, you can put the following style block in index.html, or a css file. probably a bad idea, since this could have side effects in newer versions.

<style>
    .MuiTableCell-root {
      width: 1%
    }
  </style>

nick-romano0 avatar May 12 '20 20:05 nick-romano0

@nick-romano-kci Thanks a lot for your answer but your magic have not worked in my case. I have added this style twice (into component where there is material-table and into index.html) but something has overrided this style.

Wint57 avatar May 15 '20 17:05 Wint57

@Wint57 can you provide a demo of the issue? You can use fork a starter demo to make it easier - see here for more

matthewoestreich avatar May 31 '20 23:05 matthewoestreich

Same thing happening with me. If I use columnsButton and hide a few columns, this happens: image

lfsando avatar Jun 12 '20 15:06 lfsando

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 Sep 10 '20 16:09 stale[bot]