frontend-collective / frontend-collective/react-sortable-tree
Drag not working in mobile browser
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
I am using the sortableTree for a project to manage the order of layers on a map. It works great in browsers with mouse interactions, however on a mobile phone in a chrome browser it fails to work. I can get the node to be picked up and the placeHolder is set in it's place but it will not drag at all or move. Basically it just disappears and doesn't return unless I touch the original location that now has the placeHolder. I am attaching a gif to show you the exact issue. The code is quite simple and like i said works perfectly in browsers with mouse interaction.

```
this.setState({ treeData })}
onMoveNode={this.orderLayers}
rowHeight={90}
/>
```
```
orderLayers = (s) => {
let layer_order = s.treeData.map((l, i) => {
return l.title.props.children[0].props.name;
});
this.state.mapRef.getLayers().forEach((customLyr) => {
customLyr.setZIndex(layer_order.indexOf(customLyr.get("id")));
});
};
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.