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

Allow to set a different table-layout #461

Closed
timroes opened this issue Mar 3, 2018 · 2 comments · Fixed by #2697
Closed

Allow to set a different table-layout #461

timroes opened this issue Mar 3, 2018 · 2 comments · Fixed by #2697
Assignees

Comments

@timroes
Copy link
Contributor

timroes commented Mar 3, 2018

Currently the tables (I think all?) are using table-layout: fixed, thus all columns will get the same width by default. This should be configurable for all tables to use table-layout: auto instead, which will make the column width automatically be determined. I would even suggest making it the default value, though this might break existing usage, since I think it's the value needed more often, and just in some special cases you actually don't care about the content of the columns and actually want them to be distributed evenly.

@snide
Copy link
Contributor

snide commented Mar 9, 2018

We've gone back and forth on this one a lot. We initially switched back because of an IE issue that cropped up with a max-width hack we were applying. Generally I think tables look best when some, if not all of the column widths are hand applied by the developer. However, that's not really helpful in a lot of your cases since you don't know the data coming in. We've certainly skewed our table thinking more towards layout applications (like management) as of late so the decisions are definitely inflated towards those use cases.

I think having a prop for this sounds good so you can switch around as the usage requires it but I think we might stick with fixed as the default simply because it's more generally reliable across browsers. I also want to encourage people to set column widths when they can.

I'll try to prioritize this one.

@snide
Copy link
Contributor

snide commented Dec 2, 2019

@andreadelrio Here's an old one to tackle. I think we'd do this by adding a tableLayout prop. The current fixed layout should be used as the default, but it should accept auto as well.

You'll want to make sure this is available on EuiTable, EuiBasicTable and EuiInMemoryTable

https://css-tricks.com/almanac/properties/t/table-layout/
https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants