Skip to main content

Interface: DnDEvent<DragData, DropData>

Defined in: types/index.ts:36

Interface representing a drag and drop event with associated data.

Type Parameters​

DragData​

DragData extends object

The type of data being dragged

DropData​

DropData extends object = DragData

The type of data for drop targets (defaults to DragData)

Properties​

type​

type: DnDEventType

Defined in: types/index.ts:41

The type of drag and drop event


target?​

optional target: null | number

Defined in: types/index.ts:43

The ID of the drag target element


dropTarget?​

optional dropTarget: null | DropTarget<DropData>

Defined in: types/index.ts:45

The drop target that the drag is currently over


dropTargetIndex?​

optional dropTargetIndex: null | number

Defined in: types/index.ts:47

The index position within the drop target


data?​

optional data: null | DragData

Defined in: types/index.ts:49

The data associated with the drag operation


dragCoords?​

optional dragCoords: null | DragCoords

Defined in: types/index.ts:51

The current coordinates of the drag operation