Skip to content

[data grid] Row ordering does not automatically scroll when trying to drag beyond visible rows #16414

@MateuszDev

Description

@MateuszDev

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/embed/wl3pg4?module=/src/Demo.tsx&fontsize=12
  2. Grab any row and try to reorder outside the visible rows.
  3. DataGrid does not scroll autmatically
mui-datagrid-v7.mov

Current behavior

DataGrid does not scroll autmatically while reordering

mui-datagrid-v7.mov

Expected behavior

DataGrid does scroll autmatically while reordering like in live example from mui datagrid v6.20.4: https://v6.mui.com/x/react-data-grid/row-ordering/

mui-datagrid-v6.mov

Context

In DataGrid v6.20.4, row reordering works correctly, but in v7.24.1, scrolling stops while reordering. Please restore the behavior from v6.20.4.

Your environment

npx @mui/envinfo
    System:
    OS: macOS 14.4
  Binaries:
    Node: 18.20.5 - ~/.nvm/versions/node/v18.20.5/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v18.20.5/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 132.0.6834.160
    Edge: Not Found
    Safari: 17.4
  npmPackages:
    @emotion/react: 11.11.1 => 11.11.1 
    @emotion/styled: 11.11.0 => 11.11.0 
    @mui/base: ^5.0.0-beta.58 => 5.0.0-beta.59 
    @mui/core-downloads-tracker:  6.1.4 
    @mui/icons-material: ^6.1.1 => 6.1.4 
    @mui/material: ^6.1.1 => 6.1.4 
    @mui/private-theming:  6.1.4 
    @mui/styled-engine:  6.1.4 
    @mui/system:  6.1.4 
    @mui/types:  7.2.18 
    @mui/utils:  6.1.4 
    @mui/x-data-grid:  7.24.1 
    @mui/x-data-grid-premium: ^7.24.1 => 7.24.1 
    @mui/x-data-grid-pro: ^7.18.0 => 7.24.1 
    @mui/x-date-pickers: ^7.18.0 => 7.20.0 
    @mui/x-date-pickers-pro: ^7.18.0 => 7.20.0 
    @mui/x-internals:  7.20.0 
    @mui/x-license: ^7.18.0 => 7.20.0 
    @types/react: 18.2.33 => 18.2.33 
    react: 18.2.0 => 18.2.0 
    react-dom: 18.2.0 => 18.2.0 
    styled-components: ^5.3.9 => 5.3.11 
    typescript: 5.2.2 => 5.2.2 

Search keywords: data gird row ordering not automatically scroll drag

Order ID: 100890

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature: ReorderingRelated to the data grid Reordering featureplan: ProImpact at least one Pro user.scope: data gridChanges related to the data grid.support: premium standardSupport request from a Premium standard plan user. https://mui.com/legal/technical-support-sla.type: regressionA bug, but worse, it used to behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions