-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DataGridPro] Fix scrolling performance when
rowHeight={undefined}
(#…
- Loading branch information
1 parent
05e83ee
commit 78cb399
Showing
7 changed files
with
113 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './DataGrid'; | ||
export { DATA_GRID_PROPS_DEFAULT_VALUES } from './useDataGridProps'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
packages/x-data-grid/src/constants/dataGridPropsDefaultValues.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { GridEditModes } from '../models/gridEditRowModel'; | ||
import type { DataGridPropsWithDefaultValues } from '../models/props/DataGridProps'; | ||
|
||
/** | ||
* The default values of `DataGridPropsWithDefaultValues` to inject in the props of DataGrid. | ||
*/ | ||
export const DATA_GRID_PROPS_DEFAULT_VALUES: DataGridPropsWithDefaultValues = { | ||
autoHeight: false, | ||
autoPageSize: false, | ||
autosizeOnMount: false, | ||
checkboxSelection: false, | ||
checkboxSelectionVisibleOnly: false, | ||
clipboardCopyCellDelimiter: '\t', | ||
columnBufferPx: 150, | ||
columnHeaderHeight: 56, | ||
disableAutosize: false, | ||
disableColumnFilter: false, | ||
disableColumnMenu: false, | ||
disableColumnReorder: false, | ||
disableColumnResize: false, | ||
disableColumnSelector: false, | ||
disableColumnSorting: false, | ||
disableDensitySelector: false, | ||
disableEval: false, | ||
disableMultipleColumnsFiltering: false, | ||
disableMultipleColumnsSorting: false, | ||
disableMultipleRowSelection: false, | ||
disableRowSelectionOnClick: false, | ||
disableVirtualization: false, | ||
editMode: GridEditModes.Cell, | ||
filterDebounceMs: 150, | ||
filterMode: 'client', | ||
hideFooter: false, | ||
hideFooterPagination: false, | ||
hideFooterRowCount: false, | ||
hideFooterSelectedRowCount: false, | ||
ignoreDiacritics: false, | ||
ignoreValueFormatterDuringExport: false, | ||
// TODO v8: Update to 'select' | ||
indeterminateCheckboxAction: 'deselect', | ||
keepColumnPositionIfDraggedOutside: false, | ||
keepNonExistentRowsSelected: false, | ||
loading: false, | ||
logger: console, | ||
logLevel: process.env.NODE_ENV === 'production' ? ('error' as const) : ('warn' as const), | ||
pageSizeOptions: [25, 50, 100], | ||
pagination: false, | ||
paginationMode: 'client', | ||
resizeThrottleMs: 60, | ||
rowBufferPx: 150, | ||
rowHeight: 52, | ||
rowPositionsDebounceMs: 166, | ||
rows: [], | ||
rowSelection: true, | ||
rowSpacingType: 'margin', | ||
showCellVerticalBorder: false, | ||
showColumnVerticalBorder: false, | ||
sortingMode: 'client', | ||
sortingOrder: ['asc' as const, 'desc' as const, null], | ||
throttleRowsMs: 0, | ||
unstable_rowSpanning: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters