View as Markdown

API reference: @salmonui/dropdowns/listbox

ListboxDropEventinterface

import type { ListboxDropEvent } from '@salmonui/dropdowns/listbox';
interface ListboxDropEvent<T> {
    readonly values: readonly ListboxKey[];
    readonly items: readonly T[];
    readonly fromList: string;
    readonly dragGroup: string;
    readonly toIndex: number;
    readonly source: ListboxEventSource;
}

onItemDrop argument, fired on the receiving list.

ListboxDropEvent members (6)
NameSignatureDescription
valuesreadonly values: readonly ListboxKey[];
itemsreadonly items: readonly T[];

The dragged items, from the source list's data.

fromListreadonly fromList: string;

id of the source list (the id prop, or a generated id).

dragGroupreadonly dragGroup: string;
toIndexreadonly toIndex: number;

Insertion index in this list's data.

sourcereadonly source: ListboxEventSource;