Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Properties

Optional animation

animation?: number

ms, animation speed moving items when sorting, 0 — without animation

Optional chosenClass

chosenClass?: string

Class name for the chosen item

Optional dataIdAttr

dataIdAttr?: string

Optional delay

delay?: number

time in milliseconds to define when the sorting should start

Optional delayOnTouchOnly

delayOnTouchOnly?: boolean

Only delay if user is using touch

Optional direction

direction?: ((evt: SortableEvent, target: HTMLElement, dragEl: HTMLElement) => Direction) | Direction

Direction of Sortable (will be detected automatically if not given)

Optional disabled

disabled?: boolean

Disables the sortable if set to true.

Optional dragClass

dragClass?: string

Class name for the dragging item

Optional draggable

draggable?: string

Specifies which items inside the element should be draggable

Optional dragoverBubble

dragoverBubble?: boolean

Optional dropBubble

dropBubble?: boolean

Optional easing

easing?: string

Easing for animation. Defaults to null.

example

// CSS functions | 'steps(int, start | end)' | 'cubic-bezier(n, n, n, n)'

// CSS values | 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'step-start' | 'step-end' | 'initial' | 'inherit'

Optional emptyInsertThreshold

emptyInsertThreshold?: number

distance mouse must be from empty sortable to insert drag element into it

Optional fallbackClass

fallbackClass?: string

Class name for the cloned DOM Element when using forceFallback

Optional fallbackOffset

fallbackOffset?: { x: number; y: number }

Type declaration

  • x: number
  • y: number

Optional fallbackOnBody

fallbackOnBody?: boolean

Appends the cloned DOM Element into the Document's Body

Optional fallbackTolerance

fallbackTolerance?: number

Specify in pixels how far the mouse should move before it's considered as a drag.

Optional filter

filter?: string | ((event: Event | TouchEvent, target: HTMLElement, sortable: sortablejs) => boolean)

Selectors that do not lead to dragging (String or Function)

Optional forceFallback

forceFallback?: boolean

ignore the HTML5 DnD behaviour and force the fallback to kick in

Optional ghostClass

ghostClass?: string

Class name for the drop placeholder

Optional group

group?: string | GroupOptions

To drag elements from one list into another, both lists must have the same group value. You can also define whether lists can give away, give and keep a copy (clone), and receive elements.

Optional handle

handle?: string

Drag handle selector within list items

Optional ignore

ignore?: string

Optional invertSwap

invertSwap?: boolean

Will always use inverted swap zone if set to true

Optional invertedSwapThreshold

invertedSwapThreshold?: number

Threshold of the inverted swap zone (will be set to swapThreshold value by default)

Optional preventOnFilter

preventOnFilter?: boolean

Call event.preventDefault() when triggered filter

Optional removeCloneOnHide

removeCloneOnHide?: boolean

Remove the clone element when it is not showing, rather than just hiding it

Optional sort

sort?: boolean

sorting inside list

Optional store

store?: { get: any; set: any }

Type declaration

  • get:function
    • Parameters

      Returns string[]

  • set:function
    • Parameters

      Returns void

Optional swapThreshold

swapThreshold?: number

Threshold of the swap zone. Defaults to 1

Optional touchStartThreshold

touchStartThreshold?: number

How many pixels the point should move before cancelling a delayed drag event

Methods

Optional onAdd

  • Element is dropped into the list from another list

    Parameters

    Returns void

Optional onChange

  • Called when dragging element changes position

    Parameters

    Returns void

Optional onChoose

  • Element is chosen

    Parameters

    Returns void

Optional onClone

  • Created a clone of an element

    Parameters

    Returns void

Optional onEnd

  • Element dragging ended

    Parameters

    Returns void

Optional onFilter

  • Attempt to drag a filtered element

    Parameters

    Returns void

Optional onMove

  • onMove(evt: MoveEvent, originalEvent: Event): boolean | void | 1 | -1
  • Event when you move an item in the list or between lists

    Parameters

    Returns boolean | void | 1 | -1

Optional onRemove

  • Element is removed from the list into another list

    Parameters

    Returns void

Optional onSort

  • Called by any change to the list (add / update / remove)

    Parameters

    Returns void

Optional onStart

  • Element dragging started

    Parameters

    Returns void

Optional onUnchoose

  • Element is unchosen

    Parameters

    Returns void

Optional onUpdate

  • Changed sorting within list

    Parameters

    Returns void

Optional setData

  • setData(dataTransfer: DataTransfer, draggedElement: HTMLElement): void
  • Parameters

    • dataTransfer: DataTransfer
    • draggedElement: HTMLElement

    Returns void

Generated using TypeDoc