primevue
primevue copied to clipboard
VirtualScroller scrolling is jarring when itemSize is changed
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110
CodeSandbox Case (Bug Reports) https://codesandbox.io/s/zen-shamir-5o79w3?file=/src/VirtualScrollerDemo.vue
Current behavior
After a change to itemSize
scrolling is jarring.
Expected behavior
After a change to itemSize
scrolling is smooth.
Minimal reproduction of the problem with instructions
- Create any VirtualScroller, let it initialize
- Scroll it, observe scrolling is smooth and scrollbar doesn't jump (good)
- After VirtualScroller initializes change
itemSize
binding to different value - Scroll it, observe scrolling is jarring - scrollbar jumps back (bad)
What is the motivation / use case for changing the behavior? Good UX
Please tell us about your environment: Windows 10, latest Chrome and Brave
- Vue version: 3.2.31
- PrimeVue version: 3.12.0
- Browser: reproduced on Chrome and Brave, didn't check others
The bug is still reproducible on PrimeVue 3.15.0