draggable icon indicating copy to clipboard operation
draggable copied to clipboard

Sortable with fixed Layout

Open Jonassemm opened this issue 3 years ago • 1 comments

It would be nice to have the option to use Sortable with a fixed layout, similar to Swappable.

I have a list of elements that should be able to be sorted. But I have to have fixed elements between the sortable elements and they have to stay in place during sorting.

For Example:

<div class="list">
<div class="draggable"></div>
<div class="fixed"></div>
<div class="draggable"></div>
</div>

As far as I know, this is not possible at the moment?

Jonassemm avatar Jan 10 '23 13:01 Jonassemm

use below code const sortable = new Draggable.Sortable( document.querySelectorAll('.container'), { draggable: '.item', handle: '.drag-handle' // Only this element triggers dragging } );

bryan844 avatar Nov 03 '25 07:11 bryan844