@mui/x-data-grid 8.0.0-alpha.12 → 8.0.0-alpha.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +299 -0
- package/DataGrid/DataGrid.js +31 -22
- package/DataGrid/useDataGridProps.js +1 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/components/GridFooter.js +1 -1
- package/components/GridHeader.js +1 -1
- package/components/GridPagination.js +5 -6
- package/components/GridRowCount.js +4 -5
- package/components/GridScrollArea.js +4 -3
- package/components/GridSelectedRowCount.js +5 -6
- package/components/GridShadowScrollArea.d.ts +8 -0
- package/components/GridShadowScrollArea.js +82 -0
- package/components/cell/GridEditInputCell.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/components/columnsManagement/GridColumnsManagement.js +59 -61
- package/components/containers/GridOverlay.js +6 -8
- package/components/containers/GridRoot.js +4 -2
- package/components/containers/GridRootStyles.d.ts +1 -2
- package/components/containers/GridRootStyles.js +77 -100
- package/components/containers/GridToolbarContainer.js +5 -6
- package/components/menu/GridMenu.js +7 -6
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -3
- package/components/panel/GridPanel.js +18 -20
- package/components/panel/GridPanelContent.js +6 -8
- package/components/panel/GridPanelFooter.js +5 -6
- package/components/panel/GridPanelHeader.js +4 -5
- package/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +20 -45
- package/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/components/virtualization/GridVirtualScrollbar.js +8 -5
- package/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/constants/cssVariables.d.ts +294 -0
- package/constants/cssVariables.js +168 -0
- package/constants/dataGridPropsDefaultValues.js +1 -0
- package/constants/defaultGridSlotsComponents.js +1 -1
- package/constants/gridClasses.d.ts +13 -0
- package/constants/gridClasses.js +1 -1
- package/context/GridContextProvider.js +4 -1
- package/esm/DataGrid/DataGrid.js +31 -22
- package/esm/DataGrid/useDataGridProps.js +1 -1
- package/esm/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/esm/components/GridFooter.js +2 -2
- package/esm/components/GridHeader.js +1 -1
- package/esm/components/GridPagination.js +5 -6
- package/esm/components/GridRowCount.js +4 -5
- package/esm/components/GridScrollArea.js +2 -1
- package/esm/components/GridSelectedRowCount.js +5 -6
- package/esm/components/GridShadowScrollArea.d.ts +8 -0
- package/esm/components/GridShadowScrollArea.js +74 -0
- package/esm/components/cell/GridEditInputCell.js +2 -3
- package/esm/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/esm/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/esm/components/containers/GridOverlay.js +6 -8
- package/esm/components/containers/GridRoot.js +4 -2
- package/esm/components/containers/GridRootStyles.d.ts +1 -2
- package/esm/components/containers/GridRootStyles.js +78 -101
- package/esm/components/containers/GridToolbarContainer.js +5 -6
- package/esm/components/menu/GridMenu.js +7 -6
- package/esm/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/esm/components/panel/GridPanel.js +18 -20
- package/esm/components/panel/GridPanelContent.js +6 -8
- package/esm/components/panel/GridPanelFooter.js +5 -6
- package/esm/components/panel/GridPanelHeader.js +4 -5
- package/esm/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/esm/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/esm/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/esm/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/esm/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/esm/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/esm/constants/cssVariables.d.ts +294 -0
- package/esm/constants/cssVariables.js +161 -0
- package/esm/constants/dataGridPropsDefaultValues.js +1 -0
- package/esm/constants/defaultGridSlotsComponents.js +2 -2
- package/esm/constants/gridClasses.d.ts +13 -0
- package/esm/constants/gridClasses.js +1 -1
- package/esm/context/GridContextProvider.js +4 -1
- package/esm/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/esm/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/esm/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/esm/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/esm/hooks/features/columns/index.d.ts +1 -1
- package/esm/hooks/features/columns/index.js +1 -1
- package/esm/hooks/features/columns/useGridColumns.js +4 -2
- package/esm/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/esm/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/esm/hooks/features/dataSource/index.d.ts +2 -0
- package/esm/hooks/features/dataSource/index.js +2 -0
- package/esm/hooks/features/dataSource/models.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/esm/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/esm/hooks/features/editing/useGridCellEditing.js +2 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +2 -1
- package/esm/hooks/features/export/utils.js +4 -2
- package/esm/hooks/features/focus/useGridFocus.js +3 -2
- package/esm/hooks/features/index.d.ts +1 -1
- package/esm/hooks/features/index.js +1 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/esm/hooks/features/rowSelection/utils.d.ts +2 -2
- package/esm/hooks/features/rowSelection/utils.js +11 -11
- package/esm/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +8 -0
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -8
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -2
- package/esm/hooks/features/rows/useGridRows.js +7 -7
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/esm/hooks/utils/useGridSelector.js +4 -1
- package/esm/hooks/utils/useIsSSR.js +4 -1
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -1
- package/esm/internals/index.js +2 -1
- package/esm/internals/utils/propValidation.js +1 -1
- package/esm/locales/bnBD.d.ts +2 -0
- package/esm/locales/bnBD.js +167 -0
- package/esm/locales/deDE.js +3 -5
- package/esm/locales/huHU.js +10 -13
- package/esm/locales/index.d.ts +1 -0
- package/esm/locales/index.js +1 -0
- package/esm/locales/ruRU.js +17 -21
- package/esm/material/index.d.ts +1 -0
- package/esm/material/index.js +164 -49
- package/esm/material/variables.d.ts +5 -0
- package/esm/material/variables.js +89 -0
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/api/gridSortApi.d.ts +1 -1
- package/esm/models/configuration/gridConfiguration.d.ts +7 -1
- package/esm/models/gridBaseSlots.d.ts +56 -6
- package/esm/models/gridDataSource.d.ts +9 -4
- package/esm/models/gridRowSelectionManager.d.ts +9 -0
- package/esm/models/gridRowSelectionManager.js +36 -0
- package/esm/models/gridRowSelectionModel.d.ts +4 -2
- package/esm/models/gridSlotsComponent.d.ts +7 -27
- package/esm/models/gridSlotsComponentsProps.d.ts +3 -11
- package/esm/models/gridSortModel.d.ts +1 -1
- package/esm/models/index.d.ts +2 -1
- package/esm/models/index.js +2 -3
- package/esm/models/props/DataGridProps.d.ts +22 -17
- package/esm/utils/css/context.d.ts +14 -0
- package/esm/utils/css/context.js +54 -0
- package/esm/utils/index.d.ts +2 -1
- package/esm/utils/index.js +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +28 -27
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/hooks/features/columns/gridColumnsSelector.js +9 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/hooks/features/columns/index.d.ts +1 -1
- package/hooks/features/columns/index.js +94 -10
- package/hooks/features/columns/useGridColumns.js +4 -2
- package/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/hooks/features/dataSource/gridDataSourceError.js +40 -0
- package/hooks/features/dataSource/index.d.ts +2 -0
- package/hooks/features/dataSource/index.js +25 -0
- package/hooks/features/dataSource/models.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/hooks/features/dimensions/useGridDimensions.js +19 -18
- package/hooks/features/editing/useGridCellEditing.js +10 -9
- package/hooks/features/editing/useGridRowEditing.js +11 -10
- package/hooks/features/export/utils.js +4 -2
- package/hooks/features/focus/useGridFocus.js +8 -7
- package/hooks/features/index.d.ts +1 -1
- package/hooks/features/index.js +11 -28
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +146 -79
- package/hooks/features/rowSelection/utils.d.ts +2 -2
- package/hooks/features/rowSelection/utils.js +10 -10
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/hooks/features/rows/gridRowsUtils.js +10 -1
- package/hooks/features/rows/useGridParamsApi.js +2 -8
- package/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +7 -7
- package/hooks/features/virtualization/useGridVirtualScroller.js +21 -25
- package/hooks/utils/useGridSelector.js +6 -2
- package/hooks/utils/useIsSSR.js +6 -2
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +15 -0
- package/internals/utils/propValidation.js +1 -1
- package/locales/bnBD.d.ts +2 -0
- package/locales/bnBD.js +173 -0
- package/locales/deDE.js +3 -5
- package/locales/huHU.js +10 -13
- package/locales/index.d.ts +1 -0
- package/locales/index.js +11 -0
- package/locales/ruRU.js +17 -21
- package/material/index.d.ts +1 -0
- package/material/index.js +170 -49
- package/material/variables.d.ts +5 -0
- package/material/variables.js +95 -0
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/api/gridSortApi.d.ts +1 -1
- package/models/configuration/gridConfiguration.d.ts +7 -1
- package/models/gridBaseSlots.d.ts +56 -6
- package/models/gridDataSource.d.ts +9 -4
- package/models/gridRowSelectionManager.d.ts +9 -0
- package/models/gridRowSelectionManager.js +43 -0
- package/models/gridRowSelectionModel.d.ts +4 -2
- package/models/gridSlotsComponent.d.ts +7 -27
- package/models/gridSlotsComponentsProps.d.ts +3 -11
- package/models/gridSortModel.d.ts +1 -1
- package/models/index.d.ts +2 -1
- package/models/index.js +34 -11
- package/models/props/DataGridProps.d.ts +22 -17
- package/modern/DataGrid/DataGrid.js +31 -22
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -3
- package/modern/components/GridFooter.js +2 -2
- package/modern/components/GridHeader.js +1 -1
- package/modern/components/GridPagination.js +5 -6
- package/modern/components/GridRowCount.js +4 -5
- package/modern/components/GridScrollArea.js +2 -1
- package/modern/components/GridSelectedRowCount.js +5 -6
- package/modern/components/GridShadowScrollArea.d.ts +8 -0
- package/modern/components/GridShadowScrollArea.js +74 -0
- package/modern/components/cell/GridEditInputCell.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +51 -17
- package/modern/components/columnsManagement/GridColumnsManagement.js +60 -62
- package/modern/components/containers/GridOverlay.js +6 -8
- package/modern/components/containers/GridRoot.js +4 -2
- package/modern/components/containers/GridRootStyles.d.ts +1 -2
- package/modern/components/containers/GridRootStyles.js +78 -101
- package/modern/components/containers/GridToolbarContainer.js +5 -6
- package/modern/components/menu/GridMenu.js +7 -6
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +2 -1
- package/modern/components/panel/GridPanel.js +18 -20
- package/modern/components/panel/GridPanelContent.js +6 -8
- package/modern/components/panel/GridPanelFooter.js +5 -6
- package/modern/components/panel/GridPanelHeader.js +4 -5
- package/modern/components/panel/filterPanel/GridFilterForm.js +13 -20
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +10 -39
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +19 -44
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +3 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +5 -6
- package/modern/components/toolbar/GridToolbarQuickFilter.js +23 -30
- package/modern/components/virtualization/GridVirtualScrollbar.js +3 -1
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +2 -1
- package/modern/constants/cssVariables.d.ts +294 -0
- package/modern/constants/cssVariables.js +161 -0
- package/modern/constants/dataGridPropsDefaultValues.js +1 -0
- package/modern/constants/defaultGridSlotsComponents.js +2 -2
- package/modern/constants/gridClasses.d.ts +13 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/context/GridContextProvider.js +4 -1
- package/modern/hooks/features/clipboard/useGridClipboard.js +3 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -1
- package/modern/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -0
- package/modern/hooks/features/columns/gridColumnsSelector.d.ts +7 -0
- package/modern/hooks/features/columns/gridColumnsSelector.js +8 -0
- package/modern/hooks/features/columns/gridColumnsUtils.d.ts +3 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +6 -3
- package/modern/hooks/features/columns/index.d.ts +1 -1
- package/modern/hooks/features/columns/index.js +1 -1
- package/modern/hooks/features/columns/useGridColumns.js +4 -2
- package/modern/hooks/features/dataSource/gridDataSourceError.d.ts +31 -0
- package/modern/hooks/features/dataSource/gridDataSourceError.js +32 -0
- package/modern/hooks/features/dataSource/index.d.ts +2 -0
- package/modern/hooks/features/dataSource/index.js +2 -0
- package/modern/hooks/features/dataSource/models.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
- package/modern/hooks/features/dataSource/useGridDataSourceBase.js +27 -17
- package/modern/hooks/features/dimensions/useGridDimensions.js +11 -10
- package/modern/hooks/features/editing/useGridCellEditing.js +2 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -1
- package/modern/hooks/features/export/utils.js +4 -2
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.d.ts +1 -1
- package/modern/hooks/features/index.js +1 -1
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +3 -3
- package/modern/hooks/features/rowSelection/gridRowSelectionSelector.js +27 -7
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +148 -81
- package/modern/hooks/features/rowSelection/utils.d.ts +2 -2
- package/modern/hooks/features/rowSelection/utils.js +11 -11
- package/modern/hooks/features/rows/gridRowsInterfaces.d.ts +1 -1
- package/modern/hooks/features/rows/gridRowsUtils.d.ts +2 -1
- package/modern/hooks/features/rows/gridRowsUtils.js +8 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +2 -8
- package/modern/hooks/features/rows/useGridRowAriaAttributes.js +2 -4
- package/modern/hooks/features/rows/useGridRows.d.ts +2 -2
- package/modern/hooks/features/rows/useGridRows.js +7 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +5 -9
- package/modern/hooks/utils/useGridSelector.js +4 -1
- package/modern/hooks/utils/useIsSSR.js +4 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.d.ts +2 -1
- package/modern/internals/index.js +2 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/bnBD.d.ts +2 -0
- package/modern/locales/bnBD.js +167 -0
- package/modern/locales/deDE.js +3 -5
- package/modern/locales/huHU.js +10 -13
- package/modern/locales/index.d.ts +1 -0
- package/modern/locales/index.js +1 -0
- package/modern/locales/ruRU.js +17 -21
- package/modern/material/index.d.ts +1 -0
- package/modern/material/index.js +164 -49
- package/modern/material/variables.d.ts +5 -0
- package/modern/material/variables.js +89 -0
- package/modern/models/api/gridRowSelectionApi.d.ts +4 -2
- package/modern/models/api/gridSortApi.d.ts +1 -1
- package/modern/models/configuration/gridConfiguration.d.ts +7 -1
- package/modern/models/gridBaseSlots.d.ts +56 -6
- package/modern/models/gridDataSource.d.ts +9 -4
- package/modern/models/gridRowSelectionManager.d.ts +9 -0
- package/modern/models/gridRowSelectionManager.js +36 -0
- package/modern/models/gridRowSelectionModel.d.ts +4 -2
- package/modern/models/gridSlotsComponent.d.ts +7 -27
- package/modern/models/gridSlotsComponentsProps.d.ts +3 -11
- package/modern/models/gridSortModel.d.ts +1 -1
- package/modern/models/index.d.ts +2 -1
- package/modern/models/index.js +2 -3
- package/modern/models/props/DataGridProps.d.ts +22 -17
- package/modern/utils/css/context.d.ts +14 -0
- package/modern/utils/css/context.js +54 -0
- package/modern/utils/index.d.ts +2 -1
- package/modern/utils/index.js +1 -1
- package/package.json +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/utils/css/context.d.ts +14 -0
- package/utils/css/context.js +64 -0
- package/utils/index.d.ts +2 -1
- package/utils/index.js +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,305 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.0.0-alpha.13
|
|
9
|
+
|
|
10
|
+
_Feb 28, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Decouple `margin` and `axis-size`. A new API to support multiple axes (#16418) @JCQuintas
|
|
15
|
+
- 🗺️ Added Bangla (bn-BD) locale
|
|
16
|
+
- 🗺️ Improve Russian (ru-RU) and Hungarian (hu-HU) locale on the Data Grid
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community members for their contributions:
|
|
19
|
+
@denpiligrim, @lhilgert9, @noherczeg, @officialkidmax, @pcorpet.
|
|
20
|
+
Following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @MBilalShafi, @oliviertassinari, @romgrk.
|
|
22
|
+
|
|
23
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### Breaking changes
|
|
28
|
+
|
|
29
|
+
- The `slots.baseFormControl` component was removed.
|
|
30
|
+
|
|
31
|
+
- The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
|
|
32
|
+
|
|
33
|
+
1. If an initial `columnVisibilityModel` is provided, it resets to that model.
|
|
34
|
+
2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
|
|
35
|
+
3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
|
|
36
|
+
|
|
37
|
+
To revert to the previous behavior, provide a custom component to the `slots.columnsManagement`.
|
|
38
|
+
|
|
39
|
+
- The deprecated `LicenseInfo` export has been removed from the `@mui/x-data-grid-pro` and `@mui/x-data-grid-premium` packages.
|
|
40
|
+
You have to import it from `@mui/x-license` instead:
|
|
41
|
+
|
|
42
|
+
```diff
|
|
43
|
+
- import { LicenseInfo } from '@mui/x-data-grid-pro';
|
|
44
|
+
- import { LicenseInfo } from '@mui/x-data-grid-premium';
|
|
45
|
+
+ import { LicenseInfo } from '@mui/x-license';
|
|
46
|
+
|
|
47
|
+
LicenseInfo.setLicenseKey('YOUR_LICENSE_KEY');
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- The row selection model has been changed from `GridRowId[]` to `{ type: 'include' | 'exclude'; ids: Set<GridRowId> }`.
|
|
51
|
+
Using `Set` allows for a more efficient row selection management.
|
|
52
|
+
The `exclude` selection type allows to select all rows except the ones in the `ids` set.
|
|
53
|
+
|
|
54
|
+
This change impacts the following props:
|
|
55
|
+
|
|
56
|
+
- `rowSelectionModel`
|
|
57
|
+
- `onRowSelectionModelChange`
|
|
58
|
+
- `initialState.rowSelectionModel`
|
|
59
|
+
|
|
60
|
+
```diff
|
|
61
|
+
- const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>([]);
|
|
62
|
+
+ const [rowSelectionModel, setRowSelectionModel] = React.useState<GridRowSelectionModel>({ type: 'include', ids: new Set() });
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This change also impacts the `gridRowSelectionStateSelector` selector.
|
|
66
|
+
For convenience, use the `gridRowSelectionManagerSelector` selector to handle both selection types:
|
|
67
|
+
|
|
68
|
+
```diff
|
|
69
|
+
- const rowSelection = gridRowSelectionStateSelector(apiRef);
|
|
70
|
+
- const isRowSelected = rowSelection.includes(rowId);
|
|
71
|
+
+ const rowSelectionManager = gridRowSelectionManagerSelector(apiRef);
|
|
72
|
+
+ const isRowSelected = rowSelectionManager.has(rowId);
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
There is also a `createRowSelectionManager` utility function that can be used to manage the row selection:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
const rowSelectionManager = createRowSelectionManager({
|
|
79
|
+
type: 'include',
|
|
80
|
+
ids: new Set(),
|
|
81
|
+
});
|
|
82
|
+
rowSelectionManager.select(rowId);
|
|
83
|
+
rowSelectionManager.unselect(rowId);
|
|
84
|
+
rowSelectionManager.has(rowId);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
- The `selectedIdsLookupSelector` selector has been removed. Use the `gridRowSelectionManagerSelector` or `gridRowSelectionStateSelector` selectors instead.
|
|
88
|
+
- The `selectedGridRowsSelector` has been renamed to `gridRowSelectionIdsSelector`.
|
|
89
|
+
- The `selectedGridRowsCountSelector` has been renamed to `gridRowSelectionCountSelector`.
|
|
90
|
+
|
|
91
|
+
- The data source feature and its related props are now stable.
|
|
92
|
+
|
|
93
|
+
```diff
|
|
94
|
+
<DataGridPro
|
|
95
|
+
- unstable_dataSource={dataSource}
|
|
96
|
+
- unstable_dataSourceCache={cache}
|
|
97
|
+
- unstable_lazyLoading
|
|
98
|
+
- unstable_lazyLoadingRequestThrottleMs={100}
|
|
99
|
+
+ dataSource={dataSource}
|
|
100
|
+
+ dataSourceCache={cache}
|
|
101
|
+
+ lazyLoading
|
|
102
|
+
+ lazyLoadingRequestThrottleMs={100}
|
|
103
|
+
/>
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
- The data source API is now stable.
|
|
107
|
+
|
|
108
|
+
```diff
|
|
109
|
+
- apiRef.current.unstable_dataSource.getRows()
|
|
110
|
+
+ apiRef.current.dataSource.getRows()
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
- The signature of `unstable_onDataSourceError()` has been updated to support future use-cases.
|
|
114
|
+
|
|
115
|
+
```diff
|
|
116
|
+
<DataGrid
|
|
117
|
+
- unstable_onDataSourceError={(error: Error, params: GridGetRowsParams) => {
|
|
118
|
+
- if (params.filterModel) {
|
|
119
|
+
- // do something
|
|
120
|
+
- }
|
|
121
|
+
- }}
|
|
122
|
+
+ unstable_onDataSourceError={(error: GridGetRowsError | GridUpdateRowError) => {
|
|
123
|
+
+ if (error instanceof GridGetRowsError && error.params.filterModel) {
|
|
124
|
+
+ // do something
|
|
125
|
+
+ }
|
|
126
|
+
+ }}
|
|
127
|
+
/>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
- Fix the type of the `GridSortModel` to allow readonly arrays.
|
|
131
|
+
|
|
132
|
+
- `GridSortItem` interface is not exported anymore.
|
|
133
|
+
|
|
134
|
+
- The `showToolbar` prop is now required to display the toolbar.
|
|
135
|
+
|
|
136
|
+
It is no longer necessary to pass `GridToolbar` as a slot to display the default toolbar.
|
|
137
|
+
|
|
138
|
+
```diff
|
|
139
|
+
<DataGrid
|
|
140
|
+
+ showToolbar
|
|
141
|
+
- slots={{
|
|
142
|
+
- toolbar: GridToolbar,
|
|
143
|
+
- }}
|
|
144
|
+
/>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-data-grid@8.0.0-alpha.13`
|
|
148
|
+
|
|
149
|
+
- [DataGrid] Add `showToolbar` prop to enable default toolbar (#16687) @KenanYusuf
|
|
150
|
+
- [DataGrid] Column Visibility: Update "Reset" button behavior (#16626) @MBilalShafi
|
|
151
|
+
- [DataGrid] Column management design updates (#16630) @KenanYusuf
|
|
152
|
+
- [DataGrid] Fix `showColumnVerticalBorder` prop (#16715) @KenanYusuf
|
|
153
|
+
- [DataGrid] Fix scrollbar overlapping cells on mount (#16639) @KenanYusuf
|
|
154
|
+
- [DataGrid] Fix: base `Select` menuprops `onClose()` (#16643) @romgrk
|
|
155
|
+
- [DataGrid] Make `GridSortItem` internal (#16732) @arminmeh
|
|
156
|
+
- [DataGrid] Make data source stable (#16710) @MBilalShafi
|
|
157
|
+
- [DataGrid] Reshape row selection model (#15651) @cherniavskii
|
|
158
|
+
- [DataGrid] Replace `sx` prop usage with `styled()` components (#16665) @KenanYusuf
|
|
159
|
+
- [DataGrid] Refactor: create base `Autocomplete` (#16390) @romgrk
|
|
160
|
+
- [DataGrid] Refactor: remove base form control (#16634) @romgrk
|
|
161
|
+
- [DataGrid] Refactor: remove base input label & adornment (#16646) @romgrk
|
|
162
|
+
- [DataGrid] Refactor: remove material containers (#16633) @romgrk
|
|
163
|
+
- [DataGrid] Refactor: theme to CSS variables (#16588) @romgrk
|
|
164
|
+
- [DataGrid] Update the signature of the `onDataSourceError()` callback (#16718) @MBilalShafi
|
|
165
|
+
- [DataGrid] Use readonly array for the `GridSortModel` (#16627) @pcorpet
|
|
166
|
+
- [DataGrid] Fix the popper focus trap (#16736) @romgrk
|
|
167
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
168
|
+
- [l10n] Improve Hungarian (hu-HU) locale (#16578) @noherczeg
|
|
169
|
+
- [l10n] Improve Russian (ru-RU) locale (#16591) @denpiligrim
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-data-grid-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
172
|
+
|
|
173
|
+
Same changes as in `@mui/x-data-grid@8.0.0-alpha.13`, plus:
|
|
174
|
+
|
|
175
|
+
- [DataGridPro] Remove `LicenseInfo` reexports (#16671) @cherniavskii
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-data-grid-premium@8.0.0-alpha.13` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.13`, plus:
|
|
180
|
+
|
|
181
|
+
- [DataGridPremium] Use `valueGetter` to get row group keys (#16016) @cherniavskii
|
|
182
|
+
|
|
183
|
+
### Date and Time Pickers
|
|
184
|
+
|
|
185
|
+
#### Breaking changes
|
|
186
|
+
|
|
187
|
+
- The `<DateRangePicker />` now uses a `dialog` instead of a `tooltip` to render their view when used with a single input range field.
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-date-pickers@8.0.0-alpha.13`
|
|
190
|
+
|
|
191
|
+
- [l10n] Added Bangla (bn-BD) locale (#16648) @officialkidmax
|
|
192
|
+
- [pickers] Clean the typing of the slots on the range pickers (#16670) @flaviendelangle
|
|
193
|
+
- [pickers] Fix Time Clock meridiem button selected styles (#16681) @LukasTy
|
|
194
|
+
- [pickers] Make the single input field the default field on range pickers (#16656) @flaviendelangle
|
|
195
|
+
- [pickers] Move the opening logic to the range fields (#16175) @flaviendelangle
|
|
196
|
+
|
|
197
|
+
#### `@mui/x-date-pickers-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
198
|
+
|
|
199
|
+
Same changes as in `@mui/x-date-pickers@8.0.0-alpha.13`.
|
|
200
|
+
|
|
201
|
+
### Charts
|
|
202
|
+
|
|
203
|
+
#### Breaking changes
|
|
204
|
+
|
|
205
|
+
- Charts array inputs are now `readonly`. Allowing externally defined `as const` to be used as a prop value of the React component.
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
const xAxis = [{ position: 'bottom' }] as const
|
|
209
|
+
<BarChart xAxis={xAxis} />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
- Replace `topAxis`, `rightAxis`, `bottomAxis` and `leftAxis` props by the `position` property in the axis config.
|
|
213
|
+
If you were using them to place axis, set the `position` property to the corresponding value `'top' | 'right' | 'bottom' | 'left'`.
|
|
214
|
+
If you were disabling an axis by setting it to `null`, set its `position` to `'none'`.
|
|
215
|
+
|
|
216
|
+
```diff
|
|
217
|
+
<LineChart
|
|
218
|
+
yAxis={[
|
|
219
|
+
{
|
|
220
|
+
scaleType: 'linear',
|
|
221
|
+
+ position: 'right',
|
|
222
|
+
},
|
|
223
|
+
]}
|
|
224
|
+
series={[{ data: [1, 10, 30, 50, 70, 90, 100], label: 'linear' }]}
|
|
225
|
+
height={400}
|
|
226
|
+
- rightAxis={{}}
|
|
227
|
+
/>
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
- Remove `position` prop from `ChartsXAxis` and `ChartsYAxis`.
|
|
231
|
+
The `position` prop has been removed from the `ChartsXAxis` and `ChartsYAxis` components. Configure it directly in the axis config.
|
|
232
|
+
|
|
233
|
+
```diff
|
|
234
|
+
<ChartContainer
|
|
235
|
+
yAxis={[
|
|
236
|
+
{
|
|
237
|
+
id: 'my-axis',
|
|
238
|
+
+ position: 'right',
|
|
239
|
+
},
|
|
240
|
+
]}
|
|
241
|
+
>
|
|
242
|
+
- <ChartsYAxis axisId="my-axis" position="right" />
|
|
243
|
+
+ <ChartsYAxis axisId="my-axis" />
|
|
244
|
+
</ChartContainer>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
- Add `minTickLabelGap` to x-axis, which allows users to define the minimum gap, in pixels, between two tick labels. The default value is 4px. Make sure to check your charts as the spacing between tick labels might have changed.
|
|
248
|
+
|
|
249
|
+
#### `@mui/x-charts@8.0.0-alpha.13`
|
|
250
|
+
|
|
251
|
+
- [charts] Accept component in `labelMarkType` (#16739) @bernardobelchior
|
|
252
|
+
- [charts] Add `minTickLabelGap` to x-axis (#16548) @bernardobelchior
|
|
253
|
+
- [charts] Add unit test for pie chart with empty series (#16663) @bernardobelchior
|
|
254
|
+
- [charts] Decouple `margin` and `axis-size` (#16418) @JCQuintas
|
|
255
|
+
- [charts] Display slider tooltip on demos (#16723) @JCQuintas
|
|
256
|
+
- [charts] Fix composition docs link (#16761) @bernardobelchior
|
|
257
|
+
- [charts] Fix default label measurement being off (#16635) @bernardobelchior
|
|
258
|
+
- [charts] Fix is highlighted memoization (#16592) @alexfauquette
|
|
259
|
+
- [charts] Fix missing `theme.shape` error in the tooltip (#16748) @alexfauquette
|
|
260
|
+
- [charts] Fix typo in error message (#16641) @JCQuintas
|
|
261
|
+
- [charts] Improve axis size docs (#16673) @JCQuintas
|
|
262
|
+
- [charts] Improve performance of rendering ticks in x-axis (#16536) @bernardobelchior
|
|
263
|
+
- [charts] Make `defaultizeAxis` function type-safe (#16642) @JCQuintas
|
|
264
|
+
- [charts] Make `series.data` readonly (#16645) @JCQuintas
|
|
265
|
+
- [charts] Migrate `ChartsUsageDemo` to TSX and removed NoSnap (#16686) @JCQuintas
|
|
266
|
+
- [charts] Prevent `position='none'` axes from rendering (#16727) @JCQuintas
|
|
267
|
+
- [charts] Make array inputs readonly (#16632) @JCQuintas
|
|
268
|
+
- [charts] Remove state initialization hack (#16520) @alexfauquette
|
|
269
|
+
- [charts] Remove redundant default axis (#16734) @bernardobelchior
|
|
270
|
+
|
|
271
|
+
#### `@mui/x-charts-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
272
|
+
|
|
273
|
+
Same changes as in `@mui/x-charts@8.0.0-alpha.13`, plus:
|
|
274
|
+
|
|
275
|
+
- [charts-pro] Add back zoom control (#16550) @alexfauquette
|
|
276
|
+
|
|
277
|
+
### Tree View
|
|
278
|
+
|
|
279
|
+
#### `@mui/x-tree-view@8.0.0-alpha.13`
|
|
280
|
+
|
|
281
|
+
Internal changes.
|
|
282
|
+
|
|
283
|
+
#### `@mui/x-tree-view-pro@8.0.0-alpha.13` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
284
|
+
|
|
285
|
+
Same changes as in `@mui/x-tree-view@8.0.0-alpha.13`.
|
|
286
|
+
|
|
287
|
+
### `@mui/x-codemod@8.0.0-alpha.13`
|
|
288
|
+
|
|
289
|
+
- [codemod] Add a few Data Grid codemods (#16711) @MBilalShafi
|
|
290
|
+
- [codemod] Improve Pickers renaming codemod (#16685) @LukasTy
|
|
291
|
+
|
|
292
|
+
### Docs
|
|
293
|
+
|
|
294
|
+
- [docs] Fix charts with on bar and line pages (#16712) @alexfauquette
|
|
295
|
+
- [docs] Fix migration guide introduction for charts (#16679) @alexfauquette
|
|
296
|
+
- [docs] Fix remaining charts demos on mobile (#16728) @alexfauquette
|
|
297
|
+
- [docs] Fix scroll overflow on mobile (#16675) @oliviertassinari
|
|
298
|
+
- [docs] Improve Pickers migration page (#16682) @LukasTy
|
|
299
|
+
- [docs] Update small Pickers doc inconsistencies (#16724) @LukasTy
|
|
300
|
+
- [code-infra] Charts changes for `vitest` (#16755) @JCQuintas
|
|
301
|
+
- [code-infra] General packages changes for `vitest` (#16757) @JCQuintas
|
|
302
|
+
- [code-infra] Native Node.js ESM (#16603) @Janpot
|
|
303
|
+
- [infra] Update contributor acknowledgment wording (#16751) @michelengelen
|
|
304
|
+
- [test] Revert timeout increase for possibly slow tests (#16651) @LukasTy
|
|
305
|
+
- [x-license] Introduce usage telemetry (#13530) @hasdfa
|
|
306
|
+
|
|
8
307
|
## 8.0.0-alpha.12
|
|
9
308
|
|
|
10
309
|
_Feb 17, 2025_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -18,9 +18,11 @@ var _GridContextProvider = require("../context/GridContextProvider");
|
|
|
18
18
|
var _useDataGridComponent = require("./useDataGridComponent");
|
|
19
19
|
var _useDataGridProps = require("./useDataGridProps");
|
|
20
20
|
var _propValidation = require("../internals/utils/propValidation");
|
|
21
|
+
var _variables = require("../material/variables");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
23
|
const configuration = {
|
|
23
24
|
hooks: {
|
|
25
|
+
useCSSVariables: _variables.useMaterialCSSVariables,
|
|
24
26
|
useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributes,
|
|
25
27
|
useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes
|
|
26
28
|
}
|
|
@@ -145,6 +147,21 @@ DataGridRaw.propTypes = {
|
|
|
145
147
|
* If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
|
|
146
148
|
*/
|
|
147
149
|
columnVisibilityModel: _propTypes.default.object,
|
|
150
|
+
/**
|
|
151
|
+
* The data source object.
|
|
152
|
+
*/
|
|
153
|
+
dataSource: _propTypes.default.shape({
|
|
154
|
+
getRows: _propTypes.default.func.isRequired,
|
|
155
|
+
updateRow: _propTypes.default.func
|
|
156
|
+
}),
|
|
157
|
+
/**
|
|
158
|
+
* Data source cache object.
|
|
159
|
+
*/
|
|
160
|
+
dataSourceCache: _propTypes.default.shape({
|
|
161
|
+
clear: _propTypes.default.func.isRequired,
|
|
162
|
+
get: _propTypes.default.func.isRequired,
|
|
163
|
+
set: _propTypes.default.func.isRequired
|
|
164
|
+
}),
|
|
148
165
|
/**
|
|
149
166
|
* Set the density of the Data Grid.
|
|
150
167
|
* @default "standard"
|
|
@@ -497,6 +514,11 @@ DataGridRaw.propTypes = {
|
|
|
497
514
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
498
515
|
*/
|
|
499
516
|
onColumnWidthChange: _propTypes.default.func,
|
|
517
|
+
/**
|
|
518
|
+
* Callback fired when a data source request fails.
|
|
519
|
+
* @param {GridGetRowsError | GridUpdateRowError} error The data source error object.
|
|
520
|
+
*/
|
|
521
|
+
onDataSourceError: _propTypes.default.func,
|
|
500
522
|
/**
|
|
501
523
|
* Callback fired when the density changes.
|
|
502
524
|
* @param {GridDensity} density New density value.
|
|
@@ -694,7 +716,10 @@ DataGridRaw.propTypes = {
|
|
|
694
716
|
/**
|
|
695
717
|
* Sets the row selection model of the Data Grid.
|
|
696
718
|
*/
|
|
697
|
-
rowSelectionModel: _propTypes.default
|
|
719
|
+
rowSelectionModel: _propTypes.default /* @typescript-to-proptypes-ignore */.shape({
|
|
720
|
+
ids: _propTypes.default.instanceOf(Set).isRequired,
|
|
721
|
+
type: _propTypes.default.oneOf(['exclude', 'include']).isRequired
|
|
722
|
+
}),
|
|
698
723
|
/**
|
|
699
724
|
* Sets the type of space between rows added by `getRowSpacing`.
|
|
700
725
|
* @default "margin"
|
|
@@ -719,6 +744,11 @@ DataGridRaw.propTypes = {
|
|
|
719
744
|
* @default false
|
|
720
745
|
*/
|
|
721
746
|
showColumnVerticalBorder: _propTypes.default.bool,
|
|
747
|
+
/**
|
|
748
|
+
* If `true`, the toolbar is displayed.
|
|
749
|
+
* @default false
|
|
750
|
+
*/
|
|
751
|
+
showToolbar: _propTypes.default.bool,
|
|
722
752
|
/**
|
|
723
753
|
* Overridable components props dynamically passed to the component at rendering.
|
|
724
754
|
*/
|
|
@@ -750,27 +780,6 @@ DataGridRaw.propTypes = {
|
|
|
750
780
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
751
781
|
*/
|
|
752
782
|
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
753
|
-
/**
|
|
754
|
-
* The data source object.
|
|
755
|
-
*/
|
|
756
|
-
unstable_dataSource: _propTypes.default.shape({
|
|
757
|
-
getRows: _propTypes.default.func.isRequired,
|
|
758
|
-
updateRow: _propTypes.default.func
|
|
759
|
-
}),
|
|
760
|
-
/**
|
|
761
|
-
* Data source cache object.
|
|
762
|
-
*/
|
|
763
|
-
unstable_dataSourceCache: _propTypes.default.shape({
|
|
764
|
-
clear: _propTypes.default.func.isRequired,
|
|
765
|
-
get: _propTypes.default.func.isRequired,
|
|
766
|
-
set: _propTypes.default.func.isRequired
|
|
767
|
-
}),
|
|
768
|
-
/**
|
|
769
|
-
* Callback fired when the data source request fails.
|
|
770
|
-
* @param {Error} error The error object.
|
|
771
|
-
* @param {GridGetRowsParams} params With all properties from [[GridGetRowsParams]].
|
|
772
|
-
*/
|
|
773
|
-
unstable_onDataSourceError: _propTypes.default.func,
|
|
774
783
|
/**
|
|
775
784
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
776
785
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -25,7 +25,7 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
25
25
|
signature: 'DataGrid',
|
|
26
26
|
unstable_listView: false
|
|
27
27
|
};
|
|
28
|
-
const getDataGridForcedProps = themedProps => (0, _extends2.default)({}, DATA_GRID_FORCED_PROPS, themedProps.
|
|
28
|
+
const getDataGridForcedProps = themedProps => (0, _extends2.default)({}, DATA_GRID_FORCED_PROPS, themedProps.dataSource ? {
|
|
29
29
|
filterMode: 'server',
|
|
30
30
|
sortingMode: 'server',
|
|
31
31
|
paginationMode: 'server'
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _GridCellCheckboxRenderer = require("../components/columnSelection/GridCellCheckboxRenderer");
|
|
12
12
|
var _GridHeaderCheckbox = require("../components/columnSelection/GridHeaderCheckbox");
|
|
13
|
-
var _gridRowSelectionSelector = require("../hooks/features/rowSelection/gridRowSelectionSelector");
|
|
14
13
|
var _gridBooleanColDef = require("./gridBooleanColDef");
|
|
15
14
|
var _gridPropsSelectors = require("../hooks/core/gridPropsSelectors");
|
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -30,9 +29,8 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = exports.GRID_CHECKBOX_SELECTION_COL_DEF
|
|
|
30
29
|
getApplyQuickFilterFn: undefined,
|
|
31
30
|
display: 'flex',
|
|
32
31
|
valueGetter: (value, row, column, apiRef) => {
|
|
33
|
-
const selectionLookup = (0, _gridRowSelectionSelector.selectedIdsLookupSelector)(apiRef);
|
|
34
32
|
const rowId = (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row);
|
|
35
|
-
return
|
|
33
|
+
return apiRef.current.isRowSelected(rowId);
|
|
36
34
|
},
|
|
37
35
|
renderHeader: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderCheckbox.GridHeaderCheckbox, (0, _extends2.default)({}, params)),
|
|
38
36
|
renderCell: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridCellCheckboxRenderer.GridCellCheckboxRenderer, (0, _extends2.default)({}, params))
|
package/components/GridFooter.js
CHANGED
|
@@ -23,7 +23,7 @@ const GridFooter = exports.GridFooter = (0, _forwardRef.forwardRef)(function Gri
|
|
|
23
23
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
24
24
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
25
25
|
const totalTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridTopLevelRowCountSelector);
|
|
26
|
-
const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.
|
|
26
|
+
const selectedRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.gridRowSelectionCountSelector);
|
|
27
27
|
const visibleTopLevelRowCount = (0, _useGridSelector.useGridSelector)(apiRef, _gridFilterSelector.gridFilteredTopLevelRowCountSelector);
|
|
28
28
|
const selectedRowCountElement = !rootProps.hideFooterSelectedRowCount && selectedRowCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridSelectedRowCount.GridSelectedRowCount, {
|
|
29
29
|
selectedRowCount: selectedRowCount
|
package/components/GridHeader.js
CHANGED
|
@@ -14,6 +14,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
14
14
|
function GridHeader() {
|
|
15
15
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
16
16
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
17
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPreferencesPanel.GridPreferencesPanel, {}), rootProps.
|
|
17
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPreferencesPanel.GridPreferencesPanel, {}), rootProps.showToolbar && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.toolbar, (0, _extends2.default)({}, rootProps.slotProps?.toolbar))]
|
|
18
18
|
});
|
|
19
19
|
}
|
|
@@ -12,30 +12,29 @@ var _styles = require("@mui/material/styles");
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _TablePagination = _interopRequireWildcard(require("@mui/material/TablePagination"));
|
|
14
14
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
15
|
+
var _cssVariables = require("../constants/cssVariables");
|
|
15
16
|
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
16
17
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
17
18
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
18
19
|
var _gridPaginationSelector = require("../hooks/features/pagination/gridPaginationSelector");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)(
|
|
21
|
-
theme
|
|
22
|
-
}) => ({
|
|
21
|
+
const GridPaginationRoot = (0, _styles.styled)(_TablePagination.default)({
|
|
23
22
|
maxHeight: 'calc(100% + 1px)',
|
|
24
23
|
// border width
|
|
25
24
|
flexGrow: 1,
|
|
26
25
|
[`& .${_TablePagination.tablePaginationClasses.selectLabel}`]: {
|
|
27
26
|
display: 'none',
|
|
28
|
-
[
|
|
27
|
+
[_cssVariables.vars.breakpoints.up('sm')]: {
|
|
29
28
|
display: 'block'
|
|
30
29
|
}
|
|
31
30
|
},
|
|
32
31
|
[`& .${_TablePagination.tablePaginationClasses.input}`]: {
|
|
33
32
|
display: 'none',
|
|
34
|
-
[
|
|
33
|
+
[_cssVariables.vars.breakpoints.up('sm')]: {
|
|
35
34
|
display: 'inline-flex'
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
})
|
|
37
|
+
});
|
|
39
38
|
const wrapLabelDisplayedRows = (labelDisplayedRows, estimated) => {
|
|
40
39
|
return ({
|
|
41
40
|
from,
|
|
@@ -14,6 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _system = require("@mui/system");
|
|
16
16
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
17
|
+
var _cssVariables = require("../constants/cssVariables");
|
|
17
18
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
18
19
|
var _gridClasses = require("../constants/gridClasses");
|
|
19
20
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
@@ -32,13 +33,11 @@ const GridRowCountRoot = (0, _system.styled)('div', {
|
|
|
32
33
|
name: 'MuiDataGrid',
|
|
33
34
|
slot: 'RowCount',
|
|
34
35
|
overridesResolver: (props, styles) => styles.rowCount
|
|
35
|
-
})(
|
|
36
|
-
theme
|
|
37
|
-
}) => ({
|
|
36
|
+
})({
|
|
38
37
|
alignItems: 'center',
|
|
39
38
|
display: 'flex',
|
|
40
|
-
margin:
|
|
41
|
-
})
|
|
39
|
+
margin: _cssVariables.vars.spacing(0, 2)
|
|
40
|
+
});
|
|
42
41
|
const GridRowCount = exports.GridRowCount = (0, _forwardRef.forwardRef)(function GridRowCount(props, ref) {
|
|
43
42
|
const {
|
|
44
43
|
className,
|
|
@@ -10,7 +10,8 @@ exports.GridScrollArea = void 0;
|
|
|
10
10
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
|
-
var
|
|
13
|
+
var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
15
|
var _system = require("@mui/system");
|
|
15
16
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
17
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
@@ -34,7 +35,7 @@ const useUtilityClasses = ownerState => {
|
|
|
34
35
|
const slots = {
|
|
35
36
|
root: ['scrollArea', `scrollArea--${scrollDirection}`]
|
|
36
37
|
};
|
|
37
|
-
return (0,
|
|
38
|
+
return (0, _composeClasses.default)(slots, _constants.getDataGridUtilityClass, classes);
|
|
38
39
|
};
|
|
39
40
|
const GridScrollAreaRawRoot = (0, _system.styled)('div', {
|
|
40
41
|
name: 'MuiDataGrid',
|
|
@@ -120,7 +121,7 @@ function GridScrollAreaContent(props) {
|
|
|
120
121
|
const handleScrolling = () => {
|
|
121
122
|
setCanScrollMore(getCanScrollMore);
|
|
122
123
|
};
|
|
123
|
-
const handleDragOver = (0,
|
|
124
|
+
const handleDragOver = (0, _useEventCallback.default)(event => {
|
|
124
125
|
let offset;
|
|
125
126
|
|
|
126
127
|
// Prevents showing the forbidden cursor
|
|
@@ -14,6 +14,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _system = require("@mui/system");
|
|
16
16
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
17
|
+
var _cssVariables = require("../constants/cssVariables");
|
|
17
18
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
18
19
|
var _gridClasses = require("../constants/gridClasses");
|
|
19
20
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
@@ -32,21 +33,19 @@ const GridSelectedRowCountRoot = (0, _system.styled)('div', {
|
|
|
32
33
|
name: 'MuiDataGrid',
|
|
33
34
|
slot: 'SelectedRowCount',
|
|
34
35
|
overridesResolver: (props, styles) => styles.selectedRowCount
|
|
35
|
-
})(
|
|
36
|
-
theme
|
|
37
|
-
}) => ({
|
|
36
|
+
})({
|
|
38
37
|
alignItems: 'center',
|
|
39
38
|
display: 'flex',
|
|
40
|
-
margin:
|
|
39
|
+
margin: _cssVariables.vars.spacing(0, 2),
|
|
41
40
|
visibility: 'hidden',
|
|
42
41
|
width: 0,
|
|
43
42
|
height: 0,
|
|
44
|
-
[
|
|
43
|
+
[_cssVariables.vars.breakpoints.up('sm')]: {
|
|
45
44
|
visibility: 'visible',
|
|
46
45
|
width: 'auto',
|
|
47
46
|
height: 'auto'
|
|
48
47
|
}
|
|
49
|
-
})
|
|
48
|
+
});
|
|
50
49
|
const GridSelectedRowCount = exports.GridSelectedRowCount = (0, _forwardRef.forwardRef)(function GridSelectedRowCount(props, ref) {
|
|
51
50
|
const {
|
|
52
51
|
className,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface GridShadowScrollAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Adds scroll shadows above and below content in a scrollable container.
|
|
7
|
+
*/
|
|
8
|
+
export declare function GridShadowScrollArea(props: GridShadowScrollAreaProps): React.JSX.Element;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.GridShadowScrollArea = GridShadowScrollArea;
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _system = require("@mui/system");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
const _excluded = ["children"];
|
|
15
|
+
const reveal = (0, _system.keyframes)({
|
|
16
|
+
from: {
|
|
17
|
+
opacity: 0
|
|
18
|
+
},
|
|
19
|
+
to: {
|
|
20
|
+
opacity: 1
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
const detectScroll = (0, _system.keyframes)({
|
|
24
|
+
'from, to': {
|
|
25
|
+
'--scrollable': '" "'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
const ShadowScrollArea = (0, _system.styled)('div', {
|
|
29
|
+
name: 'MuiDataGrid',
|
|
30
|
+
slot: 'ShadowScrollArea'
|
|
31
|
+
})({
|
|
32
|
+
flex: 1,
|
|
33
|
+
display: 'flex',
|
|
34
|
+
flexDirection: 'column',
|
|
35
|
+
animation: detectScroll,
|
|
36
|
+
animationTimeline: '--scroll-timeline',
|
|
37
|
+
animationFillMode: 'none',
|
|
38
|
+
boxSizing: 'border-box',
|
|
39
|
+
overflow: 'auto',
|
|
40
|
+
scrollTimeline: '--scroll-timeline block',
|
|
41
|
+
'&::before, &::after': {
|
|
42
|
+
content: '""',
|
|
43
|
+
flexShrink: 0,
|
|
44
|
+
display: 'block',
|
|
45
|
+
position: 'sticky',
|
|
46
|
+
left: 0,
|
|
47
|
+
width: '100%',
|
|
48
|
+
height: '4px',
|
|
49
|
+
animation: `${reveal} linear both`,
|
|
50
|
+
animationTimeline: '--scroll-timeline',
|
|
51
|
+
// Custom property toggle trick:
|
|
52
|
+
// - Detects if the element is scrollable
|
|
53
|
+
// - https://css-tricks.com/the-css-custom-property-toggle-trick/
|
|
54
|
+
'--visibility-scrollable': 'var(--scrollable) visible',
|
|
55
|
+
'--visibility-not-scrollable': 'hidden',
|
|
56
|
+
visibility: 'var(--visibility-scrollable, var(--visibility-not-scrollable))'
|
|
57
|
+
},
|
|
58
|
+
'&::before': {
|
|
59
|
+
top: 0,
|
|
60
|
+
background: 'linear-gradient(to bottom, rgba(0,0,0,0.05) 0, transparent 100%)',
|
|
61
|
+
animationRange: '0 4px'
|
|
62
|
+
},
|
|
63
|
+
'&::after': {
|
|
64
|
+
bottom: 0,
|
|
65
|
+
background: 'linear-gradient(to top, rgba(0,0,0,0.05) 0, transparent 100%)',
|
|
66
|
+
animationDirection: 'reverse',
|
|
67
|
+
animationRange: 'calc(100% - 4px) 100%'
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Adds scroll shadows above and below content in a scrollable container.
|
|
73
|
+
*/
|
|
74
|
+
function GridShadowScrollArea(props) {
|
|
75
|
+
const {
|
|
76
|
+
children
|
|
77
|
+
} = props,
|
|
78
|
+
rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShadowScrollArea, (0, _extends2.default)({}, rest, {
|
|
80
|
+
children: children
|
|
81
|
+
}));
|
|
82
|
+
}
|