You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
decentralised_book_index/assets/js/authorRoleSort.js

15 lines
377 B

import Sortable from 'sortablejs';
export default {
mounted() {
var sortable = new Sortable(this.el, {
handle: ".handle",
draggable: "tr",
ghostClass: "bg-gray-100",
onSort: (e) => {
this.pushEventTo(this.el, "reorder-author-role", { order: sortable.toArray(e.to) })
}
})
}
}