How to get rid of horizontal scroll in a PrimeNg table15?

393 views Asked by At

Is there any atribute of the PrimeNg 15 p-table component that will make make table fit to the screen and not generate a horizontal scrool no matter how many columns there are to be displayed?

In PrimeNg 12 I used to use the [scrollable] atribute but it seems not to work this way in the newer version of the library.

1

There are 1 answers

0
Niklas Sundberg On

If anyone stumbles on this problem, try adding this css to your component, solved it for me:

.p-datatable table{
  table-layout: fixed;
}