mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.53k stars 1.32k forks source link

[data grid] Row reordering does not work with pagination #15351

Open jackstenglein opened 6 days ago

jackstenglein commented 6 days ago

Steps to reproduce

Link to live example: https://codesandbox.io/p/sandbox/row-reorder-v5r5q9

Steps:

  1. Go to the second page in the DataGrid
  2. Attempt to reorder a row on the second page
  3. The row will instead disappear and cannot be reordered

Current behavior

Rows on pages 2+ cannot be reordered.

Expected behavior

Allow reordering rows on pages other than the first page.

Context

No response

Your environment

npx @mui/envinfo ``` System: OS: macOS 14.4.1 Binaries: Node: 20.18.0 - ~/.nvm/versions/node/v20.18.0/bin/node npm: 10.9.0 - ~/.nvm/versions/node/v20.18.0/bin/npm pnpm: Not Found Browsers: Chrome: 130.0.6723.117 Edge: Not Found Safari: 17.4.1 npmPackages: @emotion/react: ^11.13.3 => 11.13.3 @emotion/styled: ^11.13.0 => 11.13.0 @mui/base: ^5.0.0-beta.61 => 5.0.0-beta.61 @mui/core-downloads-tracker: 6.1.6 @mui/icons-material: ^6.1.6 => 6.1.6 @mui/lab: ^6.0.0-beta.14 => 6.0.0-beta.14 @mui/material: ^6.0.1 => 6.1.6 @mui/material-nextjs: ^6.1.6 => 6.1.6 @mui/private-theming: 5.16.6 @mui/styled-engine: 5.16.6 @mui/system: 5.16.7 @mui/types: 7.2.19 @mui/utils: 5.16.6 @mui/x-charts: ^7.22.1 => 7.22.1 @mui/x-charts-vendor: 7.20.0 @mui/x-data-grid: 7.22.2 @mui/x-data-grid-pro: ^7.22.2 => 7.22.2 @mui/x-date-pickers: ^7.22.1 => 7.22.1 @mui/x-internals: 7.21.0 @mui/x-license: 7.21.0 @types/react: ^18.3.12 => 18.3.12 react: ^18.2.0 => 18.3.1 react-dom: ^18.2.0 => 18.3.1 typescript: ^5.4.5 => 5.5.4 ``` Used Browser: Firefox 132.0.1 (aarch64)

Search keywords: row,reorder,pagination Order ID: 101523

michelengelen commented 3 days ago

Thanks @k-rajat19 for opening a PR to fix this! 👍🏼