@mui/x-data-grid 7.2.0 → 7.3.1
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 +204 -2
- package/DataGrid/DataGrid.js +20 -2
- package/colDef/gridDateOperators.js +7 -0
- package/components/GridFooter.js +1 -2
- package/components/GridHeader.js +1 -2
- package/components/GridHeaders.js +3 -2
- package/components/GridPagination.d.ts +4 -1
- package/components/GridPagination.js +60 -9
- package/components/GridRow.js +2 -2
- package/components/GridScrollArea.js +1 -1
- package/components/cell/GridActionsCell.js +1 -2
- package/components/cell/GridActionsCellItem.js +1 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +6 -4
- package/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/components/columnsManagement/GridColumnsManagement.js +1 -2
- package/components/containers/GridRoot.js +1 -2
- package/components/containers/GridRootStyles.js +3 -1
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -2
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -2
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +3 -1
- package/components/panel/filterPanel/GridFilterForm.js +1 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -2
- package/components/panel/filterPanel/GridFilterInputDate.js +4 -4
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -2
- package/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/components/toolbar/GridToolbar.js +1 -2
- package/components/toolbar/GridToolbarDensitySelector.js +1 -2
- package/components/toolbar/GridToolbarExportContainer.js +1 -2
- package/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/components/virtualization/GridVirtualScroller.js +1 -2
- package/components/virtualization/GridVirtualScrollerFiller.js +1 -2
- package/constants/gridClasses.d.ts +6 -2
- package/constants/gridClasses.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -4
- package/hooks/features/columnResize/useGridColumnResize.js +91 -62
- package/hooks/features/columns/gridColumnsUtils.d.ts +5 -3
- package/hooks/features/columns/gridColumnsUtils.js +9 -7
- package/hooks/features/columns/useGridColumns.js +5 -4
- package/hooks/features/density/useGridDensity.d.ts +1 -1
- package/hooks/features/density/useGridDensity.js +30 -4
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -1
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +5 -2
- package/hooks/features/editing/useGridCellEditing.js +14 -1
- package/hooks/features/export/useGridPrintExport.d.ts +1 -1
- package/hooks/features/export/useGridPrintExport.js +2 -2
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +14 -2
- package/hooks/features/pagination/gridPaginationSelector.d.ts +5 -0
- package/hooks/features/pagination/gridPaginationSelector.js +7 -1
- package/hooks/features/pagination/gridPaginationUtils.d.ts +1 -2
- package/hooks/features/pagination/gridPaginationUtils.js +5 -3
- package/hooks/features/pagination/useGridPagination.d.ts +1 -1
- package/hooks/features/pagination/useGridPagination.js +5 -1
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +4 -0
- package/hooks/features/pagination/useGridPaginationMeta.js +77 -0
- package/hooks/features/pagination/useGridPaginationModel.js +2 -1
- package/hooks/features/pagination/useGridRowCount.d.ts +0 -4
- package/hooks/features/pagination/useGridRowCount.js +32 -18
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +3 -3
- package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
- package/hooks/utils/useGridSelector.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +1 -1
- package/internals/utils/propValidation.js +1 -1
- package/joy/icons.js +1 -2
- package/joy/joySlots.js +1 -2
- package/locales/daDK.js +3 -4
- package/models/api/gridApiCommon.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +7 -3
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/events/gridEventLookup.d.ts +7 -1
- package/models/gridPaginationProps.d.ts +3 -0
- package/models/props/DataGridProps.d.ts +26 -8
- package/modern/DataGrid/DataGrid.js +20 -2
- package/modern/colDef/gridDateOperators.js +7 -0
- package/modern/components/GridFooter.js +1 -2
- package/modern/components/GridHeader.js +1 -2
- package/modern/components/GridHeaders.js +3 -2
- package/modern/components/GridPagination.js +60 -9
- package/modern/components/GridRow.js +2 -2
- package/modern/components/GridScrollArea.js +1 -1
- package/modern/components/cell/GridActionsCell.js +1 -2
- package/modern/components/cell/GridActionsCellItem.js +1 -2
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +6 -4
- package/modern/components/columnHeaders/GridColumnHeaderSeparator.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -2
- package/modern/components/columnsManagement/GridColumnsManagement.js +1 -2
- package/modern/components/containers/GridRoot.js +1 -2
- package/modern/components/containers/GridRootStyles.js +3 -1
- package/modern/components/index.js +1 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -2
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -2
- package/modern/components/panel/GridPanel.js +3 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -2
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -2
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -4
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -2
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -2
- package/modern/components/toolbar/GridToolbar.js +1 -2
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -2
- package/modern/components/toolbar/GridToolbarExportContainer.js +1 -2
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/modern/components/virtualization/GridVirtualScroller.js +1 -2
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +1 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -4
- package/modern/hooks/features/columnResize/useGridColumnResize.js +91 -62
- package/modern/hooks/features/columns/gridColumnsUtils.js +9 -7
- package/modern/hooks/features/columns/useGridColumns.js +5 -4
- package/modern/hooks/features/density/useGridDensity.js +30 -4
- package/modern/hooks/features/dimensions/useGridDimensions.js +5 -2
- package/modern/hooks/features/editing/useGridCellEditing.js +14 -1
- package/modern/hooks/features/export/useGridPrintExport.js +2 -2
- package/modern/hooks/features/pagination/gridPaginationSelector.js +7 -1
- package/modern/hooks/features/pagination/gridPaginationUtils.js +5 -3
- package/modern/hooks/features/pagination/useGridPagination.js +5 -1
- package/modern/hooks/features/pagination/useGridPaginationMeta.js +77 -0
- package/modern/hooks/features/pagination/useGridPaginationModel.js +2 -1
- package/modern/hooks/features/pagination/useGridRowCount.js +32 -18
- package/modern/index.js +1 -1
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/joy/icons.js +1 -2
- package/modern/joy/joySlots.js +1 -2
- package/modern/locales/daDK.js +3 -4
- package/modern/models/api/index.js +0 -1
- package/modern/utils/domUtils.js +4 -0
- package/node/DataGrid/DataGrid.js +20 -1
- package/node/DataGrid/useDataGridProps.js +1 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/node/colDef/gridDateOperators.js +7 -0
- package/node/components/GridApiContext.js +1 -1
- package/node/components/GridColumnHeaders.js +1 -1
- package/node/components/GridFooter.js +1 -1
- package/node/components/GridHeader.js +1 -1
- package/node/components/GridHeaders.js +5 -3
- package/node/components/GridLoadingOverlay.js +1 -1
- package/node/components/GridNoResultsOverlay.js +1 -1
- package/node/components/GridNoRowsOverlay.js +1 -1
- package/node/components/GridPagination.js +60 -9
- package/node/components/GridRow.js +2 -1
- package/node/components/GridRowCount.js +1 -1
- package/node/components/GridScrollArea.js +2 -2
- package/node/components/GridScrollbarFillerCell.js +1 -1
- package/node/components/GridSelectedRowCount.js +1 -1
- package/node/components/base/GridFooterPlaceholder.js +1 -1
- package/node/components/base/GridOverlays.js +1 -1
- package/node/components/cell/GridActionsCell.js +1 -1
- package/node/components/cell/GridActionsCellItem.js +1 -1
- package/node/components/cell/GridBooleanCell.js +1 -1
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/cell/GridEditBooleanCell.js +1 -1
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +1 -1
- package/node/components/cell/GridEditSingleSelectCell.js +1 -1
- package/node/components/cell/GridSkeletonCell.js +1 -1
- package/node/components/columnHeaders/ColumnHeaderMenuIcon.js +1 -1
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/node/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -2
- package/node/components/columnHeaders/GridColumnHeaderSeparator.js +2 -2
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +1 -1
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -1
- package/node/components/columnHeaders/GridIconButtonContainer.js +1 -1
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/node/components/columnSelection/GridHeaderCheckbox.js +1 -1
- package/node/components/columnsManagement/GridColumnsManagement.js +1 -1
- package/node/components/containers/GridFooterContainer.js +1 -1
- package/node/components/containers/GridOverlay.js +1 -1
- package/node/components/containers/GridRoot.js +1 -1
- package/node/components/containers/GridRootStyles.js +3 -1
- package/node/components/containers/GridToolbarContainer.js +1 -1
- package/node/components/index.js +27 -10
- package/node/components/menu/GridMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +1 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/node/components/panel/GridColumnsPanel.js +1 -1
- package/node/components/panel/GridPanel.js +4 -2
- package/node/components/panel/GridPanelContent.js +1 -1
- package/node/components/panel/GridPanelFooter.js +1 -1
- package/node/components/panel/GridPanelHeader.js +1 -1
- package/node/components/panel/GridPanelWrapper.js +1 -1
- package/node/components/panel/GridPreferencesPanel.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputDate.js +5 -5
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/node/components/toolbar/GridToolbar.js +1 -1
- package/node/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/node/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/node/components/toolbar/GridToolbarExport.js +1 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/node/components/toolbar/GridToolbarQuickFilter.js +1 -1
- package/node/components/virtualization/GridBottomContainer.js +1 -1
- package/node/components/virtualization/GridMainContainer.js +1 -1
- package/node/components/virtualization/GridTopContainer.js +1 -1
- package/node/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +1 -1
- package/node/components/virtualization/GridVirtualScrollerContent.js +1 -1
- package/node/components/virtualization/GridVirtualScrollerFiller.js +1 -1
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +1 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/context/GridContextProvider.js +1 -1
- package/node/context/GridRootPropsContext.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +1 -1
- package/node/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.js +1 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +1 -1
- package/node/hooks/core/useGridApiInitialization.js +1 -1
- package/node/hooks/core/useGridLocaleText.js +1 -1
- package/node/hooks/core/useGridLoggerFactory.js +1 -1
- package/node/hooks/core/useGridRefs.js +1 -1
- package/node/hooks/core/useGridStateInitialization.js +1 -1
- package/node/hooks/core/useGridTheme.js +1 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/node/hooks/features/columnGrouping/useGridColumnGrouping.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +3 -3
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +1 -1
- package/node/hooks/features/columnMenu/useGridColumnMenuSlots.js +1 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +92 -63
- package/node/hooks/features/columns/gridColumnsUtils.js +9 -7
- package/node/hooks/features/columns/useGridColumnSpanning.js +1 -1
- package/node/hooks/features/columns/useGridColumns.js +6 -5
- package/node/hooks/features/density/useGridDensity.js +31 -5
- package/node/hooks/features/dimensions/useGridDimensions.js +6 -3
- package/node/hooks/features/editing/useGridCellEditing.js +15 -2
- package/node/hooks/features/editing/useGridEditing.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +1 -1
- package/node/hooks/features/export/useGridCsvExport.js +1 -1
- package/node/hooks/features/export/useGridPrintExport.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/focus/useGridFocus.js +1 -1
- package/node/hooks/features/headerFiltering/useGridHeaderFiltering.js +1 -1
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +1 -1
- package/node/hooks/features/pagination/gridPaginationSelector.js +8 -2
- package/node/hooks/features/pagination/gridPaginationUtils.js +6 -4
- package/node/hooks/features/pagination/useGridPagination.js +5 -1
- package/node/hooks/features/pagination/useGridPaginationMeta.js +87 -0
- package/node/hooks/features/pagination/useGridPaginationModel.js +3 -2
- package/node/hooks/features/pagination/useGridRowCount.js +31 -16
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +1 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/node/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +1 -1
- package/node/hooks/features/rows/useGridParamsApi.js +1 -1
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/hooks/features/rows/useGridRowsMeta.js +1 -1
- package/node/hooks/features/scroll/useGridScroll.js +1 -1
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualization.js +1 -1
- package/node/hooks/utils/useFirstRender.js +1 -1
- package/node/hooks/utils/useGridApiContext.js +1 -1
- package/node/hooks/utils/useGridApiEventHandler.js +1 -1
- package/node/hooks/utils/useGridApiMethod.js +1 -1
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridInitializeState.js +1 -1
- package/node/hooks/utils/useGridLogger.js +1 -1
- package/node/hooks/utils/useGridNativeEventListener.js +1 -1
- package/node/hooks/utils/useGridPrivateApiContext.js +1 -1
- package/node/hooks/utils/useGridRootProps.js +1 -1
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/hooks/utils/useGridVisibleRows.js +1 -1
- package/node/hooks/utils/useResizeObserver.js +1 -1
- package/node/hooks/utils/useRunOnce.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/utils/propValidation.js +1 -1
- package/node/internals/utils/useProps.js +1 -1
- package/node/joy/icons.js +1 -1
- package/node/joy/joySlots.js +1 -1
- package/node/locales/daDK.js +3 -4
- package/node/material/components/MUISelectOption.js +1 -1
- package/node/material/icons/GridColumnUnsortedIcon.js +1 -1
- package/node/material/icons/index.js +1 -1
- package/node/models/api/index.js +0 -11
- package/node/utils/domUtils.js +5 -0
- package/node/utils/fastMemo.js +1 -1
- package/package.json +3 -5
- package/utils/domUtils.d.ts +1 -0
- package/utils/domUtils.js +4 -0
- package/utils/getGridLocalization.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,158 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.3.1
|
|
7
|
+
|
|
8
|
+
_Apr 26, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Scatter Charts get a [z-axis to allow coloring data points independently from their coordinates](https://mui.com/x/react-charts/scatter/#color-scale)
|
|
13
|
+
- 🌍 Improve Catalan (ca-ES) and Spanish (es-ES) locales on the Date and Time Pickers
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
- 📚 Documentation improvements
|
|
16
|
+
|
|
17
|
+
### Data Grid
|
|
18
|
+
|
|
19
|
+
#### `@mui/x-data-grid@7.3.1`
|
|
20
|
+
|
|
21
|
+
- [DataGrid] Fix date filtering for negative timezone offsets (#12836) @cherniavskii
|
|
22
|
+
- [DataGrid] Fix flex column width when used with pinned columns (#12849) @romgrk
|
|
23
|
+
- [DataGrid] Fix group header resize (#12863) @arminmeh
|
|
24
|
+
- [DataGrid] Pass slot props to `columnHeaders` slot (#12768) @cherniavskii
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@7.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@7.3.1`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@7.3.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@7.3.1`.
|
|
33
|
+
|
|
34
|
+
### Date and Time Pickers
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-date-pickers@7.3.1`
|
|
37
|
+
|
|
38
|
+
- [l10n] Improve Catalan (ca-ES) locale (#12856) @soler1212
|
|
39
|
+
- [l10n] Improve Spanish (es-ES) locale (#12858) @soler1212
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers-pro@7.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-date-pickers@7.3.1`.
|
|
44
|
+
|
|
45
|
+
### Charts
|
|
46
|
+
|
|
47
|
+
#### `@mui/x-charts@7.3.1`
|
|
48
|
+
|
|
49
|
+
- [charts] Add documentation on border radius alternative for `BarCharts` (#12859) @JCQuintas
|
|
50
|
+
- [charts] Add z-axis to colorize scatter charts (#12738) @alexfauquette
|
|
51
|
+
- [charts] Fix left/bottomAxis not picking up default axis id (#12894) @JCQuintas
|
|
52
|
+
- [charts] Improve default tooltip content (#12257) @oliviertassinari
|
|
53
|
+
- [charts] Round y values for bar chart (#12846) @alexfauquette
|
|
54
|
+
|
|
55
|
+
### Tree View
|
|
56
|
+
|
|
57
|
+
#### `@mui/x-tree-view@7.3.1`
|
|
58
|
+
|
|
59
|
+
- [TreeView] Remove un-needed `aria-activedescendant` attribute (#12867) @flaviendelangle
|
|
60
|
+
- [TreeView] Rework the selection internals (#12703) @flaviendelangle
|
|
61
|
+
- [TreeView] Use the order in which the items are displayed for `type-ahead` (#12827) @flaviendelangle
|
|
62
|
+
|
|
63
|
+
### Docs
|
|
64
|
+
|
|
65
|
+
- [docs] Add demo for styling charts with `sx` props (#12791) @derek-0000
|
|
66
|
+
- [docs] Cover webpack 4 support in migration guide (#12710) @cherniavskii
|
|
67
|
+
- [docs] Document interfaces for charts (#12656) @alexfauquette
|
|
68
|
+
- [docs] Fix Vale regression (#12862) @oliviertassinari
|
|
69
|
+
- [docs] Improve Data Grid migration guide (#12879) @MBilalShafi
|
|
70
|
+
- [docs] Update Column features availability (#12865) @DanailH
|
|
71
|
+
|
|
72
|
+
### Core
|
|
73
|
+
|
|
74
|
+
- [core] Fix `l10n` GH workflow (#12895) @LukasTy
|
|
75
|
+
- [core] Match Base UI and Toolpad @oliviertassinari
|
|
76
|
+
- [core] Remove redundant `setupFiles` entries in `package.json` (#12899) @LukasTy
|
|
77
|
+
- [core] Use `describeTreeView` for focus tests (#12698) @flaviendelangle
|
|
78
|
+
- [core] Use `describeTreeView` for type-ahead tests (#12811) @flaviendelangle
|
|
79
|
+
- [code-infra] Change package manager to `pnpm` (#11875) @LukasTy
|
|
80
|
+
- [code-infra] Closer sync with eslint config of codebase (#12864) @oliviertassinari
|
|
81
|
+
- [support-infra] Add release announcement to GitHub workflows (#11867) (#12843) @michelengelen
|
|
82
|
+
|
|
83
|
+
## 7.3.0
|
|
84
|
+
|
|
85
|
+
_Apr 18, 2024_
|
|
86
|
+
|
|
87
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
88
|
+
|
|
89
|
+
- 📄 Support [unknown and estimated row count in server-side pagination](https://mui.com/x/react-data-grid/pagination/#index-based-pagination) (#12490) @MBilalShafi
|
|
90
|
+
- 🎨 Support color scales in Charts (#12490) @alexfauquette
|
|
91
|
+
Add a [`colorMap` configuration](https://mui.com/x/react-charts/styling/#values-color) to an axis, and the chart will use it to select colors.
|
|
92
|
+
Each impacted chart ([bar charts](https://mui.com/x/react-charts/bars/#color-scale), [line charts](https://mui.com/x/react-charts/lines/#color-scale), [scatter charts](https://mui.com/x/react-charts/scatter/#color-scale)) has a dedicated section explaining how this color map is impacting it.
|
|
93
|
+
|
|
94
|
+
<img src="https://github.com/mui/mui-x/assets/45398769/f0066606-3486-4c4e-b3be-7fdd56d763c3" alt="scatter chart with gradient along y-axis" />
|
|
95
|
+
|
|
96
|
+
- 🌍 Improve Danish (da-DK) locale on the Data Grid
|
|
97
|
+
- 🐞 Bugfixes
|
|
98
|
+
- 📚 Documentation improvements
|
|
99
|
+
|
|
100
|
+
### Data Grid
|
|
101
|
+
|
|
102
|
+
#### `@mui/x-data-grid@7.3.0`
|
|
103
|
+
|
|
104
|
+
- [DataGrid] Fix calling `onCellEditStop` on error (#12747) @sai6855
|
|
105
|
+
- [DataGrid] Fix column resize (#12792) @romgrk
|
|
106
|
+
- [DataGrid] Fix column separators (#12808) @romgrk
|
|
107
|
+
- [DataGrid] Limit panel width to not exceed screen width (#12799) @cherniavskii
|
|
108
|
+
- [DataGrid] Support advanced server-side pagination use cases (#12474) @MBilalShafi
|
|
109
|
+
- [DataGrid] Support state export and restore on grid density (#12671) @MBilalShafi
|
|
110
|
+
- [l10n] Improve Danish (da-DK) locale (#12784) @EmilBahnsen
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-data-grid-pro@7.3.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-data-grid@7.3.0`, plus:
|
|
115
|
+
|
|
116
|
+
- [DataGridPro] Implement header filter height (#12666) @romgrk
|
|
117
|
+
|
|
118
|
+
#### `@mui/x-data-grid-premium@7.3.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
119
|
+
|
|
120
|
+
Same changes as in `@mui/x-data-grid-pro@7.3.0`.
|
|
121
|
+
|
|
122
|
+
### Charts
|
|
123
|
+
|
|
124
|
+
#### Breaking change
|
|
125
|
+
|
|
126
|
+
A typo fix:
|
|
127
|
+
|
|
128
|
+
```diff
|
|
129
|
+
- ContinuouseScaleName
|
|
130
|
+
+ ContinuousScaleName
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-charts@7.3.0`
|
|
134
|
+
|
|
135
|
+
- [charts] Add `dataIndex` to series `valueFormatter` (#12745) @JCQuintas
|
|
136
|
+
- [charts] Add color scale (#12490) @alexfauquette
|
|
137
|
+
- [charts] Do not document the usage of `DEFAULT_X_AXIS_KEY` and `DEFAULT_Y_AXIS_KEY` (#12780) @alexfauquette
|
|
138
|
+
- [charts] Export more utils (#12744) @alexfauquette
|
|
139
|
+
- [charts] Fix passing slot props down to `PieArcLabel` (#12806) @JCQuintas
|
|
140
|
+
|
|
141
|
+
### Tree View
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-tree-view@7.3.0`
|
|
144
|
+
|
|
145
|
+
- [TreeView] Support `defaultMuiPrevented` on the `onFocus` prop of the root slot (#12813) @flaviendelangle
|
|
146
|
+
|
|
147
|
+
### Docs
|
|
148
|
+
|
|
149
|
+
- [docs] Add grid cell display example to the migration guide (#12793) @romgrk
|
|
150
|
+
- [docs] Use charts classes objects (#12781) @alexfauquette
|
|
151
|
+
- [docs] Fix layout shift on demos (#12816) @zanivan
|
|
152
|
+
- [test] Increase timeout for test that sometimes fail on `DateTimeRangePicker` (#12786) @LukasTy
|
|
153
|
+
|
|
154
|
+
### Core
|
|
155
|
+
|
|
156
|
+
- [docs-infra] Prepare infra to document charts interfaces (#12653) @alexfauquette
|
|
157
|
+
|
|
6
158
|
## 7.2.0
|
|
7
159
|
|
|
8
160
|
_Apr 12, 2024_
|
|
@@ -168,7 +320,7 @@ Same changes as in `@mui/x-date-pickers@7.1.1`, plus:
|
|
|
168
320
|
- [docs] Fix type arguments in Custom Field page (#12619) @Juneezee
|
|
169
321
|
- [docs] Fix typo in `getItemId` prop description (#12637) @flaviendelangle
|
|
170
322
|
- [docs] Make the Charts `margin` usage more visible (#12591) @alexfauquette
|
|
171
|
-
- [docs] Match IE 11 spacing with Material
|
|
323
|
+
- [docs] Match IE 11 spacing with Material UI @oliviertassinari
|
|
172
324
|
- [docs] Move data grid interfaces to standard API page layout (#12016) @alexfauquette
|
|
173
325
|
- [docs] Remove ` around @default values (#12158) @alexfauquette
|
|
174
326
|
- [docs] Remove `day` from the default `dayOfWeekFormatter` function params (#12644) @LukasTy
|
|
@@ -431,7 +583,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0`, plus:
|
|
|
431
583
|
- [docs] Update links to v6 (#12496) @cherniavskii
|
|
432
584
|
- [docs] Update links to v7 docs (#12500) @noraleonte
|
|
433
585
|
- [docs] Update supported versions (#12508) @joserodolfofreitas
|
|
434
|
-
- [docs] Update "What's new in MUI
|
|
586
|
+
- [docs] Update "What's new in MUI X" page #12527 @cherniavskii
|
|
435
587
|
|
|
436
588
|
### Core
|
|
437
589
|
|
|
@@ -3058,6 +3210,56 @@ Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
|
3058
3210
|
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
3059
3211
|
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
3060
3212
|
|
|
3213
|
+
## 6.19.11
|
|
3214
|
+
|
|
3215
|
+
_Apr 18, 2024_
|
|
3216
|
+
|
|
3217
|
+
We'd like to offer a big thanks to the 1 contributor who made this release possible. Here are some highlights ✨:
|
|
3218
|
+
|
|
3219
|
+
- 🐞 Bugfixes
|
|
3220
|
+
|
|
3221
|
+
### Data Grid
|
|
3222
|
+
|
|
3223
|
+
#### `@mui/x-data-grid@6.19.11`
|
|
3224
|
+
|
|
3225
|
+
- [DataGrid] Fix virtualization memory leak (#12812) @romgrk
|
|
3226
|
+
|
|
3227
|
+
#### `@mui/x-data-grid-pro@6.19.11` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
3228
|
+
|
|
3229
|
+
Same changes as in `@mui/x-data-grid@6.19.11`.
|
|
3230
|
+
|
|
3231
|
+
#### `@mui/x-data-grid-premium@6.19.11` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
3232
|
+
|
|
3233
|
+
Same changes as in `@mui/x-data-grid-pro@6.19.11`.
|
|
3234
|
+
|
|
3235
|
+
## 6.19.10
|
|
3236
|
+
|
|
3237
|
+
_Apr 12, 2024_
|
|
3238
|
+
|
|
3239
|
+
We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
|
|
3240
|
+
|
|
3241
|
+
- 🐞 Bugfixes
|
|
3242
|
+
- 📚 Documentation improvements
|
|
3243
|
+
|
|
3244
|
+
### Data Grid
|
|
3245
|
+
|
|
3246
|
+
#### `@mui/x-data-grid@6.19.10`
|
|
3247
|
+
|
|
3248
|
+
- [DataGrid] Do not escape double quotes when copying to clipboard (#12734) @cherniavskii
|
|
3249
|
+
- [DataGrid] Fix bug in suspense (#12754) @cherniavskii
|
|
3250
|
+
|
|
3251
|
+
#### `@mui/x-data-grid-pro@6.19.10` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
3252
|
+
|
|
3253
|
+
Same changes as in `@mui/x-data-grid@6.19.10`.
|
|
3254
|
+
|
|
3255
|
+
#### `@mui/x-data-grid-premium@6.19.10` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
3256
|
+
|
|
3257
|
+
Same changes as in `@mui/x-data-grid-pro@6.19.10`.
|
|
3258
|
+
|
|
3259
|
+
### Core
|
|
3260
|
+
|
|
3261
|
+
- [core] Update the docs release source branch (#12685) @LukasTy
|
|
3262
|
+
|
|
3061
3263
|
## 6.19.9
|
|
3062
3264
|
|
|
3063
3265
|
_Apr 5, 2024_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -8,8 +8,7 @@ import { GridContextProvider } from '../context/GridContextProvider';
|
|
|
8
8
|
import { useDataGridComponent } from './useDataGridComponent';
|
|
9
9
|
import { useDataGridProps } from './useDataGridProps';
|
|
10
10
|
import { propValidatorsDataGrid, validateProps } from '../internals/utils/propValidation';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
const propValidators = [...propValidatorsDataGrid,
|
|
14
13
|
// Only validate in MIT version
|
|
15
14
|
props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
|
|
@@ -186,6 +185,12 @@ DataGridRaw.propTypes = {
|
|
|
186
185
|
* @default "cell"
|
|
187
186
|
*/
|
|
188
187
|
editMode: PropTypes.oneOf(['cell', 'row']),
|
|
188
|
+
/**
|
|
189
|
+
* Use if the actual rowCount is not known upfront, but an estimation is available.
|
|
190
|
+
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
|
191
|
+
* Applicable only with `paginationMode="server"` and when `rowCount="-1"`
|
|
192
|
+
*/
|
|
193
|
+
estimatedRowCount: PropTypes.number,
|
|
189
194
|
/**
|
|
190
195
|
* Unstable features, breaking changes might be introduced.
|
|
191
196
|
* For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
|
|
@@ -487,6 +492,11 @@ DataGridRaw.propTypes = {
|
|
|
487
492
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
488
493
|
*/
|
|
489
494
|
onMenuOpen: PropTypes.func,
|
|
495
|
+
/**
|
|
496
|
+
* Callback fired when the pagination meta has changed.
|
|
497
|
+
* @param {GridPaginationMeta} paginationMeta Updated pagination meta.
|
|
498
|
+
*/
|
|
499
|
+
onPaginationMetaChange: PropTypes.func,
|
|
490
500
|
/**
|
|
491
501
|
* Callback fired when the pagination model has changed.
|
|
492
502
|
* @param {GridPaginationModel} model Updated pagination model.
|
|
@@ -586,6 +596,13 @@ DataGridRaw.propTypes = {
|
|
|
586
596
|
value: PropTypes.number.isRequired
|
|
587
597
|
})]).isRequired),
|
|
588
598
|
pagination: PropTypes.oneOf([true]),
|
|
599
|
+
/**
|
|
600
|
+
* The extra information about the pagination state of the Data Grid.
|
|
601
|
+
* Only applicable with `paginationMode="server"`.
|
|
602
|
+
*/
|
|
603
|
+
paginationMeta: PropTypes.shape({
|
|
604
|
+
hasNextPage: PropTypes.bool
|
|
605
|
+
}),
|
|
589
606
|
/**
|
|
590
607
|
* Pagination can be processed on the server or client-side.
|
|
591
608
|
* Set it to 'client' if you would like to handle the pagination on the client-side.
|
|
@@ -621,6 +638,7 @@ DataGridRaw.propTypes = {
|
|
|
621
638
|
/**
|
|
622
639
|
* Set the total number of rows, if it is different from the length of the value `rows` prop.
|
|
623
640
|
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
|
641
|
+
* Only works with `paginationMode="server"`, ignored when `paginationMode="client"`.
|
|
624
642
|
*/
|
|
625
643
|
rowCount: PropTypes.number,
|
|
626
644
|
/**
|
|
@@ -7,6 +7,13 @@ function buildApplyFilterFn(filterItem, compareFn, showTime, keepHours) {
|
|
|
7
7
|
if (showTime) {
|
|
8
8
|
date.setSeconds(0, 0);
|
|
9
9
|
} else {
|
|
10
|
+
// In GMT-X timezone, the date will be one day behind.
|
|
11
|
+
// For 2022-08-16:
|
|
12
|
+
// GMT+2: Tue Aug 16 2022 02:00:00 GMT+0200
|
|
13
|
+
// GMT-4: Mon Aug 15 2022 20:00:00 GMT-0400
|
|
14
|
+
//
|
|
15
|
+
// We need to add the offset before resetting the hours.
|
|
16
|
+
date.setMinutes(date.getMinutes() + date.getTimezoneOffset());
|
|
10
17
|
date.setHours(0, 0, 0, 0);
|
|
11
18
|
}
|
|
12
19
|
const time = date.getTime();
|
package/components/GridFooter.js
CHANGED
|
@@ -9,8 +9,7 @@ import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
|
9
9
|
import { GridSelectedRowCount } from './GridSelectedRowCount';
|
|
10
10
|
import { GridFooterContainer } from './containers/GridFooterContainer';
|
|
11
11
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref) {
|
|
15
14
|
const apiRef = useGridApiContext();
|
|
16
15
|
const rootProps = useGridRootProps();
|
package/components/GridHeader.js
CHANGED
|
@@ -2,8 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
4
4
|
import { GridPreferencesPanel } from './panel/GridPreferencesPanel';
|
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
export function GridHeader() {
|
|
8
7
|
const rootProps = useGridRootProps();
|
|
9
8
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { fastMemo } from '../utils/fastMemo';
|
|
3
4
|
import { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext';
|
|
@@ -30,7 +31,7 @@ function GridHeaders() {
|
|
|
30
31
|
apiRef.current.register('private', {
|
|
31
32
|
columnHeadersContainerRef: columnsContainerRef
|
|
32
33
|
});
|
|
33
|
-
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, {
|
|
34
|
+
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
34
35
|
ref: columnsContainerRef,
|
|
35
36
|
visibleColumns: visibleColumns,
|
|
36
37
|
filterColumnLookup: filterColumnLookup,
|
|
@@ -44,7 +45,7 @@ function GridHeaders() {
|
|
|
44
45
|
columnVisibility: columnVisibility,
|
|
45
46
|
columnGroupsHeaderStructure: columnGroupsHeaderStructure,
|
|
46
47
|
hasOtherElementInTabSequence: hasOtherElementInTabSequence
|
|
47
|
-
});
|
|
48
|
+
}, rootProps.slotProps?.columnHeaders));
|
|
48
49
|
}
|
|
49
50
|
const MemoizedGridHeaders = fastMemo(GridHeaders);
|
|
50
51
|
export { MemoizedGridHeaders as GridHeaders };
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { TablePaginationProps } from '@mui/material/TablePagination';
|
|
2
|
+
import { TablePaginationProps, LabelDisplayedRowsArgs } from '@mui/material/TablePagination';
|
|
3
|
+
export type WrappedLabelDisplayedRows = (args: LabelDisplayedRowsArgs & {
|
|
4
|
+
estimated?: number;
|
|
5
|
+
}) => React.ReactNode;
|
|
3
6
|
interface GridPaginationOwnProps {
|
|
4
7
|
component?: React.ElementType;
|
|
5
8
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
3
4
|
import PropTypes from 'prop-types';
|
|
4
5
|
import TablePagination, { tablePaginationClasses } from '@mui/material/TablePagination';
|
|
5
|
-
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { useGridSelector } from '../hooks/utils/useGridSelector';
|
|
7
7
|
import { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
8
8
|
import { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
9
|
-
import { gridPaginationModelSelector, gridPaginationRowCountSelector } from '../hooks/features/pagination/gridPaginationSelector';
|
|
9
|
+
import { gridPaginationModelSelector, gridPaginationRowCountSelector, gridPageCountSelector } from '../hooks/features/pagination/gridPaginationSelector';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
const GridPaginationRoot = styled(TablePagination)(({
|
|
12
12
|
theme
|
|
@@ -24,6 +24,31 @@ const GridPaginationRoot = styled(TablePagination)(({
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}));
|
|
27
|
+
const wrapLabelDisplayedRows = (labelDisplayedRows, estimated) => {
|
|
28
|
+
return ({
|
|
29
|
+
from,
|
|
30
|
+
to,
|
|
31
|
+
count,
|
|
32
|
+
page
|
|
33
|
+
}) => labelDisplayedRows({
|
|
34
|
+
from,
|
|
35
|
+
to,
|
|
36
|
+
count,
|
|
37
|
+
page,
|
|
38
|
+
estimated
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const defaultLabelDisplayedRows = ({
|
|
42
|
+
from,
|
|
43
|
+
to,
|
|
44
|
+
count,
|
|
45
|
+
estimated
|
|
46
|
+
}) => {
|
|
47
|
+
if (!estimated) {
|
|
48
|
+
return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
|
|
49
|
+
}
|
|
50
|
+
return `${from}–${to} of ${count !== -1 ? count : `more than ${estimated > to ? estimated : to}`}`;
|
|
51
|
+
};
|
|
27
52
|
|
|
28
53
|
// A mutable version of a readonly array.
|
|
29
54
|
|
|
@@ -32,10 +57,32 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
32
57
|
const rootProps = useGridRootProps();
|
|
33
58
|
const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
|
|
34
59
|
const rowCount = useGridSelector(apiRef, gridPaginationRowCountSelector);
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
const pageCount = useGridSelector(apiRef, gridPageCountSelector);
|
|
61
|
+
const {
|
|
62
|
+
paginationMode,
|
|
63
|
+
loading,
|
|
64
|
+
estimatedRowCount
|
|
65
|
+
} = rootProps;
|
|
66
|
+
const computedProps = React.useMemo(() => {
|
|
67
|
+
if (rowCount === -1 && paginationMode === 'server' && loading) {
|
|
68
|
+
return {
|
|
69
|
+
backIconButtonProps: {
|
|
70
|
+
disabled: true
|
|
71
|
+
},
|
|
72
|
+
nextIconButtonProps: {
|
|
73
|
+
disabled: true
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return {};
|
|
78
|
+
}, [loading, paginationMode, rowCount]);
|
|
79
|
+
const lastPage = React.useMemo(() => Math.max(0, pageCount - 1), [pageCount]);
|
|
80
|
+
const computedPage = React.useMemo(() => {
|
|
81
|
+
if (rowCount === -1) {
|
|
82
|
+
return paginationModel.page;
|
|
83
|
+
}
|
|
84
|
+
return paginationModel.page <= lastPage ? paginationModel.page : lastPage;
|
|
85
|
+
}, [lastPage, paginationModel.page, rowCount]);
|
|
39
86
|
const handlePageSizeChange = React.useCallback(event => {
|
|
40
87
|
const pageSize = Number(event.target.value);
|
|
41
88
|
apiRef.current.setPageSize(pageSize);
|
|
@@ -61,16 +108,18 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
61
108
|
const warnedOnceMissingInPageSizeOptions = React.useRef(false);
|
|
62
109
|
const pageSize = rootProps.paginationModel?.pageSize ?? paginationModel.pageSize;
|
|
63
110
|
if (!warnedOnceMissingInPageSizeOptions.current && !rootProps.autoPageSize && !isPageSizeIncludedInPageSizeOptions(pageSize)) {
|
|
64
|
-
console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not
|
|
111
|
+
console.warn([`MUI X: The page size \`${paginationModel.pageSize}\` is not present in the \`pageSizeOptions\`.`, `Add it to show the pagination select.`].join('\n'));
|
|
65
112
|
warnedOnceMissingInPageSizeOptions.current = true;
|
|
66
113
|
}
|
|
67
114
|
}
|
|
68
115
|
const pageSizeOptions = isPageSizeIncludedInPageSizeOptions(paginationModel.pageSize) ? rootProps.pageSizeOptions : [];
|
|
116
|
+
const locales = apiRef.current.getLocaleText('MuiTablePagination');
|
|
117
|
+
const wrappedLabelDisplayedRows = wrapLabelDisplayedRows(locales.labelDisplayedRows || defaultLabelDisplayedRows, estimatedRowCount);
|
|
69
118
|
return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({
|
|
70
119
|
ref: ref,
|
|
71
120
|
component: "div",
|
|
72
121
|
count: rowCount,
|
|
73
|
-
page:
|
|
122
|
+
page: computedPage
|
|
74
123
|
// TODO: Remove the cast once the type is fixed in Material UI and that the min Material UI version
|
|
75
124
|
// for x-data-grid is past the fix.
|
|
76
125
|
// Note that Material UI will not mutate the array, so this is safe.
|
|
@@ -79,7 +128,9 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
79
128
|
rowsPerPage: paginationModel.pageSize,
|
|
80
129
|
onPageChange: handlePageChange,
|
|
81
130
|
onRowsPerPageChange: handlePageSizeChange
|
|
82
|
-
},
|
|
131
|
+
}, computedProps, locales, {
|
|
132
|
+
labelDisplayedRows: wrappedLabelDisplayedRows
|
|
133
|
+
}, props));
|
|
83
134
|
});
|
|
84
135
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
85
136
|
// ----------------------------- Warning --------------------------------
|
package/components/GridRow.js
CHANGED
|
@@ -24,8 +24,7 @@ import { gridEditRowsStateSelector } from '../hooks/features/editing/gridEditing
|
|
|
24
24
|
import { PinnedPosition, gridPinnedColumnPositionLookup } from './cell/GridCell';
|
|
25
25
|
import { GridScrollbarFillerCell as ScrollbarFiller } from './GridScrollbarFillerCell';
|
|
26
26
|
import { getPinnedCellOffset } from '../internals/utils/getPinnedCellOffset';
|
|
27
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
28
|
const useUtilityClasses = ownerState => {
|
|
30
29
|
const {
|
|
31
30
|
editable,
|
|
@@ -366,6 +365,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
366
365
|
}).isRequired,
|
|
367
366
|
hasScrollX: PropTypes.bool.isRequired,
|
|
368
367
|
hasScrollY: PropTypes.bool.isRequired,
|
|
368
|
+
headerFilterHeight: PropTypes.number.isRequired,
|
|
369
369
|
headerHeight: PropTypes.number.isRequired,
|
|
370
370
|
headersTotalHeight: PropTypes.number.isRequired,
|
|
371
371
|
isReady: PropTypes.bool.isRequired,
|
|
@@ -82,7 +82,7 @@ function GridScrollAreaRaw(props) {
|
|
|
82
82
|
scrollDirection
|
|
83
83
|
});
|
|
84
84
|
const classes = useUtilityClasses(ownerState);
|
|
85
|
-
const totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps
|
|
85
|
+
const totalHeaderHeight = getTotalHeaderHeight(apiRef, rootProps);
|
|
86
86
|
const headerHeight = Math.floor(rootProps.columnHeaderHeight * densityFactor);
|
|
87
87
|
const style = {
|
|
88
88
|
height: headerHeight,
|
|
@@ -10,8 +10,7 @@ import { gridClasses } from '../../constants/gridClasses';
|
|
|
10
10
|
import { GridMenu } from '../menu/GridMenu';
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
12
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
const hasActions = colDef => typeof colDef.getActions === 'function';
|
|
16
15
|
function GridActionsCell(props) {
|
|
17
16
|
const {
|
|
@@ -7,8 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
import MenuItem from '@mui/material/MenuItem';
|
|
8
8
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
13
12
|
const rootProps = useGridRootProps();
|
|
14
13
|
if (!props.showInMenu) {
|
|
@@ -10,8 +10,7 @@ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
|
10
10
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
11
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
12
|
import { GridIconButtonContainer } from './GridIconButtonContainer';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
const useUtilityClasses = ownerState => {
|
|
16
15
|
const {
|
|
17
16
|
classes
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import clsx from 'clsx';
|
|
4
5
|
import { unstable_composeClasses as composeClasses, unstable_useId as useId } from '@mui/utils';
|
|
5
6
|
import { fastMemo } from '../../utils/fastMemo';
|
|
6
7
|
import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
|
|
7
8
|
import { GridColumnHeaderSortIcon } from './GridColumnHeaderSortIcon';
|
|
8
9
|
import { ColumnHeaderMenuIcon } from './ColumnHeaderMenuIcon';
|
|
9
10
|
import { GridColumnHeaderMenu } from '../menu/columnMenu/GridColumnHeaderMenu';
|
|
10
|
-
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
11
|
+
import { gridClasses, getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
11
12
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
13
|
import { GridGenericColumnHeaderItem } from './GridGenericColumnHeaderItem';
|
|
13
14
|
import { isEventTargetInPortal } from '../../utils/domUtils';
|
|
14
15
|
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from '../../utils/cellBorderUtils';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
const useUtilityClasses = ownerState => {
|
|
18
18
|
const {
|
|
19
19
|
colDef,
|
|
@@ -44,6 +44,7 @@ function GridColumnHeaderItem(props) {
|
|
|
44
44
|
colIndex,
|
|
45
45
|
headerHeight,
|
|
46
46
|
isResizing,
|
|
47
|
+
isLast,
|
|
47
48
|
sortDirection,
|
|
48
49
|
sortIndex,
|
|
49
50
|
filterItemsCounter,
|
|
@@ -182,7 +183,7 @@ function GridColumnHeaderItem(props) {
|
|
|
182
183
|
width: colDef.computedWidth,
|
|
183
184
|
columnMenuIconButton: columnMenuIconButton,
|
|
184
185
|
columnTitleIconButtons: columnTitleIconButtons,
|
|
185
|
-
headerClassName: headerClassName,
|
|
186
|
+
headerClassName: clsx(headerClassName, isLast && gridClasses['columnHeader--last']),
|
|
186
187
|
label: label,
|
|
187
188
|
resizable: !rootProps.disableColumnResize && !!colDef.resizable,
|
|
188
189
|
"data-field": colDef.field,
|
|
@@ -207,6 +208,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaderItem.propTypes = {
|
|
|
207
208
|
headerHeight: PropTypes.number.isRequired,
|
|
208
209
|
indexInSection: PropTypes.number.isRequired,
|
|
209
210
|
isDragging: PropTypes.bool.isRequired,
|
|
211
|
+
isLast: PropTypes.bool.isRequired,
|
|
210
212
|
isResizing: PropTypes.bool.isRequired,
|
|
211
213
|
pinnedPosition: PropTypes.oneOf(['left', 'right']),
|
|
212
214
|
sectionLength: PropTypes.number.isRequired,
|
|
@@ -48,7 +48,7 @@ function GridColumnHeaderSeparatorRaw(props) {
|
|
|
48
48
|
className: classes.root,
|
|
49
49
|
style: {
|
|
50
50
|
minHeight: height,
|
|
51
|
-
opacity: rootProps.showColumnVerticalBorder ?
|
|
51
|
+
opacity: rootProps.showColumnVerticalBorder ? 0 : 1
|
|
52
52
|
}
|
|
53
53
|
}, other, {
|
|
54
54
|
onClick: stopClick,
|
|
@@ -7,8 +7,7 @@ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
|
7
7
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { GridIconButtonContainer } from './GridIconButtonContainer';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const useUtilityClasses = ownerState => {
|
|
13
12
|
const {
|
|
14
13
|
classes
|
|
@@ -8,8 +8,7 @@ import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiCon
|
|
|
8
8
|
import { GridColumnHeaderTitle } from './GridColumnHeaderTitle';
|
|
9
9
|
import { GridColumnHeaderSeparator } from './GridColumnHeaderSeparator';
|
|
10
10
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridGenericColumnHeaderItem(props, ref) {
|
|
14
13
|
const {
|
|
15
14
|
classes,
|
|
@@ -12,8 +12,7 @@ import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
|
12
12
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
13
13
|
import { useLazyRef } from '../../hooks/utils/useLazyRef';
|
|
14
14
|
import { checkColumnVisibilityModelsSame, defaultSearchPredicate } from './utils';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
const useUtilityClasses = ownerState => {
|
|
18
17
|
const {
|
|
19
18
|
classes
|
|
@@ -12,8 +12,7 @@ import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiCon
|
|
|
12
12
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
13
13
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
14
14
|
import { gridDensitySelector } from '../../hooks/features/density/densitySelector';
|
|
15
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
16
|
const useUtilityClasses = ownerState => {
|
|
18
17
|
const {
|
|
19
18
|
autoHeight,
|