• What is KendoReact
  • Getting Started
  • Server Components
  • Components
    • Animation
    • Barcodes
    • Buttons
    • Chartsupdated
    • Common Utilities
    • Conversational UIupdated
    • Data Gridupdated
    • Data Query
    • Data Tools
    • Date Inputs
    • Date Math
    • Dialogs
    • Drawing
    • Dropdownsupdated
    • Editor
    • Excel Export
    • File Saver
    • Formupdated
    • Ganttupdated
    • Gauges
    • Indicators
    • Inputsupdated
    • Labels
    • Layoutupdated
    • ListBox
    • ListView
    • Map
    • Notification
    • OrgChartnew
    • PDF Processing
    • PDFViewer
    • PivotGrid
    • Popup
    • Progress Bars
    • Ripple
    • Scheduler
    • ScrollView
    • Sortable
    • Spreadsheetupdated
    • TaskBoard
    • Tooltips
    • TreeList
    • TreeViewupdated
    • Upload
  • Sample Applications
  • Styling & Themes
  • Common Features
  • Project Setup
  • Knowledge Base
  • Changelog
  • Updates
  • Troubleshooting

Auto Scroll

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 scrollX and scrollY arguments 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.

Example
View Source
Change Theme:

Disabling the Auto Scroll

To disable the Auto Scroll functionality, use either of the following approaches:

  • Set the autoScroll argument to the useDraggable hook.

        useDraggable(
            element,
            { ...callbacks },
            { autoScroll: false }
        )
  • Set the autoScroll property of the Draggable component.

        <Draggable autoScroll={false}>
            <div>Drag Me!</div>
        </Draggable>

In this article

Not finding the help you need?