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

Fix strange width in last DataTable column #2052

Merged
merged 2 commits into from
Dec 1, 2023

Conversation

jordankoschei-okta
Copy link
Contributor

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.

Copy link
Contributor

@chrispulsinelli-okta chrispulsinelli-okta left a 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
Copy link
Contributor

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",
Copy link
Contributor

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?

Comment on lines +509 to +510
Data in this table is procedurally-generated and will change on each
page refresh. Any resemblance to real information is coincidental.
Copy link
Contributor

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?

@jordankoschei-okta jordankoschei-okta merged commit d4c5598 into main Dec 1, 2023
@jordankoschei-okta jordankoschei-okta deleted the jk/datatable-removable-actions branch December 1, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants