clauderic / clauderic/react-sortable-hoc

Custom distances for autoscroll

Open
#715 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/clauderic/react-sortable-hoc/blob/master/src/AutoScroller/index.js#L44-L68).

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.