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!
Looking for a way to set the height of the grid based on the desired amount of rows to be visible at once. A heightInRows(better name required) prop that takes an amount of rows and sizes the grid to accommodate for this exact amount. To avoid a small space underneath the last row.
This would play well with the autoPageSize property to have a grid that sizes and paginates on a predefined amount of rows. autoHeight together with pagination is not enough as it can't account for height during loading, or for fewer items on the last page.
Perhaps it would even make sense to overload the autoHeight property to take a number?
Examples
I guess the best analogy would be the rows property of the native textarea
Summary
Looking for a way to set the height of the grid based on the desired amount of rows to be visible at once. A
heightInRows
(better name required) prop that takes an amount of rows and sizes the grid to accommodate for this exact amount. To avoid a small space underneath the last row.This would play well with the
autoPageSize
property to have a grid that sizes and paginates on a predefined amount of rows.autoHeight
together with pagination is not enough as it can't account for height during loading, or for fewer items on the last page.Perhaps it would even make sense to overload the
autoHeight
property to take a number?Examples
I guess the best analogy would be the
rows
property of the nativetextarea
Motivation
No response
Search keywords: rows height