VirtualScroller does not render the list when resized or when its visibility changes. #7354
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
When the VirtualScroller is resized or when its visibility changes (not directly, but due to one of its ancestors), the list of items is not rendered.
I believe this bug is caused by the absence of a resize observer on the element itself. From the source code, I noticed that there is an event listener for window resize but not for the element, which explains why nothing happens when the element is resized
Pull Request Link
#7353
Reproducer
https://stackblitz.com/edit/primevue-4-vite-issue-template-i3wskqty
Environment
Vite v5.3.2
Vue version
3.4.31
PrimeVue version
4.3.1
Node version
21.6.1
Browser(s)
Chrome 133
Steps to reproduce the behavior
There are two virtual scrollers: one inside a container div with a v-show condition and another inside a container div with a conditional height.
After 2 seconds, the first container will appear, and the second container will be resized. The VirtualScroller inside the first container will remain empty, while in the second container, items will be partially rendered.
Expected behavior
On VirtualScroller visibility change and on resize, the list of items should be rendered.
The text was updated successfully, but these errors were encountered: