Skip to main content

DragAndDropFeatureConfig <T>

Index

Properties

optionalcanDrag

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

Type declaration

optionalcanDrop

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

Type declaration

optionalcanDropForeignDragObject

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

Type declaration

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

      Returns boolean

optionalcanReorder

canReorder?: boolean

optionalcreateForeignDragObject

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

Type declaration

    • Parameters

      Returns { data: any; format: string }

      • data: any
      • format: string

optionalindent

indent?: number

optionalonCompleteForeignDrop

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

Type declaration

optionalonDrop

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

Type declaration

optionalonDropForeignDragObject

onDropForeignDragObject?: (dataTransfer: DataTransfer, target: DragTarget<T>) => void | Promise<void>

Type declaration

    • (dataTransfer: DataTransfer, target: DragTarget<T>): void | Promise<void>
    • Parameters

      Returns void | Promise<void>

optionalreorderAreaPercentage

reorderAreaPercentage?: number

Defines the size of the area at the top and bottom of an item where, when an item is dropped, the item willö be placed above or below the item within the same parent, as opposed to being placed inside the item. If canReorder is false, this is ignored.

optionalsetDndState

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