Table Height

UI Components for Angular
Post Reply
Posts: 1
Joined: 08 Mar 2023, 03:03

16 Mar 2023, 01:11

Hi All,

I need some help with getting a p-table with paginator to display correctly.

I have a div with a fixed height of 400px. Because I'm using the paginator with the table I need to supply a [rows] parameter which I do [rows]="5". This fits the height well in normal circumstances.

I'm allowing users to increase or decrease the global font size to make the components "smaller" or "larger" same as the PrimeNG templates do.

When the font-size is set smaller the table no longer fills the height of the container. 5 rows are shown with blank space before the paginator at the bottom.

I was hoping that the table would adjust the number of rows so that is still fills the available height.Vice versa when the font is too high the table overflows the container as it still retains 5 rows rather than dropping down to a smaller number.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests