primefaces / primevue

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

VirtualScroller scrolling is jarring when itemSize is changed #2216

Open bgoscinski opened 2 years ago

bgoscinski commented 2 years ago

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

  1. Create any VirtualScroller, let it initialize
  2. Scroll it, observe scrolling is smooth and scrollbar doesn't jump (good)
  3. After VirtualScroller initializes change itemSize binding to different value
  4. Scroll it, observe scrolling is jarring - scrollbar jumps back (bad)

scrolll

What is the motivation / use case for changing the behavior? Good UX

Please tell us about your environment: Windows 10, latest Chrome and Brave

bgoscinski commented 2 years ago

The bug is still reproducible on PrimeVue 3.15.0