clauderic / clauderic/react-sortable-hoc

lockAxis removes lockToContainerEdges from the sortable container?

Open
#808 3 comments 4 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

Hi!
I am attempting to create a sortable container whose draggable can move by the y axis and will be contained to the container

``

When attempting this, the draggables can move only in the Y axis but they can be dragged allover the window, outside the container's edges.

![image](https://user-images.githubusercontent.com/85512022/127869611-b1ba2308-d8f4-40e4-b698-76a396cb51e4.png)

And when I try to remove lockAxis the drag becomes invisible and successfully sorts the items as I drag the invisible item.

``

![image](https://user-images.githubusercontent.com/85512022/127870053-3c1f3e3f-eef8-47d5-ae36-1e02e0733a35.png)

Removing only axis = 'y' has me remaining in the original state from before.

Is there a way to fix this problem? Thanks in advance!

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files or tests. Start by reproducing the behavior with the shown SortableContainer props, then trace the drag handling for lockAxis and lockToContainerEdges. Done means a y-axis-only draggable remains visible and stays within the container while sorting.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.