@mui/x-data-grid 5.10.0 → 5.12.0
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 +325 -10
- package/DataGrid/DataGrid.js +61 -2
- package/DataGrid/useDataGridProps.js +2 -1
- package/README.md +4 -5
- package/colDef/gridActionsColDef.js +2 -1
- package/colDef/gridBooleanColDef.js +2 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridDateColDef.js +4 -2
- package/colDef/gridNumericColDef.js +3 -2
- package/colDef/gridNumericOperators.d.ts +2 -0
- package/colDef/gridNumericOperators.js +11 -0
- package/colDef/gridSingleSelectColDef.js +3 -2
- package/colDef/gridSingleSelectOperators.d.ts +3 -0
- package/colDef/gridSingleSelectOperators.js +52 -0
- package/colDef/gridStringColDef.js +3 -2
- package/colDef/gridStringOperators.d.ts +2 -0
- package/colDef/gridStringOperators.js +12 -0
- package/components/GridFooter.d.ts +4 -2
- package/components/GridFooter.js +11 -2
- package/components/GridRow.d.ts +1 -1
- package/components/GridRow.js +55 -17
- package/components/GridRowCount.d.ts +4 -1
- package/components/GridRowCount.js +1 -0
- package/components/GridScrollArea.js +3 -4
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +2 -1
- package/components/base/GridBody.js +1 -2
- package/components/base/GridOverlays.js +2 -3
- package/components/cell/GridActionsCell.js +13 -4
- package/components/cell/GridActionsCellItem.d.ts +1 -1
- package/components/cell/GridCell.d.ts +2 -1
- package/components/cell/GridCell.js +17 -12
- package/components/cell/GridEditBooleanCell.d.ts +15 -3
- package/components/cell/GridEditBooleanCell.js +101 -6
- package/components/cell/GridEditDateCell.d.ts +16 -4
- package/components/cell/GridEditDateCell.js +99 -5
- package/components/cell/GridEditInputCell.d.ts +11 -5
- package/components/cell/GridEditInputCell.js +29 -5
- package/components/cell/GridEditSingleSelectCell.d.ts +12 -4
- package/components/cell/GridEditSingleSelectCell.js +28 -5
- package/components/cell/index.d.ts +2 -0
- package/components/cell/index.js +2 -0
- package/components/columnHeaders/GridColumnHeaderItem.js +19 -19
- package/components/columnHeaders/GridColumnHeaders.d.ts +2 -0
- package/components/columnHeaders/GridColumnHeadersInner.d.ts +2 -0
- package/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/components/containers/GridFooterContainer.d.ts +8 -2
- package/components/containers/GridFooterContainer.js +11 -2
- package/components/containers/GridRoot.js +25 -5
- package/components/containers/GridRootStyles.js +4 -2
- package/components/containers/GridToolbarContainer.d.ts +8 -2
- package/components/containers/GridToolbarContainer.js +12 -2
- package/components/menu/GridMenu.js +9 -2
- package/components/panel/GridColumnsPanel.js +10 -2
- package/components/panel/GridPanelContent.d.ts +8 -1
- package/components/panel/GridPanelContent.js +13 -2
- package/components/panel/GridPanelFooter.d.ts +8 -1
- package/components/panel/GridPanelFooter.js +13 -2
- package/components/panel/GridPanelHeader.d.ts +8 -1
- package/components/panel/GridPanelHeader.js +13 -2
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +3 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +61 -4
- package/components/panel/filterPanel/GridFilterForm.js +88 -8
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
- package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -5
- package/components/panel/filterPanel/GridFilterPanel.js +24 -6
- package/components/toolbar/GridToolbar.d.ts +12 -2
- package/components/toolbar/GridToolbar.js +30 -7
- package/components/toolbar/GridToolbarExport.d.ts +5 -4
- package/components/toolbar/GridToolbarExport.js +15 -20
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +20 -0
- package/components/toolbar/GridToolbarQuickFilter.js +87 -0
- package/components/toolbar/index.d.ts +3 -1
- package/components/toolbar/index.js +3 -2
- package/components/virtualization/GridVirtualScroller.d.ts +4 -1
- package/components/virtualization/GridVirtualScrollerContent.d.ts +4 -1
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +4 -1
- package/constants/defaultGridSlotsComponents.js +3 -2
- package/constants/gridClasses.d.ts +16 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +5 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +11 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +4 -4
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/hooks/core/useGridApiInitialization.js +3 -3
- package/hooks/core/useGridErrorHandler.js +1 -2
- package/hooks/core/useGridStateInitialization.js +1 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
- package/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -0
- package/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/hooks/features/columns/useGridColumns.js +20 -23
- package/hooks/features/dimensions/useGridDimensions.d.ts +1 -1
- package/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridCellEditing.new.js +140 -32
- package/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridRowEditing.new.js +128 -42
- package/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/hooks/features/events/useGridEvents.d.ts +1 -1
- package/hooks/features/events/useGridEvents.js +19 -18
- package/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/hooks/features/export/useGridCsvExport.js +23 -16
- package/hooks/features/export/useGridPrintExport.js +22 -0
- package/hooks/features/export/utils.d.ts +3 -1
- package/hooks/features/export/utils.js +13 -0
- package/hooks/features/filter/gridFilterState.d.ts +1 -2
- package/hooks/features/filter/gridFilterState.js +3 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +17 -1
- package/hooks/features/filter/gridFilterUtils.js +85 -4
- package/hooks/features/filter/useGridFilter.js +25 -13
- package/hooks/features/focus/useGridFocus.d.ts +1 -1
- package/hooks/features/focus/useGridFocus.js +29 -33
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- package/hooks/features/pagination/useGridPage.js +3 -4
- package/hooks/features/pagination/useGridPageSize.js +2 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/hooks/features/rows/gridRowsSelector.d.ts +1 -0
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsState.d.ts +16 -11
- package/hooks/features/rows/gridRowsUtils.d.ts +14 -1
- package/hooks/features/rows/gridRowsUtils.js +79 -1
- package/hooks/features/rows/useGridRows.js +130 -129
- package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
- package/hooks/features/rows/useGridRowsMeta.js +107 -43
- package/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/hooks/features/scroll/useGridScroll.js +6 -1
- package/hooks/features/selection/useGridSelection.d.ts +1 -1
- package/hooks/features/selection/useGridSelection.js +13 -10
- package/hooks/features/sorting/useGridSorting.js +8 -9
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +33 -14
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -1
- package/hooks/utils/useGridApiEventHandler.js +22 -9
- package/hooks/utils/useGridNativeEventListener.js +1 -2
- package/hooks/utils/useGridSelector.js +1 -1
- package/index.d.ts +2 -0
- package/index.js +1 -1
- package/internals/index.d.ts +5 -1
- package/internals/index.js +5 -2
- package/legacy/DataGrid/DataGrid.js +61 -2
- package/legacy/DataGrid/useDataGridProps.js +2 -1
- package/legacy/colDef/gridActionsColDef.js +2 -1
- package/legacy/colDef/gridBooleanColDef.js +2 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/legacy/colDef/gridDateColDef.js +4 -2
- package/legacy/colDef/gridNumericColDef.js +3 -2
- package/legacy/colDef/gridNumericOperators.js +28 -18
- package/legacy/colDef/gridSingleSelectColDef.js +3 -2
- package/legacy/colDef/gridSingleSelectOperators.js +55 -6
- package/legacy/colDef/gridStringColDef.js +3 -2
- package/legacy/colDef/gridStringOperators.js +25 -14
- package/legacy/components/GridFooter.js +11 -2
- package/legacy/components/GridRow.js +60 -17
- package/legacy/components/GridRowCount.js +1 -0
- package/legacy/components/GridScrollArea.js +3 -4
- package/legacy/components/GridSelectedRowCount.js +2 -1
- package/legacy/components/base/GridBody.js +1 -2
- package/legacy/components/base/GridOverlays.js +2 -3
- package/legacy/components/cell/GridActionsCell.js +13 -4
- package/legacy/components/cell/GridCell.js +17 -12
- package/legacy/components/cell/GridEditBooleanCell.js +132 -11
- package/legacy/components/cell/GridEditDateCell.js +148 -42
- package/legacy/components/cell/GridEditInputCell.js +61 -12
- package/legacy/components/cell/GridEditSingleSelectCell.js +41 -13
- package/legacy/components/cell/index.js +2 -0
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +21 -19
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/legacy/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/legacy/components/containers/GridFooterContainer.js +11 -2
- package/legacy/components/containers/GridRoot.js +23 -5
- package/legacy/components/containers/GridRootStyles.js +3 -2
- package/legacy/components/containers/GridToolbarContainer.js +12 -2
- package/legacy/components/menu/GridMenu.js +9 -2
- package/legacy/components/panel/GridColumnsPanel.js +12 -2
- package/legacy/components/panel/GridPanelContent.js +13 -2
- package/legacy/components/panel/GridPanelFooter.js +13 -2
- package/legacy/components/panel/GridPanelHeader.js +13 -2
- package/legacy/components/panel/GridPanelWrapper.js +3 -3
- package/legacy/components/panel/filterPanel/GridFilterForm.js +89 -8
- package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +25 -6
- package/legacy/components/toolbar/GridToolbar.js +31 -6
- package/legacy/components/toolbar/GridToolbarExport.js +18 -19
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +102 -0
- package/legacy/components/toolbar/index.js +3 -2
- package/legacy/constants/defaultGridSlotsComponents.js +3 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +5 -0
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -10
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/legacy/hooks/core/useGridApiInitialization.js +3 -3
- package/legacy/hooks/core/useGridErrorHandler.js +1 -2
- package/legacy/hooks/core/useGridStateInitialization.js +1 -2
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/legacy/hooks/features/columns/useGridColumns.js +20 -23
- package/legacy/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +220 -83
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/legacy/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +132 -42
- package/legacy/hooks/features/editRows/useGridRowEditing.old.js +20 -21
- package/legacy/hooks/features/events/useGridEvents.js +19 -18
- package/legacy/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/legacy/hooks/features/export/useGridCsvExport.js +24 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +22 -0
- package/legacy/hooks/features/export/utils.js +14 -0
- package/legacy/hooks/features/filter/gridFilterState.js +3 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +97 -4
- package/legacy/hooks/features/filter/useGridFilter.js +25 -13
- package/legacy/hooks/features/focus/useGridFocus.js +31 -35
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- package/legacy/hooks/features/pagination/useGridPage.js +3 -4
- package/legacy/hooks/features/pagination/useGridPageSize.js +2 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/legacy/hooks/features/rows/gridRowsSelector.js +3 -0
- package/legacy/hooks/features/rows/gridRowsUtils.js +82 -1
- package/legacy/hooks/features/rows/useGridRows.js +140 -132
- package/legacy/hooks/features/rows/useGridRowsMeta.js +104 -41
- package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/legacy/hooks/features/scroll/useGridScroll.js +6 -1
- package/legacy/hooks/features/selection/useGridSelection.js +13 -10
- package/legacy/hooks/features/sorting/useGridSorting.js +8 -9
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +52 -29
- package/legacy/hooks/utils/useGridApiEventHandler.js +20 -9
- package/legacy/hooks/utils/useGridNativeEventListener.js +1 -2
- package/legacy/hooks/utils/useGridSelector.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +5 -2
- package/legacy/locales/arSD.js +5 -0
- package/legacy/locales/bgBG.js +5 -0
- package/legacy/locales/csCZ.js +5 -0
- package/legacy/locales/daDK.js +5 -0
- package/legacy/locales/deDE.js +10 -5
- package/legacy/locales/elGR.js +5 -0
- package/legacy/locales/esES.js +5 -0
- package/legacy/locales/faIR.js +5 -0
- package/legacy/locales/fiFI.js +5 -0
- package/legacy/locales/frFR.js +5 -0
- package/legacy/locales/heIL.js +10 -5
- package/legacy/locales/huHU.js +5 -0
- package/legacy/locales/itIT.js +5 -0
- package/legacy/locales/jaJP.js +5 -0
- package/legacy/locales/koKR.js +5 -0
- package/legacy/locales/nbNO.js +127 -0
- package/legacy/locales/nlNL.js +5 -0
- package/legacy/locales/plPL.js +5 -0
- package/legacy/locales/ptBR.js +5 -0
- package/legacy/locales/ruRU.js +5 -0
- package/legacy/locales/skSK.js +5 -0
- package/legacy/locales/trTR.js +8 -3
- package/legacy/locales/ukUA.js +5 -0
- package/legacy/locales/viVN.js +5 -0
- package/legacy/locales/zhCN.js +5 -0
- package/legacy/models/events/gridEvents.js +4 -0
- package/legacy/models/gridApiCaches.js +1 -0
- package/legacy/models/index.js +4 -3
- package/legacy/models/params/gridMenuParams.js +1 -0
- package/legacy/models/params/index.js +2 -1
- package/legacy/utils/createSelector.js +18 -2
- package/legacy/utils/exportAs.js +1 -1
- package/locales/arSD.js +5 -0
- package/locales/bgBG.js +5 -0
- package/locales/csCZ.js +5 -0
- package/locales/daDK.js +5 -0
- package/locales/deDE.js +10 -5
- package/locales/elGR.js +5 -0
- package/locales/esES.js +5 -0
- package/locales/faIR.js +5 -0
- package/locales/fiFI.js +5 -0
- package/locales/frFR.js +5 -0
- package/locales/heIL.js +10 -5
- package/locales/huHU.js +5 -0
- package/locales/itIT.js +5 -0
- package/locales/jaJP.js +5 -0
- package/locales/koKR.js +5 -0
- package/locales/nbNO.d.ts +2 -0
- package/locales/nbNO.js +115 -0
- package/locales/nlNL.js +5 -0
- package/locales/plPL.js +5 -0
- package/locales/ptBR.js +5 -0
- package/locales/ruRU.js +5 -0
- package/locales/skSK.js +5 -0
- package/locales/trTR.js +8 -3
- package/locales/ukUA.js +5 -0
- package/locales/viVN.js +5 -0
- package/locales/zhCN.js +5 -0
- package/models/api/gridCoreApi.d.ts +6 -0
- package/models/api/gridEditingApi.d.ts +23 -4
- package/models/api/gridFilterApi.d.ts +5 -0
- package/models/api/gridFocusApi.d.ts +1 -0
- package/models/api/gridLocaleTextApi.d.ts +4 -0
- package/models/api/gridRowApi.d.ts +28 -0
- package/models/api/gridRowsMetaApi.d.ts +24 -0
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +16 -3
- package/models/events/gridEventLookup.d.ts +286 -4
- package/models/events/gridEvents.d.ts +5 -278
- package/models/events/gridEvents.js +4 -0
- package/models/gridApiCaches.d.ts +6 -0
- package/models/gridApiCaches.js +1 -0
- package/models/gridExport.d.ts +29 -2
- package/models/gridFilterModel.d.ts +11 -0
- package/models/gridFilterOperator.d.ts +1 -1
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridStateCommunity.d.ts +0 -2
- package/models/index.d.ts +1 -1
- package/models/index.js +4 -3
- package/models/params/gridMenuParams.d.ts +7 -0
- package/models/params/gridMenuParams.js +1 -0
- package/models/params/gridRowParams.d.ts +1 -1
- package/models/params/index.d.ts +1 -0
- package/models/params/index.js +2 -1
- package/models/props/DataGridProps.d.ts +79 -29
- package/modern/DataGrid/DataGrid.js +61 -2
- package/modern/DataGrid/useDataGridProps.js +2 -1
- package/modern/colDef/gridActionsColDef.js +2 -1
- package/modern/colDef/gridBooleanColDef.js +2 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/colDef/gridDateColDef.js +4 -2
- package/modern/colDef/gridNumericColDef.js +3 -2
- package/modern/colDef/gridNumericOperators.js +11 -0
- package/modern/colDef/gridSingleSelectColDef.js +3 -2
- package/modern/colDef/gridSingleSelectOperators.js +52 -0
- package/modern/colDef/gridStringColDef.js +3 -2
- package/modern/colDef/gridStringOperators.js +12 -0
- package/modern/components/GridFooter.js +11 -2
- package/modern/components/GridRow.js +55 -17
- package/modern/components/GridRowCount.js +1 -0
- package/modern/components/GridScrollArea.js +3 -4
- package/modern/components/GridSelectedRowCount.js +2 -1
- package/modern/components/base/GridBody.js +1 -2
- package/modern/components/base/GridOverlays.js +2 -3
- package/modern/components/cell/GridActionsCell.js +14 -3
- package/modern/components/cell/GridCell.js +17 -12
- package/modern/components/cell/GridEditBooleanCell.js +101 -6
- package/modern/components/cell/GridEditDateCell.js +99 -5
- package/modern/components/cell/GridEditInputCell.js +29 -5
- package/modern/components/cell/GridEditSingleSelectCell.js +28 -5
- package/modern/components/cell/index.js +2 -0
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +19 -19
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +4 -5
- package/modern/components/containers/GridFooterContainer.js +11 -2
- package/modern/components/containers/GridRoot.js +25 -3
- package/modern/components/containers/GridRootStyles.js +4 -2
- package/modern/components/containers/GridToolbarContainer.js +12 -2
- package/modern/components/menu/GridMenu.js +9 -2
- package/modern/components/panel/GridColumnsPanel.js +10 -2
- package/modern/components/panel/GridPanelContent.js +13 -2
- package/modern/components/panel/GridPanelFooter.js +13 -2
- package/modern/components/panel/GridPanelHeader.js +13 -2
- package/modern/components/panel/GridPanelWrapper.js +3 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +88 -8
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
- package/modern/components/panel/filterPanel/GridFilterPanel.js +24 -6
- package/modern/components/toolbar/GridToolbar.js +30 -7
- package/modern/components/toolbar/GridToolbarExport.js +15 -20
- package/modern/components/toolbar/GridToolbarQuickFilter.js +85 -0
- package/modern/components/toolbar/index.js +3 -2
- package/modern/constants/defaultGridSlotsComponents.js +3 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +5 -0
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -7
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/core/useGridErrorHandler.js +1 -2
- package/modern/hooks/core/useGridStateInitialization.js +1 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -6
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +3 -4
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/modern/hooks/features/columns/useGridColumns.js +19 -22
- package/modern/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +138 -32
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +20 -21
- package/modern/hooks/features/editRows/useGridEditing.old.js +4 -5
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +126 -42
- package/modern/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/modern/hooks/features/events/useGridEvents.js +19 -18
- package/modern/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/modern/hooks/features/export/useGridCsvExport.js +21 -16
- package/modern/hooks/features/export/useGridPrintExport.js +20 -0
- package/modern/hooks/features/export/utils.js +13 -0
- package/modern/hooks/features/filter/gridFilterState.js +3 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +81 -4
- package/modern/hooks/features/filter/useGridFilter.js +25 -13
- package/modern/hooks/features/focus/useGridFocus.js +29 -33
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- package/modern/hooks/features/pagination/useGridPage.js +3 -4
- package/modern/hooks/features/pagination/useGridPageSize.js +2 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -6
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +77 -1
- package/modern/hooks/features/rows/useGridRows.js +130 -129
- package/modern/hooks/features/rows/useGridRowsMeta.js +105 -37
- package/modern/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/modern/hooks/features/scroll/useGridScroll.js +6 -1
- package/modern/hooks/features/selection/useGridSelection.js +13 -10
- package/modern/hooks/features/sorting/useGridSorting.js +8 -9
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +33 -14
- package/modern/hooks/utils/useGridApiEventHandler.js +20 -9
- package/modern/hooks/utils/useGridNativeEventListener.js +1 -2
- package/modern/hooks/utils/useGridSelector.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +5 -2
- package/modern/locales/arSD.js +5 -0
- package/modern/locales/bgBG.js +5 -0
- package/modern/locales/csCZ.js +5 -0
- package/modern/locales/daDK.js +5 -0
- package/modern/locales/deDE.js +10 -5
- package/modern/locales/elGR.js +5 -0
- package/modern/locales/esES.js +5 -0
- package/modern/locales/faIR.js +5 -0
- package/modern/locales/fiFI.js +5 -0
- package/modern/locales/frFR.js +5 -0
- package/modern/locales/heIL.js +10 -5
- package/modern/locales/huHU.js +5 -0
- package/modern/locales/itIT.js +5 -0
- package/modern/locales/jaJP.js +5 -0
- package/modern/locales/koKR.js +5 -0
- package/modern/locales/nbNO.js +115 -0
- package/modern/locales/nlNL.js +5 -0
- package/modern/locales/plPL.js +5 -0
- package/modern/locales/ptBR.js +5 -0
- package/modern/locales/ruRU.js +5 -0
- package/modern/locales/skSK.js +5 -0
- package/modern/locales/trTR.js +8 -3
- package/modern/locales/ukUA.js +5 -0
- package/modern/locales/viVN.js +5 -0
- package/modern/locales/zhCN.js +5 -0
- package/modern/models/events/gridEvents.js +4 -0
- package/modern/models/gridApiCaches.js +1 -0
- package/modern/models/index.js +4 -3
- package/modern/models/params/gridMenuParams.js +1 -0
- package/modern/models/params/index.js +2 -1
- package/modern/utils/createSelector.js +20 -2
- package/modern/utils/exportAs.js +1 -1
- package/node/DataGrid/DataGrid.js +61 -2
- package/node/DataGrid/useDataGridProps.js +2 -1
- package/node/colDef/gridActionsColDef.js +2 -1
- package/node/colDef/gridBooleanColDef.js +2 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/colDef/gridDateColDef.js +4 -2
- package/node/colDef/gridNumericColDef.js +2 -1
- package/node/colDef/gridNumericOperators.js +15 -1
- package/node/colDef/gridSingleSelectColDef.js +2 -1
- package/node/colDef/gridSingleSelectOperators.js +56 -1
- package/node/colDef/gridStringColDef.js +2 -1
- package/node/colDef/gridStringOperators.js +16 -1
- package/node/components/GridFooter.js +10 -1
- package/node/components/GridRow.js +57 -18
- package/node/components/GridRowCount.js +1 -0
- package/node/components/GridScrollArea.js +3 -5
- package/node/components/GridSelectedRowCount.js +2 -1
- package/node/components/base/GridBody.js +1 -3
- package/node/components/base/GridOverlays.js +2 -4
- package/node/components/cell/GridActionsCell.js +13 -4
- package/node/components/cell/GridCell.js +16 -11
- package/node/components/cell/GridEditBooleanCell.js +100 -5
- package/node/components/cell/GridEditDateCell.js +98 -4
- package/node/components/cell/GridEditInputCell.js +29 -5
- package/node/components/cell/GridEditSingleSelectCell.js +28 -6
- package/node/components/cell/index.js +26 -0
- package/node/components/columnHeaders/GridColumnHeaderItem.js +19 -20
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -4
- package/node/components/columnSelection/GridHeaderCheckbox.js +4 -6
- package/node/components/containers/GridFooterContainer.js +10 -1
- package/node/components/containers/GridRoot.js +24 -3
- package/node/components/containers/GridRootStyles.js +4 -2
- package/node/components/containers/GridToolbarContainer.js +11 -1
- package/node/components/menu/GridMenu.js +10 -2
- package/node/components/panel/GridColumnsPanel.js +10 -2
- package/node/components/panel/GridPanelContent.js +11 -1
- package/node/components/panel/GridPanelFooter.js +11 -1
- package/node/components/panel/GridPanelHeader.js +11 -1
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +91 -9
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
- package/node/components/panel/filterPanel/GridFilterPanel.js +26 -6
- package/node/components/toolbar/GridToolbar.js +32 -7
- package/node/components/toolbar/GridToolbarExport.js +14 -19
- package/node/components/toolbar/GridToolbarQuickFilter.js +109 -0
- package/node/components/toolbar/index.js +42 -11
- package/node/constants/defaultGridSlotsComponents.js +2 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +5 -0
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -8
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +6 -8
- package/node/hooks/core/useGridApiInitialization.js +3 -4
- package/node/hooks/core/useGridErrorHandler.js +1 -3
- package/node/hooks/core/useGridStateInitialization.js +1 -3
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -7
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +3 -5
- package/node/hooks/features/columns/useGridColumnSpanning.js +1 -3
- package/node/hooks/features/columns/useGridColumns.js +20 -24
- package/node/hooks/features/dimensions/useGridDimensions.js +8 -10
- package/node/hooks/features/editRows/useGridCellEditing.new.js +140 -32
- package/node/hooks/features/editRows/useGridCellEditing.old.js +20 -22
- package/node/hooks/features/editRows/useGridEditing.old.js +4 -6
- package/node/hooks/features/editRows/useGridRowEditing.new.js +128 -43
- package/node/hooks/features/editRows/useGridRowEditing.old.js +21 -23
- package/node/hooks/features/events/useGridEvents.js +19 -19
- package/node/hooks/features/export/serializers/csvSerializer.js +5 -5
- package/node/hooks/features/export/useGridCsvExport.js +26 -17
- package/node/hooks/features/export/useGridPrintExport.js +25 -0
- package/node/hooks/features/export/utils.js +19 -2
- package/node/hooks/features/filter/gridFilterState.js +3 -1
- package/node/hooks/features/filter/gridFilterUtils.js +93 -3
- package/node/hooks/features/filter/useGridFilter.js +25 -13
- package/node/hooks/features/focus/useGridFocus.js +29 -34
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -6
- package/node/hooks/features/pagination/useGridPage.js +3 -5
- package/node/hooks/features/pagination/useGridPageSize.js +2 -4
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +4 -8
- package/node/hooks/features/rows/gridRowsSelector.js +3 -1
- package/node/hooks/features/rows/gridRowsUtils.js +95 -1
- package/node/hooks/features/rows/useGridRows.js +132 -127
- package/node/hooks/features/rows/useGridRowsMeta.js +107 -43
- package/node/hooks/features/rows/useGridRowsPreProcessors.js +2 -0
- package/node/hooks/features/scroll/useGridScroll.js +6 -1
- package/node/hooks/features/selection/useGridSelection.js +13 -11
- package/node/hooks/features/sorting/useGridSorting.js +8 -10
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +33 -15
- package/node/hooks/utils/useGridApiEventHandler.js +22 -10
- package/node/hooks/utils/useGridNativeEventListener.js +1 -3
- package/node/hooks/utils/useGridSelector.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +39 -3
- package/node/locales/arSD.js +5 -0
- package/node/locales/bgBG.js +5 -0
- package/node/locales/csCZ.js +5 -0
- package/node/locales/daDK.js +5 -0
- package/node/locales/deDE.js +10 -5
- package/node/locales/elGR.js +5 -0
- package/node/locales/esES.js +5 -0
- package/node/locales/faIR.js +5 -0
- package/node/locales/fiFI.js +5 -0
- package/node/locales/frFR.js +5 -0
- package/node/locales/heIL.js +10 -5
- package/node/locales/huHU.js +5 -0
- package/node/locales/itIT.js +5 -0
- package/node/locales/jaJP.js +5 -0
- package/node/locales/koKR.js +5 -0
- package/node/locales/nbNO.js +125 -0
- package/node/locales/nlNL.js +5 -0
- package/node/locales/plPL.js +5 -0
- package/node/locales/ptBR.js +5 -0
- package/node/locales/ruRU.js +5 -0
- package/node/locales/skSK.js +5 -0
- package/node/locales/trTR.js +8 -3
- package/node/locales/ukUA.js +5 -0
- package/node/locales/viVN.js +5 -0
- package/node/locales/zhCN.js +5 -0
- package/node/models/events/gridEvents.js +4 -0
- package/node/models/gridApiCaches.js +5 -0
- package/node/models/index.js +0 -13
- package/node/models/params/gridMenuParams.js +5 -0
- package/node/models/params/index.js +13 -0
- package/node/utils/createSelector.js +25 -4
- package/node/utils/exportAs.js +1 -1
- package/package.json +5 -4
- package/utils/createSelector.d.ts +2 -1
- package/utils/createSelector.js +20 -2
- package/utils/exportAs.d.ts +2 -2
- package/utils/exportAs.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,321 @@
|
|
|
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
|
+
## v5.12.0
|
|
7
|
+
|
|
8
|
+
_May 31, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎁 Introduce support for [dynamic row height](https://mui.com/x/react-data-grid/rows/#dynamic-row-height) (#4859) @m4theushw
|
|
13
|
+
|
|
14
|
+
<img src="https://user-images.githubusercontent.com/42154031/171183167-718d7bcd-ec0f-459e-97fe-0f650abb4a99.gif" width="800">
|
|
15
|
+
|
|
16
|
+
- ⚠️ Remove deprecated row grouping feature from `@mui/x-data-grid-pro`
|
|
17
|
+
|
|
18
|
+
Row grouping is available through the `@mui/x-data-grid-premium` package - see [Premium plan release blogpost](https://mui.com/blog/premium-plan-release/).
|
|
19
|
+
|
|
20
|
+
- 🐞 Bug fixes and improvements
|
|
21
|
+
|
|
22
|
+
### `@mui/x-data-grid@v5.12.0` / `@mui/x-data-grid-pro@v5.12.0` / `@mui/x-data-grid-premium@v5.12.0`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Support dynamic row height (#4859) @m4theushw
|
|
25
|
+
- [DataGrid] Add `onMenuOpen` and `onMenuClose` props (#4825) @DanailH
|
|
26
|
+
- [DataGrid] Add generics to `GridActionsColDef` to match `GridColDef` (#4982) @subvertallchris
|
|
27
|
+
- [DataGrid] Disable drag event handlers when row or column reorder are disabled (#4857) @DanailH
|
|
28
|
+
- [DataGrid] Allow other attempts to stop edit mode if the first failed (#5016) @m4theushw
|
|
29
|
+
- [DataGrid] Better reflect the dependency on Material UI (#4795) @oliviertassinari
|
|
30
|
+
- [DataGrid] Add an id to the filter item created when opening the filter panel (#5014) @flaviendelangle
|
|
31
|
+
- [DataGrid] Use column visibility model on Hide All / Show All when enabled (#5050) @flaviendelangle
|
|
32
|
+
- [DataGridPro] Unpin columns back to original position (#4512) @m4theushw
|
|
33
|
+
- [DataGridPro] Remove experimental row grouping from Pro plan (#4949) @flaviendelangle
|
|
34
|
+
- [DataGridPro] Allow to scroll detail panel content if it overflows the panel (#4979) @cherniavskii
|
|
35
|
+
- [DataGridPro] Do not call `setRowIndex` when dragging a column over a row (#4987) @flaviendelangle
|
|
36
|
+
- [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
|
|
37
|
+
- [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
|
|
38
|
+
|
|
39
|
+
### `@mui/x-date-pickers@5.0.0-alpha.5` / `@mui/x-date-pickers-pro@5.0.0-alpha.5`
|
|
40
|
+
|
|
41
|
+
#### Breaking changes
|
|
42
|
+
|
|
43
|
+
- [pickers] Restructure props in `MonthPicker` / `YearPicker` and `DayPicker` (#4814) @flaviendelangle
|
|
44
|
+
|
|
45
|
+
The props of `MonthPicker` / `YearPicker` and `DayPicker` have been reworked to make them more consistent for a standalone usage (#4814) @flaviendelangle
|
|
46
|
+
|
|
47
|
+
**MonthPicker**: The prop `onMonthChange` has been removed, you can use `onChange` instead since every change is a month change
|
|
48
|
+
|
|
49
|
+
**YearPicker**: The prop `onYearPicker` has been removed, you can use `onChange` instead since every change is a year change
|
|
50
|
+
|
|
51
|
+
**DayPicker**: The prop `isDateDisabled` has been removed, you can now use the same validation props as for the other components (`maxDate`, `minDate`, `shouldDisableDate`, `disableFuture` and `disablePast`)
|
|
52
|
+
|
|
53
|
+
#### Changes
|
|
54
|
+
|
|
55
|
+
- [pickers] Add German (de-DE) translations (#4974) @felixh10r
|
|
56
|
+
- [pickers] Support action bar on static pickers and improve typing (#5015) @flaviendelangle
|
|
57
|
+
|
|
58
|
+
### Docs
|
|
59
|
+
|
|
60
|
+
- [docs] Add docs sections / pages for upcoming features on pickers (#4603) @flaviendelangle
|
|
61
|
+
- [docs] Add docs for filter panel components (#4919) @m4theushw
|
|
62
|
+
- [docs] Explain how to manage focus with `renderCell` (#4254) @alexfauquette
|
|
63
|
+
- [docs] Fix broken links to GitHub source (#5003) @Edwardveb
|
|
64
|
+
- [docs] Fix navigation links (#4956) @oliviertassinari
|
|
65
|
+
- [docs] Fix typo on rows docs (#4952) @jamesRadicl
|
|
66
|
+
- [docs] New WAI-ARIA guidelines location (#4957) @oliviertassinari
|
|
67
|
+
- [docs] Add "Slots" section to the right nav in the API pages (#4993) @DanailH
|
|
68
|
+
- [docs] Fix docs feedback widget not working (#4905) @cherniavskii
|
|
69
|
+
- [docs] Replace custom notes and warning with callouts (#5008) @flaviendelangle
|
|
70
|
+
|
|
71
|
+
### Core
|
|
72
|
+
|
|
73
|
+
- [core] Avoid Order ID to refer to GitHub issues/PRs (#5005) @oliviertassinari
|
|
74
|
+
- [core] Improve the workflow for incomplete issues (#5012) @mnajdova
|
|
75
|
+
- [core] Remove dead code on row grouping tree creation (#4945) @flaviendelangle
|
|
76
|
+
- [core] Use new cache api for the row grouping last model tracking (#4980) @flaviendelangle
|
|
77
|
+
- [core] Ensure that PRs have atleast 1 label (#5011) @DanailH
|
|
78
|
+
- [core] Fix trailing-space @oliviertassinari
|
|
79
|
+
- [core] Stop Renovate PR updates when PR is on hold (#5020) @cherniavskii
|
|
80
|
+
- [license] Remove support for UTF-8 (#4893) @oliviertassinari
|
|
81
|
+
- [license] Tweak error messages (#4907) @mbrookes
|
|
82
|
+
- [test] Skip Safari and Firefox on broken tests (#4994) @alexfauquette
|
|
83
|
+
- [test] Make argos screenshots stable (#5061) @m4theushw
|
|
84
|
+
|
|
85
|
+
## v5.11.1
|
|
86
|
+
|
|
87
|
+
_May 20, 2022_
|
|
88
|
+
|
|
89
|
+
We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
90
|
+
|
|
91
|
+
- 🌍 Support localization on the date and time picker components (#4517) @alexfauquette
|
|
92
|
+
|
|
93
|
+
Texts can be translated in the pickers components, similar to what can be done in the data grid component. Check the [documentation](https://mui.com/x/react-date-pickers/localization/) for more information.
|
|
94
|
+
|
|
95
|
+
- 📃 Add support for column spanning when exporting to Excel (#4830) @cherniavskii
|
|
96
|
+
|
|
97
|
+
<img src="https://user-images.githubusercontent.com/13808724/167691417-bf6baeb9-d409-4134-acb6-aadaf6434de9.png" width="800">
|
|
98
|
+
|
|
99
|
+
- 🐞 Bugs fixes
|
|
100
|
+
|
|
101
|
+
### `@mui/x-data-grid@v5.11.1` / `@mui/x-data-grid-pro@v5.11.1` / `@mui/x-data-grid-premium@v5.11.1`
|
|
102
|
+
|
|
103
|
+
#### Changes
|
|
104
|
+
|
|
105
|
+
- [DataGrid] Add a CSS class corresponding to current density (#4858) @m4theushw
|
|
106
|
+
- [DataGrid] Execute the pipe-processors in their initialization order (#4913) @flaviendelangle
|
|
107
|
+
- [DataGrid] Fix rendering of the no rows overlay when the `loading` prop is changed (#4910) @m4theushw
|
|
108
|
+
- [DataGridPremium] Add `exceljs` to the dependencies (#4939) @alexfauquette
|
|
109
|
+
- [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
|
|
110
|
+
- [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
|
|
111
|
+
|
|
112
|
+
### `@mui/x-date-pickers@5.0.0-alpha.4` / `@mui/x-date-pickers-pro@5.0.0-alpha.4`
|
|
113
|
+
|
|
114
|
+
#### Breaking changes
|
|
115
|
+
|
|
116
|
+
- The props related to the action bar buttons have been removed (`clearable`, `showTodayButton`, `cancelText`, `okText`)
|
|
117
|
+
|
|
118
|
+
To decide which button must be displayed and in which order, you can now use the `actions` prop of the `actionBar` component slot props.
|
|
119
|
+
|
|
120
|
+
```jsx
|
|
121
|
+
<DatePicker
|
|
122
|
+
componentsProps={{
|
|
123
|
+
actionBar: {
|
|
124
|
+
// The actions will be the same between desktop and mobile
|
|
125
|
+
actions: ['clear'],
|
|
126
|
+
|
|
127
|
+
// The actions will be different between desktop and mobile
|
|
128
|
+
actions: (variant) => (variant === 'desktop' ? [] : ['clear']),
|
|
129
|
+
},
|
|
130
|
+
}}
|
|
131
|
+
/>
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
The build-in `ActionBar` component supports 4 different actions: `'clear'`, `'cancel'`, `'accept'`, and `'today'`.
|
|
135
|
+
By default, the pickers will render the cancel and accept button on mobile and no action on desktop.
|
|
136
|
+
|
|
137
|
+
If you need other actions, you can provide your own component to the `ActionBar` component slot
|
|
138
|
+
|
|
139
|
+
```jsx
|
|
140
|
+
<DatePicker components={{ ActionBar: CustomActionBar }} />
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Changes
|
|
144
|
+
|
|
145
|
+
- [DatePicker] Fix keyboard accessibility for first and last year (#4807) @alexfauquette
|
|
146
|
+
- [pickers] Add component slot for action bar (#4778) @alexfauquette
|
|
147
|
+
- [pickers] Add l10n support (#4517) @alexfauquette
|
|
148
|
+
- [pickers] Close Popper when pressing <kbd>Esc</kbd> inside a modal (#4499) @alexfauquette
|
|
149
|
+
- [pickers] Support class slots on toolbar components (#4855) @flaviendelangle
|
|
150
|
+
- [TimePicker] Fix time validation when current date is `null` (#4867) @flaviendelangle
|
|
151
|
+
|
|
152
|
+
### Docs
|
|
153
|
+
|
|
154
|
+
- [docs] Add 301 redirect for columns page (#4940) @alexfauquette
|
|
155
|
+
- [docs] Avoid confusion with license key installation (#4891) @oliviertassinari
|
|
156
|
+
- [docs] Complete the instructions for pickers installation in readme (#4852) @alexfauquette
|
|
157
|
+
- [docs] Disable ads on paid-only pages (#4842) @flaviendelangle
|
|
158
|
+
- [docs] Don't redirect to localized doc on deploy preview (#4818) @m4theushw
|
|
159
|
+
- [docs] Limit `LICENSE` file to 80 char per line (#4873) @oliviertassinari
|
|
160
|
+
- [docs] Typo on OrderId @oliviertassinari
|
|
161
|
+
- [docs] Update feature comparison table (#4918) @cherniavskii
|
|
162
|
+
|
|
163
|
+
### Core
|
|
164
|
+
|
|
165
|
+
- [core] Add new script to generate tree data rows from file tree (#4902) @flaviendelangle
|
|
166
|
+
- [core] Fix code style (#4874) @oliviertassinari
|
|
167
|
+
- [core] Fix React 18 peer dependency (#4908) @oliviertassinari
|
|
168
|
+
- [core] Fix link to the LICENSE file (#4875) @oliviertassinari
|
|
169
|
+
- [core] Fix transitive babel dependency (#4793) @oliviertassinari
|
|
170
|
+
- [core] New pipe processing `rowHydration` (#4896) @flaviendelangle
|
|
171
|
+
- [core] Remove dead code for the docs (#4791) @oliviertassinari
|
|
172
|
+
- [core] Run `yarn prettier` @oliviertassinari
|
|
173
|
+
- [core] Polishes on `CHANGELOG.md` (#4876) @oliviertassinari
|
|
174
|
+
- [core] Simplify rows cache management (#4933) @flaviendelangle
|
|
175
|
+
- [core] Use internal icons for quick filter (#4912) @alexfauquette
|
|
176
|
+
|
|
177
|
+
## v5.11.0
|
|
178
|
+
|
|
179
|
+
_May 13, 2022_
|
|
180
|
+
|
|
181
|
+
We'd like to offer a big thanks to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
182
|
+
|
|
183
|
+
- 🚀 **Premium plan release**. We're happy to announce that the Premium plan is [finally out](https://mui.com/blog/premium-plan-release/)! With it, MUI X officially steps up to the next level, supporting the most advanced use cases for UI components.
|
|
184
|
+
|
|
185
|
+
This plan is available through the new `@mui/x-data-grid-premium` package, which contains the row grouping and the Excel export features.
|
|
186
|
+
|
|
187
|
+
If you were already using the row grouping feature, you can upgrade by [installing](https://mui.com/x/react-data-grid/getting-started/#installation) `@mui/x-data-grid-premium` and replace `DataGridPro` with `DataGridPremium`, as follows. Note that the experimental flag is not required anymore to use the row grouping.
|
|
188
|
+
|
|
189
|
+
```diff
|
|
190
|
+
-import { DataGridPro } from '@mui/x-data-grid-pro';
|
|
191
|
+
+import { DataGridPremium } from '@mui/x-data-grid-premium';
|
|
192
|
+
|
|
193
|
+
-<DataGridPro experimentalFeatures={{ rowGrouping: true }} />
|
|
194
|
+
+<DataGridPremium />
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
For more information about the revised pricing model please have a look at the [blog post](https://mui.com/blog/premium-plan-release/#the-new-licensing-model).
|
|
198
|
+
|
|
199
|
+
- 👔 **Excel export**. You can find this new Premium feature at: https://mui.com/x/react-data-grid/export/#excel-export.
|
|
200
|
+
|
|
201
|
+
- 🔎 **Quick filtering**. You can now add a quick filtering search bar to your grid. To do so, either pass `showQuickFilter` prop to the `<GridToolbar />` or use the `<GridToolbarQuickFilter />` component in your custom toolbar. More information about how to customize the filtering logic is in the [documentation](https://mui.com/x/react-data-grid/filtering/#quick-filter).
|
|
202
|
+
|
|
203
|
+
<img src="https://user-images.githubusercontent.com/13808724/167700105-5a5acc7c-5463-4871-8514-3d09e2f365ae.png" width="724">
|
|
204
|
+
|
|
205
|
+
- 🐞 Bugs fixes
|
|
206
|
+
|
|
207
|
+
### `@mui/x-data-grid@v5.11.0` / `@mui/x-data-grid-pro@v5.11.0` / `@mui/x-data-grid-premium@v5.11.0`
|
|
208
|
+
|
|
209
|
+
#### Breaking changes
|
|
210
|
+
|
|
211
|
+
- Move row grouping to the premium package (#4223) @flaviendelangle
|
|
212
|
+
|
|
213
|
+
The use of `rowGrouping` in the `@mui/x-data-grid-pro` package is deprecated. The experimental flag will be removed in an upcoming release.
|
|
214
|
+
|
|
215
|
+
#### Changes
|
|
216
|
+
|
|
217
|
+
- [DataGrid] Add TypeScript support to the `sx` prop in inner components (#4743) @lindapaiste
|
|
218
|
+
- [DataGrid] Add props to control cell mode (#4210) @m4theushw
|
|
219
|
+
- [DataGrid] Add quick filtering engine (#4317) @alexfauquette
|
|
220
|
+
- [DataGrid] Check focus validity whenever the rows in state changes (#4683) @flaviendelangle
|
|
221
|
+
- [DataGrid] Fix infinite scroll when dragging column header cell over row cell (#4735) @DjoSmer
|
|
222
|
+
- [DataGrid] Fix scroll jump when using keyboard navigation (#4515) @cherniavskii
|
|
223
|
+
- [DataGrid] Improve sorting accessibility (#4379) @cherniavskii
|
|
224
|
+
- [DataGrid] New `getRowGroupChildren` API method (#4304) @flaviendelangle
|
|
225
|
+
- [DataGrid] Publish `preferencePanelClose` event only once when clicking on another panel button (#4810) @flaviendelangle
|
|
226
|
+
- [DataGrid] Update focused action if the currently focused one is removed (#4694) @m4theushw
|
|
227
|
+
- [DataGrid] Add `onChange` callback to edit components (#4621) @m4theushw
|
|
228
|
+
- [DataGrid] Add `keepNonExistentRowsSelected` prop (#4786) @willsoto
|
|
229
|
+
- [DataGrid] Prevent crash if row is removed with click (#4831) @m4theushw
|
|
230
|
+
- [DataGridPro] Fix detail panel not taking full width (#4610) @cherniavskii
|
|
231
|
+
- [DataGridPremium] Add Excel export (#3981) @alexfauquette
|
|
232
|
+
- [DataGridPremium] Bootstrap `@mui/x-data-grid-premium` (#4223) @flaviendelangle
|
|
233
|
+
- [DataGridPremium] Fix Excel date serialization when row grouping is enabled (#4774) @cherniavskii
|
|
234
|
+
- [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
|
|
235
|
+
- [l10n] Improve German (de-DE) locale (#4668) @izu-co
|
|
236
|
+
|
|
237
|
+
### `@mui/x-date-pickers@5.0.0-alpha.3` / `@mui/x-date-pickers-pro@5.0.0-alpha.3`
|
|
238
|
+
|
|
239
|
+
#### Breaking changes
|
|
240
|
+
|
|
241
|
+
- Rework the auto-closing behavior of the pickers (#4408) @flaviendelangle
|
|
242
|
+
|
|
243
|
+
The `disableCloseOnSelect` prop has been replaced by a new `closeOnSelect` prop which has the opposite behavior.
|
|
244
|
+
The default behavior remains the same (close after the last step on desktop but not on mobile).
|
|
245
|
+
|
|
246
|
+
```diff
|
|
247
|
+
// If you don't want to close after the last step
|
|
248
|
+
-<DatePicker disableCloseOnSelect={false} />
|
|
249
|
+
+<DatePicker closeOnSelect />
|
|
250
|
+
|
|
251
|
+
// If you want to close after the last step
|
|
252
|
+
-<DatePicker disableCloseOnSelect />
|
|
253
|
+
+<DatePicker closeOnSelect={false} />
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
#### Changes
|
|
257
|
+
|
|
258
|
+
- [DatePicker] Ignore <kbd>Escape</kbd> when the picker is already closed (#4770) @mikewolfd
|
|
259
|
+
- [DatePicker] Make month year order changeable in header (#4695) @gky360
|
|
260
|
+
- [DateRangePicker] Open view on click, <kbd>Enter</kbd> or <kbd>Space</kbd> instead of focus (#4747) @alexfauquette
|
|
261
|
+
- [DateRangePicker] Refactor tests (#4745) @flaviendelangle
|
|
262
|
+
- [DateRangePicker] Remove `orientation` prop (#4665) @m4theushw
|
|
263
|
+
- [DateTimePicker] `Toolbar` should be visible by default on mobile (#4833) @flaviendelangle
|
|
264
|
+
- [MonthPicker] New prop `shouldDisableMonth` (#4708) @someone635
|
|
265
|
+
- [TimePicker] Disable and invalidate date with minutes not matching `minutesStep` (#4726) @flaviendelangle
|
|
266
|
+
- [TimePicker] Don't merge with previous value when new value is not valid (#4847) @flaviendelangle
|
|
267
|
+
- [TimePicker] Refactor `isTimeDisabled` method (#4688) @flaviendelangle
|
|
268
|
+
- [pickers] Add details in invalid mask error (#4501) @alexfauquette
|
|
269
|
+
- [pickers] Add explicit interfaces for components slots and components slots props (#4589) @flaviendelangle
|
|
270
|
+
- [pickers] Add missing `peerDependencies` for `yarn pnp` users (#4763) @nate-summercook
|
|
271
|
+
- [pickers] Add overrides to `PickersArrowSwitcher` (#4672) @m4theushw
|
|
272
|
+
- [pickers] Clean component interfaces and remove non-implemented props (#4758) @flaviendelangle
|
|
273
|
+
- [pickers] Do not apply the current time when no date provided in `DayPicker` (#4649) @flaviendelangle
|
|
274
|
+
- [pickers] Document and refacto the value manager (#4701) @flaviendelangle
|
|
275
|
+
- [pickers] Drop `allowSameDateSelection` prop (#4808) @flaviendelangle
|
|
276
|
+
- [pickers] Enable mask by default when using `ampm=true` (#4731) @alexfauquette
|
|
277
|
+
- [pickers] Fix `disabled` and `readOnly` behavior on calendar and clock (#4645) @alexfauquette
|
|
278
|
+
- [pickers] Invalid character does not delete last digit (#4839) @alexfauquette
|
|
279
|
+
- [pickers] Rename prop `date` into `parsedValue` when it can contain a range (#4736) @flaviendelangle
|
|
280
|
+
- [pickers] Rework `TDate`, `TInputDate`, `TValue` and `TInputValue` generics (#4617) @flaviendelangle
|
|
281
|
+
- [pickers] Rework the date lifecycle in `usePickerState` (#4408) @flaviendelangle
|
|
282
|
+
|
|
283
|
+
### Docs
|
|
284
|
+
|
|
285
|
+
- [docs] Add `scopePathNames` property to column page (#4811) @flaviendelangle
|
|
286
|
+
- [docs] Add label to each demo (#4667) @m4theushw
|
|
287
|
+
- [docs] Correctly capitalize <kbd>Ctrl</kbd> (#4707) @oliviertassinari
|
|
288
|
+
- [docs] Fix documentation on `ampm` prop (#4846) @alexfauquette
|
|
289
|
+
- [docs] Generate the event documentation from `GridEventLookup` (#4725) @flaviendelangle
|
|
290
|
+
- [docs] Keep columns section expanded when switching between pages (#4816) @cherniavskii
|
|
291
|
+
- [docs] Move `useKeepGroupingColumnsHidden` on `@mui/x-data-grid-premium` (#4319) @flaviendelangle
|
|
292
|
+
- [docs] Remove legacy pages for old URLs (#4575) @m4theushw
|
|
293
|
+
- [docs] Remove remaining pages in `docs/pages/api-docs` folder (#4709) @m4theushw
|
|
294
|
+
- [docs] SEO fixes (#4711) @oliviertassinari
|
|
295
|
+
- [docs] Set type number to movie column year (#4753) @flaviendelangle
|
|
296
|
+
- [docs] Simplify server examples (#4186) @alexfauquette
|
|
297
|
+
- [docs] Small typo (#4670) @flaviendelangle
|
|
298
|
+
- [docs] Split the 'Columns' page (#4600) @flaviendelangle
|
|
299
|
+
- [docs] Stop using `GridEvents` enum in documentation (#4699) @flaviendelangle
|
|
300
|
+
- [docs] Update mono repo to get copy code block (#4691) @siriwatknp
|
|
301
|
+
- [docs] Update the feature table in the Getting Started page of the data grid (#4619) @flaviendelangle
|
|
302
|
+
- [docs] Add demo for Premium (#4750) @m4theushw
|
|
303
|
+
|
|
304
|
+
### Core
|
|
305
|
+
|
|
306
|
+
- [core] Check if `process` is available (#4193) @m4theushw
|
|
307
|
+
- [core] Fix naming collision (#4853) @alexfauquette
|
|
308
|
+
- [core] Prevent out-of-memory when type-checking in CI (#4697) @flaviendelangle
|
|
309
|
+
- [core] Remove `rowsCache` from state (#4480) @m4theushw
|
|
310
|
+
- [core] Rework `DayPicker` api (#4783) @flaviendelangle
|
|
311
|
+
- [core] Update `x-license-pro` license to handle premium package (#4315) @DanailH
|
|
312
|
+
- [core] Update monorepo & version (#4789) @oliviertassinari
|
|
313
|
+
- [core] Update monorepo (#4772) @flaviendelangle
|
|
314
|
+
- [core] Stop using `GridEvents` enum (#4698, #4696, #4685) @flaviendelangle
|
|
315
|
+
- [core] Update monorepo (#4854) @cherniavskii
|
|
316
|
+
- [license] Allow to limit some packages to a specific license plan (#4651) @flaviendelangle
|
|
317
|
+
- [test] Fix path to detect `DataGrid` tests (#4752) @m4theushw
|
|
318
|
+
- [test] Reset cleanup tracking on Karma tests (#4679) @m4theushw
|
|
319
|
+
- [test] Restore `sinon` sandbox after each `karma` test (#4689) @m4theushw
|
|
320
|
+
|
|
6
321
|
## v5.10.0
|
|
7
322
|
|
|
8
323
|
_Apr 25, 2022_
|
|
@@ -49,7 +364,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
|
|
|
49
364
|
|
|
50
365
|
Now the data grid and pickers components support the concurrent mode.
|
|
51
366
|
|
|
52
|
-
- 🎁 Add support for [Column spanning](https://mui.com/x/react-data-grid/
|
|
367
|
+
- 🎁 Add support for [Column spanning](https://mui.com/x/react-data-grid/column-spanning/) (#4020) @cherniavskii
|
|
53
368
|
|
|
54
369
|
<img src="https://user-images.githubusercontent.com/13808724/162926746-93bcb180-3c9d-4eb9-afc7-c3908a5c6406.png" width="788">
|
|
55
370
|
|
|
@@ -672,7 +987,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some
|
|
|
672
987
|
/>
|
|
673
988
|
```
|
|
674
989
|
|
|
675
|
-
See the [documentation](https://mui.com/x/react-data-grid/
|
|
990
|
+
See the [documentation](https://mui.com/x/react-data-grid/column-visibility/) for more details.
|
|
676
991
|
|
|
677
992
|
The `hide` property from `GridColDef` still works but has been deprecated.
|
|
678
993
|
|
|
@@ -828,7 +1143,7 @@ A big thanks to the 5 contributors who made this release possible. Here are some
|
|
|
828
1143
|
|
|
829
1144
|
### `@mui/x-data-grid@v5.2.0` / `@mui/x-data-grid-pro@v5.2.0`
|
|
830
1145
|
|
|
831
|
-
- 🚀 Introduce the [column pinning](https://mui.com/x/react-data-grid/
|
|
1146
|
+
- 🚀 Introduce the [column pinning](https://mui.com/x/react-data-grid/column-pinning/) feature (#2946) @m4theushw
|
|
832
1147
|
|
|
833
1148
|
<img src="https://user-images.githubusercontent.com/42154031/145425635-b6314fbe-2f1e-4b73-908f-33ee1fda20c7.gif" width="964" height="657">
|
|
834
1149
|
|
|
@@ -1782,7 +2097,7 @@ A big thanks to the 9 contributors who made this release possible. Here are some
|
|
|
1782
2097
|
- 📚 Migrate to the new documentation infrastructure and design (#2441) (@DanailH, @m4theushw)
|
|
1783
2098
|
- 🎁 Add `actions` column type (#2385) @m4theushw
|
|
1784
2099
|
|
|
1785
|
-
See the documentation for [more details](https://mui.com/x/react-data-grid/
|
|
2100
|
+
See the documentation for [more details](https://mui.com/x/react-data-grid/column-definition/#column-types).
|
|
1786
2101
|
|
|
1787
2102
|
- 👁 Allow to disable virtualization with the `disableVirtualization` prop (#2326) @m4theushw
|
|
1788
2103
|
- 🚀 Introduce the new `isRowSelected` api method (#2523) @flaviendelangle
|
|
@@ -2404,11 +2719,11 @@ _July 1, 2021_
|
|
|
2404
2719
|
Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
2405
2720
|
|
|
2406
2721
|
- 🐞 As a focus of Q2, we have kept fixing bugs
|
|
2407
|
-
- 💅 End users are now allowed to copy the selected rows to the clipboard with <kbd>
|
|
2722
|
+
- 💅 End users are now allowed to copy the selected rows to the clipboard with <kbd>Ctrl</kbd> + <kbd>c</kbd> (#1929) @m4theushw
|
|
2408
2723
|
- 🐛 We have fixed the `Select all` checkbox. When triggered, it should only select the filtered rows (#1879) @ZeeshanTamboli
|
|
2409
2724
|
- ⚡️ We have added a new `singleSelect` column type (#1956) @DanailH
|
|
2410
2725
|
|
|
2411
|
-
Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://mui.com/x/react-data-grid/
|
|
2726
|
+
Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://mui.com/x/react-data-grid/column-definition/#column-types).
|
|
2412
2727
|
|
|
2413
2728
|
```jsx
|
|
2414
2729
|
<DataGrid
|
|
@@ -2604,7 +2919,7 @@ _June 9, 2021_
|
|
|
2604
2919
|
Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
2605
2920
|
|
|
2606
2921
|
- 💅 Allow to customize GridToolbarExport's CSV export (#1695) @michallukowski
|
|
2607
|
-
- 🐛 Allow to deselect rows with <kbd>
|
|
2922
|
+
- 🐛 Allow to deselect rows with <kbd>Ctrl</kbd> + click (#1813) @ZeeshanTamboli
|
|
2608
2923
|
- ⚡️ Refactor scroll size detector (#1703) @dtassone
|
|
2609
2924
|
- 📖 Add [documentation](https://mui.com/x/api/data-grid/) for interfaces and events (#1529) @m4theushw
|
|
2610
2925
|
- 🐞 Bugfixes
|
|
@@ -2631,7 +2946,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h
|
|
|
2631
2946
|
|
|
2632
2947
|
- [DataGrid] Add `valueParser` to parse values entered by the user (#1785) @m4theushw
|
|
2633
2948
|
- [DataGrid] Allow to customize GridToolbarExport's CSV export (#1695) @michallukowski
|
|
2634
|
-
- [DataGrid] Allow to deselect rows with <kbd>
|
|
2949
|
+
- [DataGrid] Allow to deselect rows with <kbd>Ctrl</kbd> + click (#1813) @ZeeshanTamboli
|
|
2635
2950
|
- [DataGrid] Improve general architecture to better isolate hooks (#1720) @dtassone
|
|
2636
2951
|
- [DataGrid] Fix cell height after changing grid density (#1819) @DanailH
|
|
2637
2952
|
- [DataGrid] Fix fluid columns width when available `viewportWidth` < 0 (#1816) @DanailH
|
|
@@ -3153,7 +3468,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
|
|
|
3153
3468
|
- [DataGrid] Rename `useGridBaseComponentProps` hook to `useGridSlotComponentProps` (#1252) @DanailH
|
|
3154
3469
|
- [DataGrid] Rename modules (#1292) @DanailH
|
|
3155
3470
|
- [DataGrid] Rename all events related to column reordering, e.g. `GRID_COL_REORDER_START` -> `GRID_COLUMN_REORDER_START` (#1299) @m4theushw
|
|
3156
|
-
- [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/x/react-data-grid/
|
|
3471
|
+
- [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/x/react-data-grid/column-ordering/) (#1299) @m4theushw
|
|
3157
3472
|
- [DataGrid] Calling `apiRef.current.getColumnHeaderParams` returns a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
|
|
3158
3473
|
- [DataGrid] Events that follow the pattern `GRID_COLUMN_HEADER_xxx` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
|
|
3159
3474
|
- [DataGrid] The `renderHeader` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
|
|
@@ -3521,7 +3836,7 @@ _Jan 14, 2021_
|
|
|
3521
3836
|
Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
3522
3837
|
|
|
3523
3838
|
- 🎛 Add support for Column selector (#837) @DanailH @dtassone.
|
|
3524
|
-
The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://mui.com/x/react-data-grid/
|
|
3839
|
+
The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://mui.com/x/react-data-grid/column-definition/#column-selector).
|
|
3525
3840
|
|
|
3526
3841
|

|
|
3527
3842
|
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -58,6 +58,11 @@ DataGridRaw.propTypes = {
|
|
|
58
58
|
*/
|
|
59
59
|
autoPageSize: PropTypes.bool,
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Controls the modes of the cells.
|
|
63
|
+
*/
|
|
64
|
+
cellModesModel: PropTypes.object,
|
|
65
|
+
|
|
61
66
|
/**
|
|
62
67
|
* If `true`, the grid get a first column with a checkbox that allows to select rows.
|
|
63
68
|
* @default false
|
|
@@ -205,7 +210,9 @@ DataGridRaw.propTypes = {
|
|
|
205
210
|
operatorValue: PropTypes.string,
|
|
206
211
|
value: PropTypes.any
|
|
207
212
|
})).isRequired,
|
|
208
|
-
linkOperator: PropTypes.oneOf(['and', 'or'])
|
|
213
|
+
linkOperator: PropTypes.oneOf(['and', 'or']),
|
|
214
|
+
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
215
|
+
quickFilterValues: PropTypes.array
|
|
209
216
|
}),
|
|
210
217
|
|
|
211
218
|
/**
|
|
@@ -222,6 +229,15 @@ DataGridRaw.propTypes = {
|
|
|
222
229
|
*/
|
|
223
230
|
getDetailPanelContent: PropTypes.func,
|
|
224
231
|
|
|
232
|
+
/**
|
|
233
|
+
* Function that returns the estimated height for a row.
|
|
234
|
+
* Only works if dynamic row height is used.
|
|
235
|
+
* Once the row height is measured this value is discarded.
|
|
236
|
+
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
|
237
|
+
* @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.
|
|
238
|
+
*/
|
|
239
|
+
getEstimatedRowHeight: PropTypes.func,
|
|
240
|
+
|
|
225
241
|
/**
|
|
226
242
|
* Function that applies CSS classes dynamically on rows.
|
|
227
243
|
* @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
|
|
@@ -232,7 +248,7 @@ DataGridRaw.propTypes = {
|
|
|
232
248
|
/**
|
|
233
249
|
* Function that sets the row height per row.
|
|
234
250
|
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
|
235
|
-
* @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied.
|
|
251
|
+
* @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied. If "auto" then the row height is calculated based on the content.
|
|
236
252
|
*/
|
|
237
253
|
getRowHeight: PropTypes.func,
|
|
238
254
|
|
|
@@ -293,6 +309,14 @@ DataGridRaw.propTypes = {
|
|
|
293
309
|
*/
|
|
294
310
|
isRowSelectable: PropTypes.func,
|
|
295
311
|
|
|
312
|
+
/**
|
|
313
|
+
* If `true`, the selection model will retain selected rows that do not exist.
|
|
314
|
+
* Useful when using server side pagination and row selections need to be retained
|
|
315
|
+
* when changing pages.
|
|
316
|
+
* @default false
|
|
317
|
+
*/
|
|
318
|
+
keepNonExistentRowsSelected: PropTypes.bool,
|
|
319
|
+
|
|
296
320
|
/**
|
|
297
321
|
* If `true`, a loading overlay is displayed.
|
|
298
322
|
*/
|
|
@@ -380,6 +404,13 @@ DataGridRaw.propTypes = {
|
|
|
380
404
|
*/
|
|
381
405
|
onCellKeyDown: PropTypes.func,
|
|
382
406
|
|
|
407
|
+
/**
|
|
408
|
+
* Callback fired when the `cellModesModel` prop changes.
|
|
409
|
+
* @param {GridCellModesModel} cellModesModel Object containig which cells are in "edit" mode.
|
|
410
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
411
|
+
*/
|
|
412
|
+
onCellModesModelChange: PropTypes.func,
|
|
413
|
+
|
|
383
414
|
/**
|
|
384
415
|
* Callback fired when a click event comes from a column header element.
|
|
385
416
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
@@ -484,6 +515,22 @@ DataGridRaw.propTypes = {
|
|
|
484
515
|
*/
|
|
485
516
|
onFilterModelChange: PropTypes.func,
|
|
486
517
|
|
|
518
|
+
/**
|
|
519
|
+
* Callback fired when the menu is closed.
|
|
520
|
+
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
521
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
522
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
523
|
+
*/
|
|
524
|
+
onMenuClose: PropTypes.func,
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Callback fired when the menu is opened.
|
|
528
|
+
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
529
|
+
* @param {MuiEvent<{}>} event The event object.
|
|
530
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
531
|
+
*/
|
|
532
|
+
onMenuOpen: PropTypes.func,
|
|
533
|
+
|
|
487
534
|
/**
|
|
488
535
|
* Callback fired when the current page has changed.
|
|
489
536
|
* @param {number} page Index of the page displayed on the Grid.
|
|
@@ -566,6 +613,13 @@ DataGridRaw.propTypes = {
|
|
|
566
613
|
*/
|
|
567
614
|
onRowEditStop: PropTypes.func,
|
|
568
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Callback fired when the `rowModesModel` prop changes.
|
|
618
|
+
* @param {GridRowModesModel} rowModesModel Object containig which rows are in "edit" mode.
|
|
619
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
620
|
+
*/
|
|
621
|
+
onRowModesModelChange: PropTypes.func,
|
|
622
|
+
|
|
569
623
|
/**
|
|
570
624
|
* Callback fired when the selection state of one or multiple rows changes.
|
|
571
625
|
* @param {GridSelectionModel} selectionModel With all the row ids [[GridSelectionModel]].
|
|
@@ -651,6 +705,11 @@ DataGridRaw.propTypes = {
|
|
|
651
705
|
*/
|
|
652
706
|
rowHeight: PropTypes.number,
|
|
653
707
|
|
|
708
|
+
/**
|
|
709
|
+
* Controls the modes of the rows.
|
|
710
|
+
*/
|
|
711
|
+
rowModesModel: PropTypes.object,
|
|
712
|
+
|
|
654
713
|
/**
|
|
655
714
|
* Set of rows of type [[GridRowsProp]].
|
|
656
715
|
*/
|
|
@@ -61,7 +61,8 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
61
61
|
sortingMode: GridFeatureModeConstant.client,
|
|
62
62
|
throttleRowsMs: 0,
|
|
63
63
|
disableColumnReorder: false,
|
|
64
|
-
disableColumnResize: false
|
|
64
|
+
disableColumnResize: false,
|
|
65
|
+
keepNonExistentRowsSelected: false
|
|
65
66
|
};
|
|
66
67
|
export const useDataGridProps = inProps => {
|
|
67
68
|
if (inProps.pageSize > MAX_PAGE_SIZE) {
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mui/x-data-grid
|
|
2
2
|
|
|
3
|
-
This package is the
|
|
3
|
+
This package is the Community Plan edition of the data grid component.
|
|
4
4
|
It's part of MUI X, an open core extension of MUI, with advanced components.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
@@ -19,10 +19,9 @@ This component has the following peer dependencies that you will need to install
|
|
|
19
19
|
|
|
20
20
|
```json
|
|
21
21
|
"peerDependencies": {
|
|
22
|
-
"@mui/material": "^5.
|
|
23
|
-
"@mui/system": "^5.
|
|
24
|
-
"react": "^17.0.2 || ^18.0.0"
|
|
25
|
-
"react-dom": "^17.0.2 || ^18.0.0"
|
|
22
|
+
"@mui/material": "^5.4.1",
|
|
23
|
+
"@mui/system": "^5.4.1",
|
|
24
|
+
"react": "^17.0.2 || ^18.0.0"
|
|
26
25
|
},
|
|
27
26
|
```
|
|
28
27
|
|
|
@@ -20,5 +20,6 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
20
20
|
renderEditCell: renderEditBooleanCell,
|
|
21
21
|
sortComparator: gridNumberComparator,
|
|
22
22
|
valueFormatter: gridBooleanFormatter,
|
|
23
|
-
filterOperators: getGridBooleanOperators()
|
|
23
|
+
filterOperators: getGridBooleanOperators(),
|
|
24
|
+
getApplyQuickFilterFn: undefined
|
|
24
25
|
});
|
|
@@ -15,6 +15,7 @@ export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF
|
|
|
15
15
|
disableColumnMenu: true,
|
|
16
16
|
disableReorder: true,
|
|
17
17
|
disableExport: true,
|
|
18
|
+
getApplyQuickFilterFn: undefined,
|
|
18
19
|
valueGetter: params => {
|
|
19
20
|
const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
|
|
20
21
|
return selectionLookup[params.id] !== undefined;
|
package/colDef/gridDateColDef.js
CHANGED
|
@@ -26,12 +26,14 @@ export const GRID_DATE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
26
26
|
sortComparator: gridDateComparator,
|
|
27
27
|
valueFormatter: gridDateFormatter,
|
|
28
28
|
filterOperators: getGridDateOperators(),
|
|
29
|
-
renderEditCell: renderEditDateCell
|
|
29
|
+
renderEditCell: renderEditDateCell,
|
|
30
|
+
getApplyQuickFilterFn: undefined
|
|
30
31
|
});
|
|
31
32
|
export const GRID_DATETIME_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
32
33
|
type: 'dateTime',
|
|
33
34
|
sortComparator: gridDateComparator,
|
|
34
35
|
valueFormatter: gridDateTimeFormatter,
|
|
35
36
|
filterOperators: getGridDateOperators(true),
|
|
36
|
-
renderEditCell: renderEditDateCell
|
|
37
|
+
renderEditCell: renderEditDateCell,
|
|
38
|
+
getApplyQuickFilterFn: undefined
|
|
37
39
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { gridNumberComparator } from '../hooks/features/sorting/gridSortingUtils';
|
|
3
3
|
import { isNumber } from '../utils/utils';
|
|
4
|
-
import { getGridNumericOperators } from './gridNumericOperators';
|
|
4
|
+
import { getGridNumericOperators, getGridNumericQuickFilterFn } from './gridNumericOperators';
|
|
5
5
|
import { GRID_STRING_COL_DEF } from './gridStringColDef';
|
|
6
6
|
export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
7
7
|
type: 'number',
|
|
@@ -12,5 +12,6 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
12
12
|
valueFormatter: ({
|
|
13
13
|
value
|
|
14
14
|
}) => value && isNumber(value) && value.toLocaleString() || value,
|
|
15
|
-
filterOperators: getGridNumericOperators()
|
|
15
|
+
filterOperators: getGridNumericOperators(),
|
|
16
|
+
getApplyQuickFilterFn: getGridNumericQuickFilterFn
|
|
16
17
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { GridFilterOperator } from '../models/gridFilterOperator';
|
|
2
|
+
import { GridCellParams } from '../models';
|
|
3
|
+
export declare const getGridNumericQuickFilterFn: (value: any) => (({ value: columnValue }: GridCellParams) => boolean) | null;
|
|
2
4
|
export declare const getGridNumericOperators: () => GridFilterOperator<any, number | string | null, any>[];
|
|
3
5
|
/**
|
|
4
6
|
* @deprecated Use `getGridNumericOperators` instead.
|
|
@@ -10,6 +10,17 @@ const parseNumericValue = value => {
|
|
|
10
10
|
return Number(value);
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
export const getGridNumericQuickFilterFn = value => {
|
|
14
|
+
if (value == null || Number.isNaN(value) || value === '') {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return ({
|
|
19
|
+
value: columnValue
|
|
20
|
+
}) => {
|
|
21
|
+
return parseNumericValue(columnValue) === parseNumericValue(value);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
13
24
|
export const getGridNumericOperators = () => [{
|
|
14
25
|
label: '=',
|
|
15
26
|
value: '=',
|