petyosi / react-virtuoso

The most powerful virtual list component for React
https://virtuoso.dev
MIT License
5.16k stars 299 forks source link

[BUG] 'Stick to bottom' does not work with fast updates. #1026

Closed CarltonHenderson closed 8 months ago

CarltonHenderson commented 8 months ago

Describe the bug

followOutput does not work with updates faster than ~40ms.

Reproduction

Reproducible in codesandbox.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://virtuoso.dev/stick-to-bottom/
  2. Click on "Open Sandbox" on the example.
  3. Scroll down to the setInterval on lines 39-41 and change 400 milliseconds to 40 or smaller.
  4. See the virtuoso will auto scroll for a little while but then get stuck. It happens more often on shorter intervals and less often on longer intervals.

Expected behavior Expect it to always scroll to the bottom no mater how fast updates happen.

Screenshots video

Workaround TBD

Desktop (please complete the following information): Linux Ubuntu 22.04 LTS, X11, Chrome 120, Lenovo X1 Carbon (2019)

CarltonHenderson commented 8 months ago

Closing because I found duplicate with workaround. https://github.com/petyosi/react-virtuoso/issues/844