frontend-collective / frontend-collective/react-sortable-tree

Auto scroll not happening when I drag something and approach an edge (bottom) in the viewport

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

Description

**`react-sortable-tree` is a wonderful library. I'm loving it!**

My virtualized sortable tree doesn't auto-scroll when I drag an item to the bottom of the viewport. Requesting clarification on how to enable it.

Auto-scroll on drag was introduced in v0.1.2 according to this issue: https://github.com/frontend-collective/react-sortable-tree/issues/3

Here is my SortableTree.
```
true}
canNodeHaveChildren={node => true}
treeData={tree.items}
treeNodeRenderer={props => }
nodeContentRenderer={props => (

)}
/>
```
The `Node` has a drag handle like so:
```
const handle = connectDragSource(
(




), {
dropEffect: 'copy',
},
);
```
---
When I drag the handle icon, I expect the virtual list component to auto-scroll as I approach the bottom edge of the viewport. Its not happening.

Here is a screen recording of what I'm trying to do. Please advice on how to approach this.
If I need to add more information or context, please let me know in comments. Thanks in advance!

---
![drag_autoscroll_issue](https://user-images.githubusercontent.com/44434019/75040025-e97dd700-54df-11ea-8377-632496c16b2e.gif)

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.