Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dense table #714

Open
mohemos opened this issue Jun 23, 2019 · 7 comments
Open

Add support for dense table #714

mohemos opened this issue Jun 23, 2019 · 7 comments

Comments

@mohemos
Copy link

mohemos commented Jun 23, 2019

Just as material-ui dense table and bootstrap small table, Kindly support dense option to make tables more compact by cutting cell padding.

@patorjk
Copy link
Collaborator

patorjk commented Aug 30, 2019

This looks like it could be done via a setTableProps option, similar to #871, if I have time, I'll see about putting a PR together tomorrow.

@ltalirz
Copy link

ltalirz commented Aug 24, 2021

Just in case anyone else needs this, the example #871 mentioned above uses

      ...
      options: {
        setTableProps: () => {
          return {
            // material ui v4 only
            size: 'small',
          };
        },
       ...

@alexkrytsky
Copy link

any updates on this? MUI 5 is out so I take that this isn't compatible anymore?

@eplatek-safyr
Copy link

any updates on this? MUI 5 is out so I take that this isn't compatible anymore?

It just works, all you need is trying ;)

@emileWhispa
Copy link

Just in case anyone else needs this, the example #871 mentioned above uses

      ...
      options: {
        setTableProps: () => {
          return {
            // material ui v4 only
            size: 'small',
          };
        },
       ...

saved my day, thanks

@alxndrsn
Copy link

alxndrsn commented Aug 2, 2022

Thanks @ltalirz. I've updated your fix for MUI v5:

      ...
      options: {
        setTableProps: () => {
          return {
            // material ui v5 only
            size: 'small',
          };
        },
       ...

@Hubbsy
Copy link

Hubbsy commented Aug 2, 2022

hey @alxndrsn , I am trying to use this for setting my table density on click of a free-action. I am just calling the options.setTableProps() method in the click handler of the free action and I added the function to my options object as shown above. But no luck. I have also tried just setting the size option to "small" and I am not seeing a change in my table rows padding. Are there css styles that may conflict with this option setting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants