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

Cannot access pagination styling #1291

Open
1 task done
markedwards opened this issue Nov 8, 2024 · 4 comments
Open
1 task done

Cannot access pagination styling #1291

markedwards opened this issue Nov 8, 2024 · 4 comments

Comments

@markedwards
Copy link

material-react-table version

v3.0.1

react & react-dom versions

v18.3.1

Describe the bug and the steps to reproduce it

I would like to make adjustments to the pagination styling (for instance font sizes), but setting muiPaginationProps.sx does not seem to have any effect.

Minimal, Reproducible Example - (Optional, but Recommended)

Can add if necessary.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

No, because I do not have time to dig into it

Terms

  • I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
@MylesWardell
Copy link

MylesWardell commented Nov 18, 2024

Had the same question, looked at the source code. Looks like pagination is part of muiBottomToolbarProps. Which you can restyle their using SX.

In saying that the access is limited with no unique classNames on areas that you would want to restyle. I would appreciate more classNames here.

@markedwards
Copy link
Author

markedwards commented Nov 29, 2024

It's super hacky to style the pagination, this really needs to be improved. It should be addressable via the MUI theme.

@markedwards
Copy link
Author

markedwards commented Nov 29, 2024

I ended up with:

muiBottomToolbarProps: {
  sx: {
    minHeight: 45,
    ".MuiTablePagination-root": {
      height: 45,
      py: 0,
      ".MuiInputLabel-root, .MuiTypography-root": {
        fontSize: 14,
      },
    },
  },
},

@FutureKode
Copy link

I want to put the pagination on the left side, is there an easy way to do that?

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

No branches or pull requests

3 participants