[DataGrid] Fix error logged during skeleton loading with nested data grid#14186
Merged
kenanyusuf merged 3 commits intomui:masterfrom Aug 14, 2024
Merged
Conversation
|
Deploy preview: https://deploy-preview-14186--material-ui-x.netlify.app/ |
| /* Hide grid rows and vertical scrollbar when skeleton overlay is visible */ | ||
| [`& .${c['main--hasSkeletonLoadingOverlay']}`]: { | ||
| [`& .${c.virtualScrollerContent}, & .${c['scrollbar--vertical']}, & .${c.pinnedRows}`]: { | ||
| display: 'none', |
Member
There was a problem hiding this comment.
I tried doing this instead:
visibility: 'hidden',
position: 'fixed',
It seems to work, but I'm unsure if this would work in every scenario.
What do you think?
Member
Author
There was a problem hiding this comment.
It does seem to work - I thought we tried this the other day 😅. I will do some more thorough testing to double check different scenarios.
Member
Author
There was a problem hiding this comment.
This seems to be the ideal combination here. The virtual scroller content retains it's height with visibility: hidden, fixing the issue with nested data grid. And position: fixed takes the element out of the flow. Will make the change, thanks @cherniavskii for taking a look.
cherniavskii
approved these changes
Aug 14, 2024
This was referenced Sep 19, 2024
This was referenced Sep 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the skeleton loader is active, we hide the data grid scroller contents and vertical scrollbar with CSS. This works well for most cases, however, causes an issue when a data grid is nested within master details. A short summary of what happens:
loadingprop gets set totrueMUI X: useResizeContainer - The parent DOM element of the data grid has an empty height. Please make sure that this element has an intrinsic height. The grid displays with a height of 0px.Fixes #14061