getRowId | (row: TRow) => string | | Id generator function. |
columns | ColumnDefintion<TRow extends object> | | Set of columns of type GridColDef[]. |
rows | Array<TRow> | | Set of rows of type GridRowsProp. |
headerHeight | number | 50 | If true, a loading overlay is displayed. |
loading | boolean | false | If true, a loading overlay is displayed. |
height | string | undefined | | Value passed directly to the height style-like property. height or autoHeight is required. |
autoHeight | boolean | false | If true, the grid height is dynamic and follow the number of rows in the grid. height or autoHeight is required |
paginationMode | client | server | client | Pagination can be processed on the server or client-side. Set it to client if you would like to handle the pagination on the client-side. Set it to server if you would like to handle the pagination on the server-side. |
pagination | boolean | false | Pagination component rendered in the grid footer by default. |
rowCount | number | undefined | Set the total number of rows, if it is different from the length of the value rows prop. If some rows have children (for instance in the tree data), this number represents the amount of top level rows. |
rowsPerPageOptions | Array<number> | [25, 50, 100] | Select dropdown will be filled with these values, calling onPageSizeChange when modified |
pageSize | number | 100 | Set the number of rows in one page. If some of the rows have children (for instance in the tree data), this number represents the amount of top level rows wanted on each page. |
onPageSizeChange | (pageSize: number) => void; | undefined | Callback fired when the page size has changed. |
page | number | 0 | The zero-based index of the current page. |
onPageChange | (page: size) => void | undefined | Callback fired when the current page has changed. |
onSortModelChange | () => void | undefined | Callback fired when the sort model changes before a column is sorted. |
sortingMode | client | server | client | Sorting can be processed on the server or client-side. Set it to client if you would like to handle sorting on the client-side. Set it to server if you would like to handle sorting on the server-side. |
checkboxSelection | boolean | false | If true, the grid get a first column with a checkbox that allows to select rows. |
onSelectionModelChange | () => void | undefined | Callback fired when the selection state of one or multiple rows changes. |
keepNonExistentRowsSelected | boolean | false | If true, the selection model will retain selected rows that do not exist. Useful when using server side pagination and row selections need to be retained when changing pages. |
selectionModel | Array<string> | [] | Set the selection model of the grid. |
disableSelectionOnClick | boolean | false | If true, the selection on click on a row or cell is disabled. |
disableColumnMenu | boolean | false | If true, the column menu is disabled. |
toolbar | React.ReactNode | undefined | Element to be rendered at the top of the grid, see <GridToolbar />. |