react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Cannot manually scroll while dragging

Open dlee opened this issue 6 years ago • 5 comments

When you're dragging an item, you cannot scroll the container using touchpad/mousewheel scrolling.

dlee avatar Mar 14 '18 22:03 dlee

I was able to get this to work by returning the scrollable container in getContainer. The documentation should reflect the fact that getContainer is required in order for scroll to be properly handled.

Even better: is there a way this can be taken care of automatically?

dlee avatar Mar 19 '18 18:03 dlee

Can you publish some code here ? This will be helpful for us

I found the method to do it

just like this <SortableList getContainer={() => document.getElementById('setting-right-panel')} />

qwlong avatar May 03 '18 02:05 qwlong

@ qwlong Thanks. It works for me..

charl5sgithub avatar May 30 '19 07:05 charl5sgithub

Just set useWindowAsScrollContainer={true} for the <SortableList />

siffash avatar Jun 26 '19 15:06 siffash

Can you publish some code here ? This will be helpful for us

I found the method to do it

just like this <SortableList getContainer={() => document.getElementById('setting-right-panel')} />

What is this id that it is trying to reference?...is it something hoc adds to its container? Whats going on here?

meadow-tulips avatar Nov 09 '21 19:11 meadow-tulips