Closed pranas closed 3 years ago
Thanks, this seems like a clear repro. Hopefully fixable.
Encountered the same issue on a closed-source project, but not only when scrolling to the bottom of the list. Noticed one thing though: the more you scrolled (i.e. the further you are in the list), the more aggressive the flickering is. Hope this helps a bit.
@petyosi This is an important issue for us so we've made a contribution to help you prioritize it. Hope you can crack it soon!
@pranas Thank you very much, I appreciate that - the test case is helpful as well. I will look into it as soon as my schedule allows.
@pranas The fix I discovered seems correct to me and addresses the simplistic case you presented. Please let me know how the new version behaves in your real project.
:tada: This issue has been resolved in version 1.10.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
It seems the flickering is gone, great find! Thanks for a quick fix and keep up the good work with react-virtuoso.
How do you align these to the bottom?
Describe the bug The items in the list start to flicker when using
alignToBottom
option and browser zoom feature. When you use browser zoom feature it creates items with floating point height which likely triggers this issue. The item size keeps recalculating and changing which triggers different padding at the top which results in flickering effect.Reproduction You can reproduce in "align-to-bottom" e2e example with the following patch: https://github.com/EddyTravels/react-virtuoso/commit/90ee4ea73c3b54779912c9058e9002cbefd93e99
To Reproduce Steps to reproduce the behavior:
Screenshots
https://user-images.githubusercontent.com/91422/128022776-7abc8767-a9fa-447e-9320-9a8af824bf0e.mov
(I recorded with item height at 30.8 but I was later able to reproduce with 30px height items as well at different zoom level)
Desktop (please complete the following information):
Additional context
I believe this was also the issue in #317 and #268 but was closed due to lack of reproduction example.