Does it work with the MultiDrag plugin?
aurovrata opened this issue · 4 comments
depuits commented
These should work together without a problem. You'd still have to mount the plugin like normal
Sortable.mount(new MultiDrag());and then you can pass the options in the jquery call like this
$('#my-list').sortable({
// SortableJS options go here
// See: (https://github.com/SortableJS/Sortable#options)
handle: '.handle',
multiDrag: true, // Enable the plugin
selectedClass: "sortable-selected", // Class name for selected item
multiDragKey: null, // Key that must be down for items to be selected
// Called when an item is selected
onSelect: function(/**Event*/evt) {
evt.item // The selected item
},
// Called when an item is deselected
onDeselect: function(/**Event*/evt) {
evt.item // The deselected item
}
});aurovrata commented
Thanks! I got to work as per the instructions on the gituhub page, but I was actually wanting to know if instead of using
Sortable.utils.select(item)
to programmatically select an item in the multidrag sortable list, there was a jquery equivalent.
owen-m1 commented
@aurovrata there isn't this functionality yet, but I or @depuits could add it if he wants
aurovrata commented
no issues, I am happy to switch back to js for this functionality to work... I was just asking in case it existed.