primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable/VirtualScroller: Table scroll height cannot be increased more than initial height

Open Minitron5000 opened this issue 4 months ago • 3 comments

Describe the bug

Table scroll height cannot be increased more than initial height

Reproducer

https://stackblitz.com/edit/j5svopgd?file=src%2FApp.jsx

System Information

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
 npmPackages:
    primereact: latest => 10.9.7 
    react: 18.3.1 => 18.3.1 
Binaries:
    Node: 20.19.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm

Steps to reproduce the behavior

  1. Open demo
  2. Click button "large"

Result: Table height does not change

Expected behavior

Table height should be able to be increased more than initial height

Minitron5000 avatar Sep 19 '25 11:09 Minitron5000

The workaround for this is to initially render the table with maximum possible scroll height, then decrease the scroll height in following render

Minitron5000 avatar Sep 19 '25 11:09 Minitron5000

New related bug found: Table scroll height cannot be increased after page resize. This bug only appears outside of the Strict Mode

  1. Open demo
  2. Click button "small"
  3. Resize the page/browser window
  4. Click button "medium" Result: Table height does not change

Demo: https://stackblitz.com/edit/j5svopgd-j1thisr7?file=src%2Fmain.jsx,src%2FApp.jsx

Minitron5000 avatar Sep 23 '25 12:09 Minitron5000

Seems related to this ? https://github.com/primefaces/primereact/issues/8208#issuecomment-3179374084

RolT avatar Sep 26 '25 08:09 RolT