Skip to content

Callback

onChoose

TypeDefault
Functionundefined

Callback when element is chosen

js
new Sortable(element, {
  onChoose: (event) => {
    // Element is chosen
  },
});

onUnchoose

TypeDefault
Functionundefined

Callback when element is unchosen

onDrag

TypeDefault
Functionundefined

Element dragging started

onMove

TypeDefault
Functionundefined

Move an item in the list or between lists

onDrop

TypeDefault
Functionundefined

Element dragging is completed. Only record changes in the current list

onAdd

TypeDefault
Functionundefined

Element is dropped into the current list from another (in the process of dragging)

onRemove

TypeDefault
Functionundefined

Element is removed from the current list into another (in the process of dragging)

onChange

TypeDefault
Functionundefined

Dragging element changes position in the current list (in the process of dragging)

onSelect

TypeDefault
Functionundefined

Element is selected. Takes effect in multiple: true

onDeselect

TypeDefault
Functionundefined

Element is unselected. Takes effect in multiple: true

Released under the MIT License.