View as Markdown

API reference: @salmonui/data-grid/engine

DropTargetinterface

import type { DropTarget } from '@salmonui/data-grid/engine';

Also exported from @salmonui/data-grid/engine/row-drag-drop.

interface DropTarget extends DropPoint {
    readonly dropIndex: number;
    readonly valid: boolean;
    readonly reason: string | null;
}
DropTarget members (9, 6 inherited)
NameSignatureDescription
dropIndexreadonly dropIndex: number;

The data row index the first dropped row takes after the drop (reorderRows(fromIndexes, dropIndex) semantics); -1 when unknown (a collapsed group's rows).

validreadonly valid: boolean;
reasonreadonly reason: string | null;

self, sorted, groupChange, lazyGroups, emptyGroup, or null.

indexinheritedindex: number;

Visible index (clamped); count when the model is empty.

rowIdinheritedrowId: string | null;

Id of the row under the pointer, or null for an empty model.

kindinheritedkind: RowKind;
positioninheritedposition: DropPosition;
groupIdinheritedgroupId: string | null;

Group (caption row id) the drop lands in, or null when ungrouped.

parentIdoptionalinheritedparentId?: string | null;

Tree mode: the parent the dropped rows join (null: roots); absent outside tree mode.