-
Notifications
You must be signed in to change notification settings - Fork 34
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 strange width in last DataTable column #2052
Conversation
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.
LGTM but wondering about a couple of changes.
@@ -456,7 +456,9 @@ const DataTable = ({ | |||
onSortingChange: handleSortingChange, | |||
onRowSelectionChange: handleRowSelectionChange, | |||
enableRowActions: | |||
hasRowReordering || rowActionButtons || rowActionMenuItems ? true : false, | |||
hasRowReordering === true || rowActionButtons || rowActionMenuItems |
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.
Can hasRowReordering
be something other than true or false?
@@ -2352,6 +2353,7 @@ export const components = ({ | |||
marginBlockEnd: odysseyTokens.Spacing4, | |||
marginInline: 0, | |||
overflowX: "auto", | |||
display: "block !important", |
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.
Why do we need !important
? Is there an MUI conflict here?
Data in this table is procedurally-generated and will change on each | ||
page refresh. Any resemblance to real information is coincidental. |
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.
Is this still true, given your other PR?
I'd originally misdiagnosed this problem as the Actions column showing up whether or not there were row actions. Turns out it was the last column showing an incorrect width, fixed with some CSS fixes that coincidentally improved the table appearance. The DataTable is now always the full width of the container, and handles column resizing more elegantly than it did before.