So in mui grid 5 this worked nicely. The grid should overflow in itself and create a scroolbar. Now its makes the window scroll and grow it. Why?
Asked
Active
Viewed 238 times
1 Answers
0
I hit the same issue recently going to v6.3.1.
It seems immediately wrapping your DataGrid component with a simple div with a height fixes the issue. The vertical scroll will now appear on the component itself, as it did with v5. I already had a component with a minHeight size that was working nicely, as you said.
<div style={{ height: '77vh' }}>
<DataGrid
.
.
.
</div>
Hope this helps!

Jim
- 359
- 2
- 15
-
Yes that works nicely. But that's kinda meh. I need the parent to be a flex so it fills it's own parent which is 100vh. – Hodl May 13 '23 at 20:12