Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear autoscroller when autoscroll is disabled #604

Merged
merged 3 commits into from
Sep 20, 2019

Conversation

superandrew213
Copy link
Contributor

@superandrew213 superandrew213 commented Sep 2, 2019

If disableAutoscroll is set to true by another event while user is dragging, scroll still continues.

Must also clear autoScroller when autoscroll gets disabled.

Copy link
Owner

@clauderic clauderic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @superandrew213, good catch, we should definitely clear the autoscroll timeout when autoscroll is disabled.

The only thing I would add to this PR is add a check in the AutoScroller.clear method as to whether this.interval exists here: https://github.com/clauderic/react-sortable-hoc/blob/master/src/AutoScroller/index.js#L7-L10

@superandrew213
Copy link
Contributor Author

Sure no problem.

@clauderic clauderic merged commit 3fd83f9 into clauderic:master Sep 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants