New to KendoReact? Start a free 30-day trial
Auto Scroll
Auto ScrollPremium
By default, the KendoReact useDraggable hook and Draggable component will scroll the nearest scrollable parent element whenever the drag reaches any of it's edges.
Use the
scrollXandscrollYarguments from the Drag&Drop callbacks to correctly calculate the new position of the element.
The following example demonstrates how the Auto Scroll functionality behaves in a scrollable container.
Change Theme
Theme
Loading ...
Disabling the Auto Scroll
To disable the Auto Scroll functionality, use either of the following approaches:
-
Set the
autoScrollargument to theuseDraggablehook.jsxuseDraggable(element, { ...callbacks }, { autoScroll: false }); -
Set the
autoScrollproperty of theDraggablecomponent.jsx<Draggable autoScroll={false}> <div>Drag Me!</div> </Draggable>