At the moment EUI table columns support truncateText which works great for single lines. An additional option to support multi-line truncation would be great. There's some prior art spread across in Kibana with custom code which looks like there are use cases for both table columns and flex layouts.
Here's an example for custom code for a column's render function for EuiBasicTable using -webkit-line-clamp to achieve multi-line truncation.
{
field: 'myField',
name:'My field',
render: (value) => {
return (
<div
css={css`
display: -webkit-box;
line-clamp: 3;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
`}
>
{value}
</div>
);
},
truncateText: false,
valign: 'middle',
},
At the moment EUI table columns support
truncateTextwhich works great for single lines. An additional option to support multi-line truncation would be great. There's some prior art spread across in Kibana with custom code which looks like there are use cases for both table columns and flex layouts.Here's an example for custom code for a column's
renderfunction forEuiBasicTableusing-webkit-line-clampto achieve multi-line truncation.