react-scroll-sync icon indicating copy to clipboard operation
react-scroll-sync copied to clipboard

Get refs from scrollable elements & prevent memory leaks

Open alioshr opened this issue 2 years ago • 1 comments

There should be a way of getting the refs of the scrollable elements used within the ScrollPanel elements.

I need to investigate why it is not possible, but I have tried with callbacks and regular refs. I assume that this is being kidnappted internally, to make the feature work.

Another thing that I have noticed is that after a while the scroll sync get chunky. I guess that is a certain point of time both elements start listening to each other at the same time, which makes the scroll chunky.

I will post more here during this week to enhance my findings, as I will need to reproduce this on public code.

alioshr avatar Nov 21 '22 13:11 alioshr

This exact issue causes problems when you're using other scroll related libraries like react-virtual to visualize items on your synced list

wbolduc avatar Nov 07 '23 19:11 wbolduc