Reputation: 169
I`m working with Vaadin 14 and i have a problem with sizing cells in Grid. I would like to set autowidth on all columns to reduce size of column with small content size, but for long i want to achive max size of column without horizontall scroll ( i want to see all columns at once) and when it would exceed size of the table then i would like to wrap conten inside this column.
When i'm setting autoWidth for all columns then my long conten is shown in one line and i must scrolling horizontally to see other columns. When i`m setting
grid.addThemeVariants(GridVariant.LUMO_COMPACT,GridVariant.LUMO_WRAP_CELL_CONTENT);
then my long column has this same size but with multi-line content as other columns with short content. Other columns are too long for their content.
I can`t set width separately for each column couse i dont know how many columns will be in the Grid and which column will have long or short content.
Upvotes: 3
Views: 1385
Reputation: 2918
Here’s what I would try:
Upvotes: 3