Skip to main content

DragAndDropFeatureConfig <T>

Index

Properties

optionalbottomLinePercentage

bottomLinePercentage?: number

optionalcanDrag

canDrag?: (items: ItemInstance<T>[]) => boolean

Type declaration

optionalcanDrop

canDrop?: (items: ItemInstance<T>[], target: DropTarget<T>) => boolean

Type declaration

optionalcanDropForeignDragObject

canDropForeignDragObject?: (dataTransfer: DataTransfer, target: DropTarget<T>) => boolean

Type declaration

    • (dataTransfer: DataTransfer, target: DropTarget<T>): boolean
    • Parameters

      Returns boolean

optionalcanDropInbetween

canDropInbetween?: boolean

optionalcreateForeignDragObject

createForeignDragObject?: (items: ItemInstance<T>[]) => { data: any; format: string }

Type declaration

    • Parameters

      Returns { data: any; format: string }

      • data: any
      • format: string

optionalisItemDraggable

isItemDraggable?: (item: ItemInstance<T>) => boolean

Type declaration

optionalonCompleteForeignDrop

onCompleteForeignDrop?: (items: ItemInstance<T>[]) => void

Runs in the onDragEnd event, if ev.dataTransfer.dropEffect is not none, i.e. the drop was not aborted. No target is provided as parameter since the target may be a foreign drop target. This is useful to seperate out the logic to move dragged items out of their previous parents. Use onDrop to handle drop-related logic.

This ignores the canDrop handler, since the drop target is unknown in this handler.


Type declaration

optionalonDrop

onDrop?: (items: ItemInstance<T>[], target: DropTarget<T>) => void

Type declaration

optionalonDropForeignDragObject

onDropForeignDragObject?: (dataTransfer: DataTransfer, target: DropTarget<T>) => void

Type declaration

    • (dataTransfer: DataTransfer, target: DropTarget<T>): void
    • Parameters

      Returns void

optionalsetDndState

setDndState?: SetStateFn<null | DndState<T>>

optionaltopLinePercentage

topLinePercentage?: number