draggable
draggable copied to clipboard
Sortable with fixed Layout
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?
use below code const sortable = new Draggable.Sortable( document.querySelectorAll('.container'), { draggable: '.item', handle: '.drag-handle' // Only this element triggers dragging } );