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

Custom distances for autoscroll

Open Tintef opened this issue 5 years ago • 1 comments

I ran into a scenario where we have some fixed columns on the left, but the rest of them are sortable, so we can drag and drop them to do so.

Given this, the auto-scroll only works to the right, as for it to work to the left we need to go all the way to the left side of the screen, instead of to the last of the fixed columns.

I realized this is doable by changing the update method of the AutoScroll component, passing some custom distances for the condition here.

I'll add a code sandbox in a couple of days to illustrate this scenario.

I'm open to creating a PR adding this feature, but maybe it's already doable?

Tintef avatar Jul 14 '20 19:07 Tintef

image

ffacub avatar Feb 02 '23 18:02 ffacub