Skip to main content

DragAndDropConfig

DragAndDropConfig = object

Properties

acceptedDragTypes?

optional acceptedDragTypes: string[]


getItems()

getItems: (key) => DragItem[]

Parameters

key

Set<Key>

Returns

DragItem[]


onInsert()?

optional onInsert: (e) => void

Handler that is called when external items are dropped "between" items.

Parameters

e

DroppableCollectionInsertDropEvent

Returns

void


onItemDrop()?

optional onItemDrop: (e) => void

Handler that is called when items are dropped "on" an item.

Parameters

e

DroppableCollectionOnItemDropEvent

Returns

void


onMove()?

optional onMove: (e) => void

Handler that is called when items are moved within the source collection. This handler allows dropping both on or between items, and items may be moved to a different parent item within a tree.

Parameters

e

DroppableCollectionReorderEvent

Returns

void


onReorder()?

optional onReorder: (e) => void

Handler that is called when items are reordered within the collection. This handler only allows dropping between items, not on items. It does not allow moving items to a different parent item within a tree.

Parameters

e

DroppableCollectionReorderEvent

Returns

void


onRootDrop()?

optional onRootDrop: (e) => void

Handler that is called when external items are dropped on the droppable collection's root.

Parameters

e

DroppableCollectionRootDropEvent

Returns

void


renderDragPreview()?

optional renderDragPreview: (items) => ReactElement

Parameters

items

DragItem[]

Returns

ReactElement


renderDropIndicator()?

optional renderDropIndicator: (target) => ReactElement

Parameters

target

DropTarget

Returns

ReactElement