How to show spaces '' '' in a grid cell

Hello,

I have a Vaadin 8.1 grid and some strings like this: ‘a b c’. When I look in my table it looks like this: ‘a b c’ (only one space left, others are gone). I solved this issue via setting a html renderer to my column and replacing all spaces with   Is there another possibility? In Vaadin 7 such a hack was not necessary. I did not had to manipulate the strings and everything was shown correctly.

Thanks, Philipp

Edit: the forum software also kills some spaces, my first mentioned string should look like this: a___b____c, where_ means space.

Hi Philipp,

It’s a feature of browsers/HTML to by default remove any extra spaces. You can apply CSS theme rule
white-space: pre;
that should change the behaviour of the spaces.

//Teemu

Hi,

thanks. It was my fault. We also used it in Vaadin 7 but this CSS information was lost during migration to Vaadin 8.1.