mui / mui-x

MUI X: Build complex and data-rich applications using a growing list of advanced React components, like the Data Grid, Date and Time Pickers, Charts, and more!
https://mui.com/x/
4.07k stars 1.26k forks source link

[data grid] Updating `rowHeight` and `paginationModel` doesn't display all page rows #13949

Open adrian-shoreline opened 1 month ago

adrian-shoreline commented 1 month ago

Steps to reproduce

Link to live example: (required) Demo Link

Video:

https://github.com/user-attachments/assets/a1effdad-ca16-4f55-81f6-d482934a4ddf

Steps:

  1. Use controlled props for rowHeight and paginationModel in state
  2. Change rowHeight and paginationModel pageSize

Current behavior

Some rows are not visible after rowHeight and paginationMode pageSize has changed. On DataGrid scroll the rows are displayed

Expected behavior

The grid view should display rows based on paginationModel pageSize.

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: DataGrid, rowHeight, paginationModel

michelengelen commented 1 month ago

Hey @adrian-shoreline ... I can confirm this bug. I'll add it to the board so the team can have a look.

Interestingly the update works just fine if you stagger both state changes!

adrian-shoreline commented 1 month ago

Hi @michelengelen! Thank you for your prompt response. Indeed as a temporary solution the workaround you described seems to work for now. Thank you!