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

[Table] Make --table-col-max-width really work #239

Closed
kiaking opened this issue Apr 6, 2023 · 0 comments · Fixed by #240
Closed

[Table] Make --table-col-max-width really work #239

kiaking opened this issue Apr 6, 2023 · 0 comments · Fixed by #240
Assignees
Labels
enhancement New feature or request

Comments

@kiaking
Copy link
Member

kiaking commented Apr 6, 2023

When creating a table, there're many cases where we wanna set the first column to "Set the min width, but fill up empty space if there's any". For this reason, we have --table-col-max-width. However, this only works if the content size is smaller than the min-width. Here is the broken example.

Screenshot 2023-04-06 at 11 13 01

For this example, the first column has following css defined.

.table :deep(.col-name) {
  --table-col-width: 160px;
  --table-col-max-width: 100%;
}

With this definition, I wand the column to have min of 160px, but if the window is large, then fill up the rest of the space. Similar to how flex-grow: 1 would work.

Currently --table-col-max-width sets the max width to 100%. So, if the content is larger than 160px (min width), it just gets bigger.

The hard part is that the table can be overflow. If there're lots of column, then it should exceed the table width and should be horizontally scrollable.

Is there a way to achieve this?

@kiaking kiaking added the enhancement New feature or request label Apr 6, 2023
@brc-dd brc-dd self-assigned this Apr 6, 2023
kiaking added a commit that referenced this issue Apr 10, 2023
…239) (#240)

close #239 

Co-authored-by: Kia King Ishii <kia.king.08@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants