Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Extra space on the bottom of grid when loading new records and scrolling back up #13441

Closed
swensel opened this issue Jun 11, 2024 · 6 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@swensel
Copy link

swensel commented Jun 11, 2024

Steps to reproduce

I had filed a separate issue #13301 recently. This bug is a different case.

The grid that's having an issue is using the infinite loading feature. My team has noticed that when upgrading from @mui/x-data-grid-pro v5.12.0 to v7.5.1, that there's a lot of extra white space on the bottom of the grid, after loading new records and then scrolling back up. We only notice this on v7.5.1, not on v5.12.0. I've attached a video of the issue we are having with v7.5.1.

Video.1.compressed.mp4

This looks like a bug?

Current behavior

There's a lot of extra white space on the bottom of the grid, after loading new records and then scrolling back up.

Expected behavior

There shouldn't be extra white space on the bottom of the grid, after loading new records and then scrolling back up.

Context

We would like to use the infinite loading feature and have there not be extra space on the grid when scrolling back up.

Your environment

`npx @mui/envinfo`
  System:
    OS: macOS 14.5
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    pnpm: Not Found
  Browsers:
    Chrome: 125.0.6422.61
    Edge: 121.0.2277.128
    Safari: 17.5
  npmPackages:
    @emotion/react: ^11.7.1 => 11.11.4 
    @emotion/styled: ^11.6.0 => 11.11.5 
    @mui/base:  5.0.0-beta.40 
    @mui/core-downloads-tracker:  5.15.19 
    @mui/icons-material: ^5.15.19 => 5.15.19 
    @mui/material: ^5.15.19 => 5.15.19 
    @mui/private-theming:  5.15.14 
    @mui/styled-engine:  5.15.14 
    @mui/system:  5.15.15 
    @mui/types:  7.2.14 
    @mui/utils:  5.15.14 
    @mui/x-data-grid: ^7.5.1 => 7.5.1 
    @mui/x-data-grid-pro: ^7.5.1 => 7.5.1 
    @mui/x-date-pickers: ^7.5.1 => 7.5.1 
    @mui/x-license: ^7.2.1 => 7.2.1 
    @types/react: ^17.0.1 => 17.0.80 
    react: ^17.0.1 => 17.0.2 
    react-dom: ^17.0.1 => 17.0.2 
    typescript: ^4.8.4 => 4.9.5 

Search keywords: extra space infinte loading
Order ID: 90881

@swensel swensel added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 11, 2024
@michelengelen michelengelen added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels Jun 11, 2024
@michelengelen michelengelen changed the title [Infinite loading] Extra space on the bottom of grid when loading new records and scrolling back up [data grid] Extra space on the bottom of grid when loading new records and scrolling back up Jun 11, 2024
@michelengelen
Copy link
Member

Hey @swensel

To help us diagnose the issue efficiently, could you provide a stripped-down reproduction test case using the latest version? A live example would be fantastic! ✨

For your convenience, our documentation offers templates and guides on creating targeted examples: Support - Bug reproduction

Just a friendly reminder: clean, functional code with minimal dependencies is most helpful. Complex code can make it tougher to pinpoint the exact issue. Sometimes, simply going through the process of creating a minimal reproduction can even clarify the problem itself!

Thanks for your understanding! 🙇🏼

@michelengelen michelengelen added status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 11, 2024
Copy link

The issue has been inactive for 7 days and has been automatically closed.

swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Jul 20, 2024
swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Jul 20, 2024
swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Jul 20, 2024
swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Jul 20, 2024
swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Jul 20, 2024
@swensel
Copy link
Author

swensel commented Jul 20, 2024

Hi @michelengelen , here is a github repo that reproduces this issue: https://github.com/swensel/MUI-bug-demo-13441
Demo on Stackblitz: https://stackblitz.com/edit/react-gothse?file=Demo.tsx

In the end, it was not related to infinite loading. It was related to a custom row height:

slotProps={{
  row: {
    rowHeight: 40,
  },
}}

Here's a video demonstrating the issue when row height is present:

MUI.13441.-.extra.space.row.height.mp4

Also, here's a video when row height is not present (no issue in this case):

MUI.13441.-.extra.space.no.row.height.mp4

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jul 20, 2024
@github-actions github-actions bot reopened this Jul 20, 2024
@michelengelen
Copy link
Member

Thanks for the reproduction demo @swensel ... @romgrk could you have a look please? Thanks!

@cherniavskii cherniavskii added regression A bug, but worse and removed bug 🐛 Something doesn't work labels Jul 23, 2024
@cherniavskii
Copy link
Member

Hi @swensel
I just realized you're passing the rowHeight prop to the row slot.
You should use the rowHeight prop instead because the row slot is only one of the places that use this information.
Here is a working demo: https://stackblitz.com/edit/react-gothse-mu4dc9?file=Demo.tsx

@cherniavskii cherniavskii added status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it and removed regression A bug, but worse status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jul 23, 2024
@cherniavskii cherniavskii closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
Copy link

⚠️ This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

@swensel: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

swensel added a commit to swensel/MUI-bug-demo-13441 that referenced this issue Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Rendering layout Related to the data grid Rendering engine status: expected behavior Does not imply the behavior is intended. Just that we know about it and can't work around it support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

3 participants