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

Broken centered header #414

Open
1 task done
VaRusLAN opened this issue Sep 23, 2024 · 3 comments
Open
1 task done

Broken centered header #414

VaRusLAN opened this issue Sep 23, 2024 · 3 comments
Labels
bug Something isn't working V2 Issue with MRT V2

Comments

@VaRusLAN
Copy link

mantine-react-table version

2.0.0-beta.6

react & react-dom versions

18.3.3

Describe the bug and the steps to reproduce it

I am trying to get a clean centered header and body, without sorting and action buttons. I found out that it can be done by setting props to columns

mantineTableHeadCellProps: {
  align: "center",
},
mantineTableBodyCellProps: {
  align: "center",
},

It works for the body, but not for the header.
The header is always padded by 1.75. The only line that contains such number is this.
It seems that there's something wrong with conditions. Setting "enableHeaderActionsHoverReveal" to "true" resolves the issue, until someone hovers over the header and then it's broken again.

Minimal, Reproducible Example - (Optional, but Recommended)

https://codesandbox.io/p/devbox/laughing-wave-7zm749?workspaceId=55c06326-b743-49a1-aca3-3feb22fee983

Screenshots or Videos (Optional)

Screencast_20240923_162325.webm

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

No, because I do not know how

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.
@VaRusLAN
Copy link
Author

There's no issue with version 2.0.0-beta.4

@rhyek
Copy link

rhyek commented Oct 27, 2024

I'm on 2.0.0-beta.6 and seeing this issue.
Edit: Just tried 2.0.0-beta.7 and same thing.

@rhyek
Copy link

rhyek commented Oct 27, 2024

Actually, in my case it seems the class labels-center is being applied here which defines a left padding

It just looks odd.

image

@alessandrojcm alessandrojcm added bug Something isn't working V2 Issue with MRT V2 labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working V2 Issue with MRT V2
Projects
None yet
Development

No branches or pull requests

3 participants