New to KendoReactStart a free 30-day trial

Represents the props of the KendoReact Draggable component.

Definition

Package:@progress/kendo-react-common

Properties

Set the autoScroll property to false to disable automatic container scroll when close to the edge. For more information, refer to the Auto Scroll article.

Defaults to true.

childRef?

Ref​<null | HTMLElement | { [key: string]: any }>

Callback to get the child element ref. Useful as the Draggable overrides ref of the child element.

context?

Context​<{ drag?: null | RefObject​<null | DragTarget>; setDrag?: (value: null | RefObject​<DragTarget>) => void; drop?: null | RefObject​<null | DropTarget>; setDrop?: (value: null | RefObject​<DropTarget>) => void; drags?: RefObject​<null | DragTarget>[]; registerDrag?: (item: RefObject​<null | DragTarget>) => void; deregisterDrag?: (item: RefObject​<null | DragTarget>) => void; drops?: RefObject​<null | DropTarget>[]; registerDrop?: (item: RefObject​<null | DragTarget>) => void; deregisterDrop?: (item: RefObject​<null | DragTarget>) => void }>

Allows passing custom context. Use it to isolate drag and drop events in scenarios with multiple drag and drop functionalities on a single component.

hint?

null | RefObject​<null | HTMLElement | { element: null | HTMLElement }>

Set the hint to override the element used for collision detection.

For more information, refer to the Drag Hint article.

mouseOnly?

boolean

Set the mouseOnly property to true to stop the draggable from attaching touch event handlers.

Defaults to false.

onDrag?

(event: DraggableDragEvent) => void

Fires when the user drag the element inside the Draggable component.

Parameters:eventDraggableDragEvent

Fires when the user finishes dragging the element inside the Draggable component.

Parameters:eventDraggableDragEndEvent

Fires when the user starts dragging the element inside the Draggable component.

Parameters:eventDraggableDragStartEvent

Fires when the user press element inside the Draggable component.

Parameters:eventDraggablePressEvent

Fires when the user release the current drag action.

Parameters:eventDraggableReleaseEvent