-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(data-table): fix sticky header issues #6452
fix(data-table): fix sticky header issues #6452
Conversation
Deploy preview for carbon-components-react ready! Built with commit 619d8d4 https://deploy-preview-6452--carbon-components-react.netlify.app |
Deploy preview for carbon-elements ready! Built with commit 619d8d4 |
packages/components/src/components/data-table/_data-table-core.scss
Outdated
Show resolved
Hide resolved
packages/components/src/components/data-table/_data-table-core.scss
Outdated
Show resolved
Hide resolved
9b793b6
to
c52f1d8
Compare
@joshblack fixed 👍 |
@tw15egan Hi TJ, I had made a comment in the issue after taking a look at the storybook for this PR, this fixes normal tables but tables with expandable rows will need some work: |
23e1521
to
d2b4d05
Compare
@guychris should be fixed now, thanks for catching that 👍 |
Thank you for the quick turnaround, just poking around some more and a few more edge cases I found:
|
3eb7f95
to
35c74ab
Compare
@guychris Thanks for taking the time and making sure I'm getting all the variants! 🙏 Just pushed up some more changes that should take care of the rest of the issues. In regards to your last one, I checked how it renders with my changes, and it all looks good except the Table Headers are slightly misaligned with the Table Cells. Since there are 2 more cells than headers, you'd just have to set a manual offset on the headers based on the number of controls (in this case 2, so it'd probably be Let me know if I missed any more! @joshblack @andreancardona : added a conditional render in |
Thanks for the quick turnaround on the fixes @tw15egan , all the scenarios I was going through in the storybook that we might be using look good with stickyHeader now. It does look like changing the row height breaks a few different stylings unfortunately (apologies for opening the stickyHeader can of worms!). We're not changing row height in our case, but playing around in the storybook it's looking like the row height stylings are not being applied consistently to row elements. few different parts I see that are not styled correctly:
some screenshots: |
60ef829
to
9514f44
Compare
@guychris just pushed up some more fixes. Keep in mind, that compact / short will break out of the specified size if the screen is too small to accommodate the full width. |
bf6b860
to
6819740
Compare
@laurenmrice not sure what's going on in Safari, might be something with the deploy preview? This is what I see locally MouseTrackpad |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laurenmrice should be fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7d9d04c
to
3c77462
Compare
@laurenmrice hopefully all set now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think this will be the last thing 😁!
For these stories with dynamic content
, with expansion
, with options
:
-The column header text is misaligned with the cell row text below it (for all sizes).
-The stories mentioned with a column header checkbox icon get misaligned with the icons in the cell rows (for all sizes).
46f914a
to
49fa051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3228bc9
to
320a1b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo! looks good to me 🙌🏻🎉
Closes #6449
Fixes a spacing issue when
sticky header
is enabled inDataTable
Changelog
Changed
td
,th
Testing / Reviewing
Ensure all variations of sticky header sizes look correct