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.54k stars 1.32k forks source link

[data grid] Pinned rows are hidden after unpinning #15302

Open bwood21 opened 1 week ago

bwood21 commented 1 week ago

Steps to reproduce

Link to live example. This example is based on the MUI pinning example, but using GridApiRef to set rows instead of using the rows prop.

Steps:

  1. Click 'add row'
  2. Click 'pin at the top' on any row
  3. Click 'unpin' on a pinned row

Current behavior

The unpinned row is hidden

Expected behavior

The unpinned row should be shown in the table as it was before it was pinned

Context

I am trying to pin and unpin rows while using gridApiRef.current.updateRows() - the use case is a large, rapidly updating dataset that has significant performance issues when just using the rows prop to update the table. I am using 7.11.0 in my project, but this issue also occurs on the latest version. This issue is similar to #8013 - I am opening a new issue with an OrderID as requested by MUI X email support.

Your environment

npx @mui/envinfo ``` I'm running this on WSL and using Chrome from a Windows machine, so the info might be a bit strange here. System: OS: Linux 5.10 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish) Binaries: Node: 22.2.0 - ~/.nvm/versions/node/v22.2.0/bin/node npm: 10.7.0 - ~/.nvm/versions/node/v22.2.0/bin/npm pnpm: 9.1.0 - ~/.nvm/versions/node/v22.2.0/bin/pnpm Browsers: Chrome: 130.0.6723.70 (Official Build) (64-bit) ```

Search keywords: pin pinning gridApiRef Order ID: 87442

michelengelen commented 1 week ago

That's definitely weird... I couldn't find a quick solution for this as well. I'll add it to the board for the team to have a look! 👍🏼