primefaces / primevue

Next Generation Vue UI Component Library
https://primevue.org
MIT License
10.51k stars 1.23k forks source link

DataTable scroll-height="flex" does not work initially on v4 #6108

Open os-tohe opened 3 months ago

os-tohe commented 3 months ago

Describe the bug

When using scroll-height="flex" in DataTable, it does not show all the rows correctly initially. Once you make changes to the code or open Chrome develop tools, then it displays the rows correctly. In the stackblitz example I created, it only displays 3 rows initially, even though there is room for 19 rows. This functioned correctly in PrimeVue v3.x but after upgrading to v4.01 it does not work any more.

Reproducer

https://stackblitz.com/edit/primevue-4-vite-issue-template-jhemxu?file=package.json,src%2FApp.vue

PrimeVue version

4.0.1

Vue version

3.x

Language

TypeScript

Build / Runtime

Vite

Browser(s)

No response

Steps to reproduce the behavior

  1. Open stackblitz example: https://stackblitz.com/edit/primevue-4-vite-issue-template-jhemxu?file=package.json,src%2FApp.vue
  2. Wait for it to render and see, that there are only 3 rows visible.
  3. If for some reason it renders all the rows, refresh the page, after refreshing it should always display only 3 rows.

Expected behavior

All rows which fit in the container should be visible.

pickbreaker commented 3 months ago

+1