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] Skeleton loading overlay doesn't sync with the scroll #16436

Closed
MBilalShafi opened this issue Feb 3, 2025 · 1 comment · Fixed by #16437
Closed

[data grid] Skeleton loading overlay doesn't sync with the scroll #16436

MBilalShafi opened this issue Feb 3, 2025 · 1 comment · Fixed by #16437
Assignees
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!

Comments

@MBilalShafi
Copy link
Member

MBilalShafi commented Feb 3, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/skeleton-loading-overlay-bug-z4hyjs
  2. Note that the scroll isn't in sync with the skeleton loading overlay
  3. Try uncommenting the line noRowsVariant: "skeleton" to fix the issue

Current behavior

For the scroll to be in-sync with the skeleton loading, we explicitly have to pass slotProps.loadingOverlay.noRowsVariant: 'skeleton' since the GridOverlayWrapper does some styling computation based on that.

loadingOverlayVariant !== 'skeleton'
? {
position: 'sticky', // To stay in place while scrolling
top: 'var(--DataGrid-headersTotalHeight)', // TODO: take pinned rows into account
left: 0,
right: `${right}px`,
width: 0, // To stay above the content instead of shifting it down
height: 0, // To stay above the content instead of shifting it down
zIndex:
overlayType === 'loadingOverlay'
? 5 // Should be above pinned columns, pinned rows, and detail panel
: 4, // Should be above pinned columns and detail panel
}

Expected behavior

The skeleton loading overlay works without the explicit need to pass the slot prop.

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: skeleton overlay

@MBilalShafi MBilalShafi added bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 3, 2025
@MBilalShafi MBilalShafi removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 3, 2025
@MBilalShafi MBilalShafi self-assigned this Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

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.

@MBilalShafi MBilalShafi changed the title [data grid] Skeleton loading overlay doen't sync with the scroll [data grid] Skeleton loading overlay doesn't sync with the scroll Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant