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

Nested Sortable issue #60

Open
ReeceG opened this issue Nov 14, 2022 · 0 comments
Open

Nested Sortable issue #60

ReeceG opened this issue Nov 14, 2022 · 0 comments

Comments

@ReeceG
Copy link

ReeceG commented Nov 14, 2022

Hi there,
I've run into an issue with a sortable list that contains sortable lists, a minimal example being:

<div data-controller="sortable">
    <div data-controller="sortable" class="inner-list">
        <div>item 1a</div>
        <div>item 1b</div>
    </div>
    <div data-controller="sortable" class="inner-list">
        <div>item 2a</div>
        <div>item 2b</div>
    </div>
</div>

The observed behavior is that sorting the items inside the "inner-lists" works as intended, but sorting the "inner-lists" themselves doesn't work correctly. After grabbing an "inner-list" and moving it, it gets locked into the first new position it enters, and can't be moved around any more (i.e. back to its original position) until the drag is released and a new one is initiated. Based on some additional testing, it also seems like the "end" event doesn't fire when dragging an "inner-list". Removing the controller from the "inner-list" allows the outer sortable to function again. Unfortunately there are no errors in the console so I don't have much else to help diagnose this issue, or any way to find a workaround.
Thank you!

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

No branches or pull requests

1 participant