Primefaces datatable header alignment with scrollbar

854 views Asked by At

I'm facing a strange behaviour of Primefaces (v.5.1) Datatable. I have a datatable with srollable=true:

<p:dataTable var="_udf" value="#{unitaDiFornituraList}" scrollHeight="350"  liveScroll="true" scrollRows="20" 
    scrollable="true" id="risultati" widgetVar="risultati">

When there are lots of items the scrollbar is shown and the header is correctly aligned: scroll

When there are up to 5 items the scrollbar doesn't appear and the header correctly hide the gap on the right for the scrollbar: no scroll

The strange thing is when I have more than 5 items but not enough to show the scrollbar. In this case the header shows the gap and thus it's not aligned: wrong alignment

Any ideas? Thank you

0

There are 0 answers