stimulus-sortable icon indicating copy to clipboard operation
stimulus-sortable copied to clipboard

Nested sortable lists end event problem

Open ev-bordiuk opened this issue 2 years ago • 2 comments

There is a problem with first level of sort list if it has a nested sortable list. Event end doesn't fire for top level. But if I use plain Sortable library for this, everything works fine.

ev-bordiuk avatar Sep 14 '21 06:09 ev-bordiuk

@ev-bordiuk How your controller and template container looks for nested sortable? Because I have problem with configuration. Thanks!

ducho avatar Oct 11 '21 17:10 ducho

I can't share code for now, because I had to change it. But it was just like this:

<div data-controller="sortable" data-sortable-handle-value=".handler"> <div> <h2>Parent 1</h2> <div data-controller="sortable" data-sortable-handle-value=".handler"> <div>Child 1-1</div> <div>Child 1-2</div> <div>Child 1-3</div> </div> </div> <div> <h2>Parent 2</h2> <div data-controller="sortable" data-sortable-handle-value=".handler"> <div>Child 2-1</div> <div>Child 2-2</div> <div>Child 2-3</div> </div> </div> <div>Parent 3</div> </div> When I used plain Sortable library to init lists, that was working correctly.

ev-bordiuk avatar Oct 12 '21 16:10 ev-bordiuk