[DataGrid] Sometimes the last few rows aren't rendered on window change #1825
Labels
component: data grid
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
Current Behavior 馃槸
This may be related to #1784. When collapsing a sidepanel via a button, the window's width changes, which causes the table to resize to cover the additional space. However, when reopening the sidepanel, the last (one or few) row(s) won't be rendered.
Expected Behavior 馃
All rows render.
Steps to Reproduce 馃暪
It appears that mixing a
flex: #
withwidth: #
may be causing an improper table width calculation. For example, some of my rows hadflex: 2
which seemed to cause the problem in relation to the windows width. When I dropped them toflex: 1
, the width seemed to recalculate properly. That is until I resized the window's width, then some rows disappeared. Unfortunately, I don't have an easy way to replicate the issue without rebuilding the entire UI.For reference, here's how the columns are currently created:
Click to expand column layout
I'm also using a custom DataGrid that centers all of the table properties in the center of their respective row with
justify-content: center;
.Last row isn't rendered:
https://user-images.githubusercontent.com/22607722/120717894-325f6200-c47d-11eb-8399-871dad480778.mp4
I tried removing the 'Actions' row since it's being appended to the columns array, but same issue:
https://user-images.githubusercontent.com/22607722/120717940-4d31d680-c47d-11eb-8411-eed268c030fd.mp4
I adjusted all of the
flex
properties to be 1 or less, which somewhat works...https://user-images.githubusercontent.com/22607722/120718478-2fb13c80-c47e-11eb-86df-4a3e35862778.mp4
Until I resize the window:
Your Environment 馃寧
`npx @material-ui/envinfo`
The text was updated successfully, but these errors were encountered: