[X] I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
7.13.2
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
Chrome
Describe the bug
I've recently been making a comparison table of features for different pricing plans. With this case and to be responsive I wanted both the header and the first column to be sticky.
For that I put the parameters stickyHeader and stickyHeaderOffset={0} to the table and wrapped the table with the Table.ScrollContainer component as indicated in the documentation. But the combination of both makes the stickyHeader stop working.
If possible, include a link to a codesandbox with a minimal reproduction
I've been investigating and it seems that the sticky header doesn't get along well with having overflows above it. Ideally, this result could be achieved: https://codepen.io/chriscoyier/pen/yLVNErX
Self-service
[ ] I would be willing to implement a fix for this issue
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.13.2
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
Chrome
Describe the bug
I've recently been making a comparison table of features for different pricing plans. With this case and to be responsive I wanted both the header and the first column to be sticky.
For that I put the parameters
stickyHeader
andstickyHeaderOffset={0}
to the table and wrapped the table with theTable.ScrollContainer
component as indicated in the documentation. But the combination of both makes thestickyHeader
stop working.If possible, include a link to a codesandbox with a minimal reproduction
https://stackblitz.com/edit/mantine-bug-table-sticky-header-with-scrollcontainer?file=src%2FTableDemo.tsx
Possible fix
I've been investigating and it seems that the
sticky
header doesn't get along well with having overflows above it. Ideally, this result could be achieved: https://codepen.io/chriscoyier/pen/yLVNErXSelf-service