bvaughn / react-window

React components for efficiently rendering large lists and tabular data
https://react-window.now.sh/
MIT License
15.48k stars 778 forks source link

Scroll synchronization of List and Grid lagging #746

Open TomasPlachy opened 8 months ago

TomasPlachy commented 8 months ago

Hi, first of all thanks for implementing a great and easy-to-use library. I cant get rid of one issue though - when I try to sync the scrolling of grid and list calling listRef.scrollTo() inside Grid's onScroll() function, the list lags behind.

You can see this unwanted behaviour in following example when you try dragging horizontal scrollbar: https://codesandbox.io/s/react-window-scrollto-issue-jxq838?file=/src/App.tsx

Charles-XD commented 7 months ago

Hi, I used 'react-custom-scrollbars-2' for syncing the scroll of two list and it works very well.

AlanQtten commented 7 months ago

Hi, I used 'react-custom-scrollbars-2' for syncing the scroll of two list and it works very well.

hi, do you have a demo about this situation? I use react-custom-scrollbars-2 wrap my VariableSizeList, and the onScroll of react-custom-scrollbars-2 won't call at all