-
Notifications
You must be signed in to change notification settings - Fork 64
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
LG-4681: fix row background-color styles #2560
base: table-refactor-integration
Are you sure you want to change the base?
LG-4681: fix row background-color styles #2560
Conversation
|
[disabledStyles[theme]]: disabled, | ||
[clickableStyles[theme]]: !!onClick, | ||
}, | ||
className={getRowBaseStyles({ | ||
className, | ||
)} | ||
isClickable: !!onClick, | ||
isDisabled: disabled, |
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.
The disabled and clickable styles don't conflict with each other anyways but wanted to explicitly call out that I swapped the order of these in getRowBaseStyles
: https://github.com/mongodb/leafygreen-ui/pull/2560/files#diff-cdea201e57c6a1377cfb33f54cfae6a9bb1baefe734a008b505babcbee0ea78aR45-R46
The new ordering seemed more appropriate. Please let me know if otherwise and I can revert this
[getGrayZebraRowStyles(theme)]: | ||
isOddVSRow && shouldAlternateRowColor && !isSelected, | ||
[getSelectedRowStyles(theme)]: isSelected && !isDisabled, | ||
[getExpandedContentParentStyles(theme)]: isExpanded, |
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.
not entirely clear how this fixed it but switching expandedContentParentStyles
to the function getExpandedContentParentStyles
enabled this to work!
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.
I'm not seeing alternative row styles https://642700aa3e49e32bdbf0b0fc-pnljhcjlas.chromatic.com/?path=/story/components-table-with-virtualized-scrolling--basic
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.
ahh I must have been cached in a weird state. I tried pushing up a new change that I think actually fixes it now
Size Change: +74 B (+0.01%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
✍️ Proposed changes
Refactors row styles and somehow fixes the styling issue (unclear what actually fixed it... 🙃)
🎟 Jira ticket: LG-4681
✅ Checklist
For bug fixes, new features & breaking changes
yarn changeset
and documented my changes🧪 How to test changes
Table/Row
Table/WithVirtualizedScrolling