DataTable/VirtualScroller: Table scroll height cannot be increased more than initial height
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
- Open demo
- Click button "large"
Result: Table height does not change
Expected behavior
Table height should be able to be increased more than initial height
The workaround for this is to initially render the table with maximum possible scroll height, then decrease the scroll height in following render
New related bug found: Table scroll height cannot be increased after page resize. This bug only appears outside of the Strict Mode
- Open demo
- Click button "small"
- Resize the page/browser window
- Click button "medium" Result: Table height does not change
Demo: https://stackblitz.com/edit/j5svopgd-j1thisr7?file=src%2Fmain.jsx,src%2FApp.jsx
Seems related to this ? https://github.com/primefaces/primereact/issues/8208#issuecomment-3179374084