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 column growth issue in Data tables #2309

Merged
merged 7 commits into from
Aug 7, 2024

Conversation

jordankoschei-okta
Copy link
Contributor

This PR addresses an issue that @sherizada-okta discovered, in which the resize handle was offset when resizing columns in Data Table:

image

This issue was present in both the original DataTable implementation and the rebuilt DataView implementation.

Solution

The cells in each row adjust to fit the space allotted to them. The final cell expands to fill the remaining space in the table.

In the body rows, this width is the same, since the structure of each cell is identical across rows.

In the table head, however, the "Actions" column has a different width because it does not include the action buttons present in the body cells of the same column.

To fix this, I borrowed a solution from the drag handle column — in the table head, we now render an invisible set of action buttons to match the row actions in the body. This ensures that the column has the same width.

This PR also fixes a regression in which the resize handle was being disabled by an unrelated CSS change.

@jordankoschei-okta jordankoschei-okta requested a review from a team as a code owner July 30, 2024 12:50
Copy link
Contributor

@bryancunningham-okta bryancunningham-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment. Seems good though! 👍

benlister-okta
benlister-okta previously approved these changes Aug 6, 2024
Copy link
Contributor

@KevinGhadyani-Okta KevinGhadyani-Okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot going on in here that I don't really understand doing an async PR review. If we need to do a more thorough review, I can setup a meeting. Otherwise, it looks fine. I assume these changes work.

jordankoschei-okta and others added 2 commits August 6, 2024 16:25
Co-authored-by: Kevin Ghadyani <97464104+KevinGhadyani-Okta@users.noreply.github.com>
@oktapp-aperture-okta oktapp-aperture-okta bot merged commit 93ec2e7 into main Aug 7, 2024
1 check passed
@oktapp-aperture-okta oktapp-aperture-okta bot deleted the jk-last-column-grow branch August 7, 2024 17:41
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.

4 participants