[FIXED] P-table Horizontal Scroll Not Displaying

Issue

I have the following attributes in my p-table:

<p-table
   [columns]="this.templateRows"
   [value]="this.tableData"
   [scrollable]="true"
   scrollHeight="100px"
   scrollWidth="100px"
   scrollDirection="both"
>

However, the horizontal scroll isn’t working, which means my columns are all bunched up with text overlapping. The vertical one is working fine.

Does anyone know what I’m missing?

Solution

Fixed by changing to this:

  <p-table
    [columns]="this.templateRows"
    [value]="this.tableData"
    [resizableColumns]="true"
    [autoLayout]="true"
  >

Answered By – Pippa97

Answer Checked By – David Marino (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published