View as Markdown

API reference: @salmonui/kanban

KanbanCardMoveEventinterface

import type { KanbanCardMoveEvent } from '@salmonui/kanban';
interface KanbanCardMoveEvent<T> extends KanbanCancelableEvent {
    readonly cardId: KanbanKey;
    readonly cardIds: readonly KanbanKey[];
    readonly cards: readonly T[];
    readonly from: KanbanCellRef;
    readonly to: KanbanCellRef;
    readonly index: number;
    readonly source: KanbanEventSource;
    readonly external: 'in' | 'out' | null;
}

onCardMove.

KanbanCardMoveEvent members (10, 2 inherited)
NameSignatureDescription
cardIdreadonly cardId: KanbanKey;

The first moved card.

cardIdsreadonly cardIds: readonly KanbanKey[];
cardsreadonly cards: readonly T[];

Moved cards before the move.

fromreadonly from: KanbanCellRef;
toreadonly to: KanbanCellRef;
indexreadonly index: number;

Insertion index among the other cards of the target cell.

sourcereadonly source: KanbanEventSource;
externalreadonly external: 'in' | 'out' | null;

'in' on the receiving board and 'out' on the source board of a drop between boards.

preventDefaultinheritedpreventDefault: () => void;
defaultPreventedinheriteddefaultPrevented: boolean;