dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

Scroll issue with DND kit sortable and tanstack/react-virtual

Open leahcarlin opened this issue 8 months ago • 4 comments

I have a large table that I'm using virtualization to render the rows. When Dnd is not implemented, the scroll behavior on the virtualization is working smoothly as expected. However once I implement dnd sortable, the scroll (virtualization) becomes laggy and slow. I'm following the implementing of column dnd here but this example does not include virtualization which then makes the scroll laggy.

I suspect this issue occurs due to how both libraries handle event listeners and scroll management. Any guidance or possible workarounds would be appreciated.

leahcarlin avatar May 01 '25 21:05 leahcarlin

any one knows solution for this ?

reshmarevi17 avatar May 02 '25 13:05 reshmarevi17

Try using @dnd-kit/react (follow instructions on next.dndkit.com), if you still face issues, share a CodeSandbox replicating the issue.

clauderic avatar May 02 '25 13:05 clauderic

Tbh, I'm now realizing that the scroll lag may only be happening locally. When I run it in production build mode, its much faster!

leahcarlin avatar May 02 '25 15:05 leahcarlin

Try using @dnd-kit/react (follow instructions on next.dndkit.com), if you still face issues, share a CodeSandbox replicating the issue.

does that mean the older one have this issue ?

reshmarevi17 avatar May 02 '25 15:05 reshmarevi17