Resortable - v2.0.0-alpha.1
    Preparing search index...

    Interface SortableEvent

    Event object passed to Sortable event callbacks

    This object contains information about the drag operation, including the affected elements and their positions.

    interface SortableEvent {
        item: HTMLElement;
        to: HTMLElement;
        from: HTMLElement;
        oldIndex?: number;
        newIndex?: number;
        oldDraggableIndex?: number;
        newDraggableIndex?: number;
        clone?: HTMLElement;
        pullMode?: boolean | "clone" | "move";
        items: HTMLElement[];
    }

    Hierarchy (View Summary)

    Index

    Properties

    item: HTMLElement

    The dragged element

    to: HTMLElement

    The list that the element was dragged to

    from: HTMLElement

    The list that the element was dragged from

    oldIndex?: number

    Old index of the element (before drag)

    May be undefined for add/remove operations

    newIndex?: number

    New index of the element (after drag)

    May be undefined for add/remove operations

    oldDraggableIndex?: number

    Old index among draggable elements only

    Excludes non-draggable items from count

    newDraggableIndex?: number

    New index among draggable elements only

    Excludes non-draggable items from count

    clone?: HTMLElement

    Cloned element (when using group.pull: 'clone')

    Only present in clone operations

    pullMode?: boolean | "clone" | "move"

    Pull mode used for this operation

    • 'clone' when cloning
    • 'move' or true when moving
    • false or undefined for same-list operations
    items: HTMLElement[]

    Array of selected elements (multi-drag mode)