1

Is it possible to use the table with scrolling in both directions AND virtual scrolling?

E.G. if I use:

<p-table
    [columns]="startColumns"
    [value]="data"
    [scrollable]="true" 
    scrollHeight="400px"
    scrollDirection="both">

Everything works as expected but as soon as I add the virtual scrolling like:

   <p-table
    [columns]="startColumns"
    [value]="data"
    [scrollable]="true" 
    scrollHeight="400px"
    scrollDirection="both"
    [rows]="100"
    [virtualScroll]="true"
    [virtualRowHeight]="40"
    >

the horizontal Scrollbar is gone.

1 Answers1

0

remove [rows]="100"

and instead of [virtualRowHeight]="40" use [virtualScrollItemSize]="40"

Moritz Ringler
  • 9,772
  • 9
  • 21
  • 34
Hadas Bar
  • 1
  • 3