Table row height not being adjusted when comment without spaces

I’m using a table, normal table nothing weird.
There a cell that is being used for long comments. If I add a comment with spaces the row heigth is adjusted and the entire string is visible.

The problem is if a add a large comment with no spaces. In that case the visible comment is the column width and nothing more. I can increase the column width and see more(and a horizontal scroll appears).

How could I fix this?, is there a property in the vaadin table to handle this situation?, or maybe with css?

Edit: There’s an attachment to see better the issue.
19220.png

Hi,

Yes it is “possible”, however not officially supported. The table in general doesn’t like rows with varying heights as the scrollbar is caluclated based on the row height and the total number of rows.

You didn’t mention which Vaadin version and theme your’re running so I’m assuming 7.4.x and a theme extending Valo. This should be applicable to any Vaadin 7.3+ and Valo, but I didn’t test them all :wink:

By default the table doesn’t wrap the text at all so you’ve probably already added this to your styles:

.v-table-table{ white-space: normal; } In order to get the non-breakable strings to wrap you’ll need to add this to your styles:

 .v-table-cell-wrapper{
      word-wrap: normal; 
      word-break: break-word;
  }

After doing this, I recommend som heavy cross-browser testing to ensure that you don’t break other things unintentionally… If you do, you might want to target the css to a specific table by adding a style name to the table, or even just specific cells by using the CellStyleGenerator.

Best,

Hi Petri, thanks for the response. The Vaadin version that I’m using is 7.2.7 and the theme is chameleon.
I added the css but didn’t work. I will try again updating the version to 7.3.X.