@mui/x-data-grid 5.9.0 → 5.11.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 +284 -10
- package/DataGrid/DataGrid.js +35 -1
- package/DataGrid/useDataGridProps.js +2 -1
- package/README.md +5 -4
- 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.js +9 -5
- 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/GridCell.js +8 -8
- 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 +15 -16
- 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 +36 -1
- package/components/containers/GridToolbarContainer.d.ts +8 -2
- package/components/containers/GridToolbarContainer.js +12 -2
- package/components/menu/GridMenu.js +1 -0
- 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/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 +4 -2
- package/constants/gridClasses.d.ts +32 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +8 -1
- 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 -3
- package/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +8 -9
- 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 +133 -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 +122 -42
- package/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/hooks/features/events/useGridEvents.js +17 -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 +8 -0
- package/hooks/features/filter/gridFilterUtils.js +84 -2
- package/hooks/features/filter/useGridFilter.js +20 -8
- 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 +148 -128
- 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 +2 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +14 -5
- 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 +4 -1
- package/internals/index.js +5 -2
- package/legacy/DataGrid/DataGrid.js +35 -1
- 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 +9 -5
- 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 +8 -8
- 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 +15 -16
- 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 +26 -5
- package/legacy/components/containers/GridToolbarContainer.js +12 -2
- package/legacy/components/menu/GridMenu.js +1 -0
- 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/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 +4 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/localeTextConstants.js +8 -1
- 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 -3
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/legacy/hooks/features/columns/useGridColumns.js +8 -9
- package/legacy/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +213 -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 +126 -42
- package/legacy/hooks/features/editRows/useGridRowEditing.old.js +20 -21
- package/legacy/hooks/features/events/useGridEvents.js +17 -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 +96 -2
- package/legacy/hooks/features/filter/useGridFilter.js +20 -8
- 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 +164 -131
- 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 +14 -5
- 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 +8 -1
- package/legacy/locales/bgBG.js +8 -1
- package/legacy/locales/csCZ.js +7 -0
- package/legacy/locales/daDK.js +8 -1
- package/legacy/locales/deDE.js +10 -3
- package/legacy/locales/elGR.js +7 -0
- package/legacy/locales/esES.js +7 -0
- package/legacy/locales/faIR.js +8 -1
- package/legacy/locales/fiFI.js +7 -0
- package/legacy/locales/frFR.js +7 -0
- package/legacy/locales/heIL.js +8 -1
- package/legacy/locales/huHU.js +8 -1
- package/legacy/locales/itIT.js +7 -0
- package/legacy/locales/jaJP.js +7 -0
- package/legacy/locales/koKR.js +7 -0
- package/legacy/locales/nlNL.js +7 -0
- package/legacy/locales/plPL.js +8 -1
- package/legacy/locales/ptBR.js +8 -1
- package/legacy/locales/ruRU.js +7 -0
- package/legacy/locales/skSK.js +7 -0
- package/legacy/locales/trTR.js +8 -1
- package/legacy/locales/ukUA.js +7 -0
- package/legacy/locales/viVN.js +7 -0
- package/legacy/locales/zhCN.js +7 -0
- package/legacy/models/events/gridEvents.js +8 -0
- package/legacy/models/index.js +4 -3
- package/legacy/utils/createSelector.js +18 -2
- package/legacy/utils/exportAs.js +1 -1
- package/locales/arSD.js +8 -1
- package/locales/bgBG.js +8 -1
- package/locales/csCZ.js +7 -0
- package/locales/daDK.js +8 -1
- package/locales/deDE.js +10 -3
- package/locales/elGR.js +7 -0
- package/locales/esES.js +7 -0
- package/locales/faIR.js +8 -1
- package/locales/fiFI.js +7 -0
- package/locales/frFR.js +7 -0
- package/locales/heIL.js +8 -1
- package/locales/huHU.js +8 -1
- package/locales/itIT.js +7 -0
- package/locales/jaJP.js +7 -0
- package/locales/koKR.js +7 -0
- package/locales/nlNL.js +7 -0
- package/locales/plPL.js +8 -1
- package/locales/ptBR.js +8 -1
- package/locales/ruRU.js +7 -0
- package/locales/skSK.js +7 -0
- package/locales/trTR.js +8 -1
- package/locales/ukUA.js +7 -0
- package/locales/viVN.js +7 -0
- package/locales/zhCN.js +7 -0
- package/models/api/gridCoreApi.d.ts +10 -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 +5 -0
- package/models/api/gridRowApi.d.ts +34 -0
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.ts +13 -0
- package/models/events/gridEventLookup.d.ts +293 -3
- package/models/events/gridEvents.d.ts +8 -251
- package/models/events/gridEvents.js +8 -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 +10 -0
- package/models/gridStateCommunity.d.ts +0 -2
- package/models/index.d.ts +1 -1
- package/models/index.js +4 -3
- package/models/props/DataGridProps.d.ts +56 -28
- package/modern/DataGrid/DataGrid.js +35 -1
- 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 +9 -5
- 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 +8 -8
- 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 +15 -16
- 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 +36 -1
- package/modern/components/containers/GridToolbarContainer.js +12 -2
- package/modern/components/menu/GridMenu.js +1 -0
- 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/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 +4 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +8 -1
- 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 -3
- package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -2
- package/modern/hooks/features/columns/useGridColumns.js +8 -9
- package/modern/hooks/features/dimensions/useGridDimensions.js +8 -9
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +131 -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 +120 -42
- package/modern/hooks/features/editRows/useGridRowEditing.old.js +21 -22
- package/modern/hooks/features/events/useGridEvents.js +17 -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 +80 -2
- package/modern/hooks/features/filter/useGridFilter.js +20 -8
- 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 +148 -128
- 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 +14 -5
- 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 +8 -1
- package/modern/locales/bgBG.js +8 -1
- package/modern/locales/csCZ.js +7 -0
- package/modern/locales/daDK.js +8 -1
- package/modern/locales/deDE.js +10 -3
- package/modern/locales/elGR.js +7 -0
- package/modern/locales/esES.js +7 -0
- package/modern/locales/faIR.js +8 -1
- package/modern/locales/fiFI.js +7 -0
- package/modern/locales/frFR.js +7 -0
- package/modern/locales/heIL.js +8 -1
- package/modern/locales/huHU.js +8 -1
- package/modern/locales/itIT.js +7 -0
- package/modern/locales/jaJP.js +7 -0
- package/modern/locales/koKR.js +7 -0
- package/modern/locales/nlNL.js +7 -0
- package/modern/locales/plPL.js +8 -1
- package/modern/locales/ptBR.js +8 -1
- package/modern/locales/ruRU.js +7 -0
- package/modern/locales/skSK.js +7 -0
- package/modern/locales/trTR.js +8 -1
- package/modern/locales/ukUA.js +7 -0
- package/modern/locales/viVN.js +7 -0
- package/modern/locales/zhCN.js +7 -0
- package/modern/models/events/gridEvents.js +8 -0
- package/modern/models/index.js +4 -3
- package/modern/utils/createSelector.js +20 -2
- package/modern/utils/exportAs.js +1 -1
- package/node/DataGrid/DataGrid.js +35 -1
- 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 +9 -6
- 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 +7 -7
- 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 +15 -17
- 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 +36 -1
- package/node/components/containers/GridToolbarContainer.js +11 -1
- package/node/components/menu/GridMenu.js +1 -0
- 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/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 +3 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +8 -1
- 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 -4
- package/node/hooks/features/columns/useGridColumnSpanning.js +1 -3
- package/node/hooks/features/columns/useGridColumns.js +8 -10
- package/node/hooks/features/dimensions/useGridDimensions.js +8 -10
- package/node/hooks/features/editRows/useGridCellEditing.new.js +133 -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 +122 -43
- package/node/hooks/features/editRows/useGridRowEditing.old.js +21 -23
- package/node/hooks/features/events/useGridEvents.js +17 -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 +92 -3
- package/node/hooks/features/filter/useGridFilter.js +21 -9
- 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 +150 -126
- 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 +14 -6
- 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 +8 -1
- package/node/locales/bgBG.js +8 -1
- package/node/locales/csCZ.js +7 -0
- package/node/locales/daDK.js +8 -1
- package/node/locales/deDE.js +10 -3
- package/node/locales/elGR.js +7 -0
- package/node/locales/esES.js +7 -0
- package/node/locales/faIR.js +8 -1
- package/node/locales/fiFI.js +7 -0
- package/node/locales/frFR.js +7 -0
- package/node/locales/heIL.js +8 -1
- package/node/locales/huHU.js +8 -1
- package/node/locales/itIT.js +7 -0
- package/node/locales/jaJP.js +7 -0
- package/node/locales/koKR.js +7 -0
- package/node/locales/nlNL.js +7 -0
- package/node/locales/plPL.js +8 -1
- package/node/locales/ptBR.js +8 -1
- package/node/locales/ruRU.js +7 -0
- package/node/locales/skSK.js +7 -0
- package/node/locales/trTR.js +8 -1
- package/node/locales/ukUA.js +7 -0
- package/node/locales/viVN.js +7 -0
- package/node/locales/zhCN.js +7 -0
- package/node/models/events/gridEvents.js +8 -0
- package/node/models/index.js +0 -13
- package/node/utils/createSelector.js +25 -4
- package/node/utils/exportAs.js +1 -1
- package/package.json +3 -2
- 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/modern/locales/ruRU.js
CHANGED
|
@@ -31,11 +31,16 @@ const ruRUGrid = {
|
|
|
31
31
|
|
|
32
32
|
return `${count} ${pluralForm}`;
|
|
33
33
|
},
|
|
34
|
+
// Quick filter toolbar field
|
|
35
|
+
toolbarQuickFilterPlaceholder: 'Поиск...',
|
|
36
|
+
toolbarQuickFilterLabel: 'Поиск',
|
|
37
|
+
toolbarQuickFilterDeleteIconLabel: 'Очистить',
|
|
34
38
|
// Export selector toolbar button text
|
|
35
39
|
toolbarExport: 'Экспорт',
|
|
36
40
|
toolbarExportLabel: 'Экспорт',
|
|
37
41
|
toolbarExportCSV: 'Скачать в формате CSV',
|
|
38
42
|
toolbarExportPrint: 'Печать',
|
|
43
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
39
44
|
// Columns panel text
|
|
40
45
|
columnsPanelTextFieldLabel: 'Найти столбец',
|
|
41
46
|
columnsPanelTextFieldPlaceholder: 'Заголовок столбца',
|
|
@@ -136,6 +141,8 @@ const ruRUGrid = {
|
|
|
136
141
|
unGroupColumn: name => `Разгруппировать по ${name}` // Master/detail
|
|
137
142
|
// expandDetailPanel: 'Expand',
|
|
138
143
|
// collapseDetailPanel: 'Collapse',
|
|
144
|
+
// Row reordering text
|
|
145
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
139
146
|
|
|
140
147
|
};
|
|
141
148
|
export const ruRU = getGridLocalization(ruRUGrid, ruRUCore);
|
package/modern/locales/skSK.js
CHANGED
|
@@ -30,11 +30,16 @@ const skSKGrid = {
|
|
|
30
30
|
|
|
31
31
|
return `${count} ${pluralForm}`;
|
|
32
32
|
},
|
|
33
|
+
// Quick filter toolbar field
|
|
34
|
+
// toolbarQuickFilterPlaceholder: 'Search...',
|
|
35
|
+
// toolbarQuickFilterLabel: 'Search',
|
|
36
|
+
// toolbarQuickFilterDeleteIconLabel: 'Clear',
|
|
33
37
|
// Export selector toolbar button text
|
|
34
38
|
toolbarExport: 'Export',
|
|
35
39
|
toolbarExportLabel: 'Export',
|
|
36
40
|
toolbarExportCSV: 'Stiahnuť ako CSV',
|
|
37
41
|
toolbarExportPrint: 'Vytlačiť',
|
|
42
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
38
43
|
// Columns panel text
|
|
39
44
|
columnsPanelTextFieldLabel: 'Nájsť stĺpec',
|
|
40
45
|
columnsPanelTextFieldPlaceholder: 'Názov stĺpca',
|
|
@@ -138,6 +143,8 @@ const skSKGrid = {
|
|
|
138
143
|
unGroupColumn: name => `Prestať zoskupovať podľa ${name}` // Master/detail
|
|
139
144
|
// expandDetailPanel: 'Expand',
|
|
140
145
|
// collapseDetailPanel: 'Collapse',
|
|
146
|
+
// Row reordering text
|
|
147
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
141
148
|
|
|
142
149
|
};
|
|
143
150
|
export const skSK = getGridLocalization(skSKGrid, skSKCore);
|
package/modern/locales/trTR.js
CHANGED
|
@@ -20,11 +20,16 @@ const trTRGrid = {
|
|
|
20
20
|
toolbarFiltersTooltipHide: 'Filtreleri gizle',
|
|
21
21
|
toolbarFiltersTooltipShow: 'Filtreleri göster',
|
|
22
22
|
toolbarFiltersTooltipActive: count => `${count} aktif filtre`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
// toolbarQuickFilterPlaceholder: 'Search...',
|
|
25
|
+
// toolbarQuickFilterLabel: 'Search',
|
|
26
|
+
// toolbarQuickFilterDeleteIconLabel: 'Clear',
|
|
23
27
|
// Export selector toolbar button text
|
|
24
28
|
toolbarExport: 'Dışa aktar',
|
|
25
29
|
toolbarExportLabel: 'Dışa aktar',
|
|
26
30
|
toolbarExportCSV: 'CSV olarak aktar',
|
|
27
31
|
toolbarExportPrint: 'Yazdır',
|
|
32
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
28
33
|
// Columns panel text
|
|
29
34
|
columnsPanelTextFieldLabel: 'Sütun ara',
|
|
30
35
|
columnsPanelTextFieldPlaceholder: 'Sütun adı',
|
|
@@ -103,6 +108,8 @@ const trTRGrid = {
|
|
|
103
108
|
unGroupColumn: name => `${name} için gruplamayı kaldır`,
|
|
104
109
|
// Master/detail
|
|
105
110
|
expandDetailPanel: 'Genişlet',
|
|
106
|
-
collapseDetailPanel: 'Gizle'
|
|
111
|
+
collapseDetailPanel: 'Gizle' // Row reordering text
|
|
112
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
113
|
+
|
|
107
114
|
};
|
|
108
115
|
export const trTR = getGridLocalization(trTRGrid, trTRCore);
|
package/modern/locales/ukUA.js
CHANGED
|
@@ -38,11 +38,16 @@ const ukUAGrid = {
|
|
|
38
38
|
few: 'активні фільтри',
|
|
39
39
|
many: 'активних фільтрів'
|
|
40
40
|
}),
|
|
41
|
+
// Quick filter toolbar field
|
|
42
|
+
// toolbarQuickFilterPlaceholder: 'Search...',
|
|
43
|
+
// toolbarQuickFilterLabel: 'Search',
|
|
44
|
+
// toolbarQuickFilterDeleteIconLabel: 'Clear',
|
|
41
45
|
// Export selector toolbar button text
|
|
42
46
|
toolbarExport: 'Експорт',
|
|
43
47
|
toolbarExportLabel: 'Експорт',
|
|
44
48
|
toolbarExportCSV: 'Завантажити у форматі CSV',
|
|
45
49
|
toolbarExportPrint: 'Друк',
|
|
50
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
46
51
|
// Columns panel text
|
|
47
52
|
columnsPanelTextFieldLabel: 'Знайти стовпець',
|
|
48
53
|
columnsPanelTextFieldPlaceholder: 'Заголовок стовпця',
|
|
@@ -129,6 +134,8 @@ const ukUAGrid = {
|
|
|
129
134
|
// Master/detail
|
|
130
135
|
// expandDetailPanel: 'Expand',
|
|
131
136
|
// collapseDetailPanel: 'Collapse',
|
|
137
|
+
// Row reordering text
|
|
138
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
132
139
|
|
|
133
140
|
};
|
|
134
141
|
export const ukUA = getGridLocalization(ukUAGrid, ukUACore);
|
package/modern/locales/viVN.js
CHANGED
|
@@ -20,11 +20,16 @@ const viVNGrid = {
|
|
|
20
20
|
toolbarFiltersTooltipHide: 'Ẩn',
|
|
21
21
|
toolbarFiltersTooltipShow: 'Hiện',
|
|
22
22
|
toolbarFiltersTooltipActive: count => count > 1 ? `${count} bộ lọc hoạt động` : `${count} bộ lọc hoạt động`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
// toolbarQuickFilterPlaceholder: 'Search...',
|
|
25
|
+
// toolbarQuickFilterLabel: 'Search',
|
|
26
|
+
// toolbarQuickFilterDeleteIconLabel: 'Clear',
|
|
23
27
|
// Export selector toolbar button text
|
|
24
28
|
toolbarExport: 'Xuất',
|
|
25
29
|
toolbarExportLabel: 'Xuất',
|
|
26
30
|
toolbarExportCSV: 'Xuất CSV',
|
|
27
31
|
toolbarExportPrint: 'In',
|
|
32
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
28
33
|
// Columns panel text
|
|
29
34
|
columnsPanelTextFieldLabel: 'Tìm kiếm',
|
|
30
35
|
columnsPanelTextFieldPlaceholder: 'Tiêu đề cột',
|
|
@@ -103,6 +108,8 @@ const viVNGrid = {
|
|
|
103
108
|
// Master/detail
|
|
104
109
|
// expandDetailPanel: 'Expand',
|
|
105
110
|
// collapseDetailPanel: 'Collapse',
|
|
111
|
+
// Row reordering text
|
|
112
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
113
|
|
|
107
114
|
};
|
|
108
115
|
export const viVN = getGridLocalization(viVNGrid, viVNCore);
|
package/modern/locales/zhCN.js
CHANGED
|
@@ -20,11 +20,16 @@ const zhCNGrid = {
|
|
|
20
20
|
toolbarFiltersTooltipHide: '隐藏筛选器',
|
|
21
21
|
toolbarFiltersTooltipShow: '显示筛选器',
|
|
22
22
|
toolbarFiltersTooltipActive: count => `${count} 个筛选器`,
|
|
23
|
+
// Quick filter toolbar field
|
|
24
|
+
// toolbarQuickFilterPlaceholder: 'Search...',
|
|
25
|
+
// toolbarQuickFilterLabel: 'Search',
|
|
26
|
+
// toolbarQuickFilterDeleteIconLabel: 'Clear',
|
|
23
27
|
// Export selector toolbar button text
|
|
24
28
|
toolbarExport: '导出',
|
|
25
29
|
toolbarExportLabel: '导出',
|
|
26
30
|
toolbarExportCSV: '导出至CSV',
|
|
27
31
|
// toolbarExportPrint: 'Print',
|
|
32
|
+
// toolbarExportExcel: 'Download as Excel',
|
|
28
33
|
// Columns panel text
|
|
29
34
|
columnsPanelTextFieldLabel: '搜索列',
|
|
30
35
|
columnsPanelTextFieldPlaceholder: '列名',
|
|
@@ -103,6 +108,8 @@ const zhCNGrid = {
|
|
|
103
108
|
// Master/detail
|
|
104
109
|
// expandDetailPanel: 'Expand',
|
|
105
110
|
// collapseDetailPanel: 'Collapse',
|
|
111
|
+
// Row reordering text
|
|
112
|
+
// rowReorderingHeaderName: 'Row reordering',
|
|
106
113
|
|
|
107
114
|
};
|
|
108
115
|
export const zhCN = getGridLocalization(zhCNGrid, zhCNCore);
|
|
@@ -20,6 +20,8 @@ var GridEvents;
|
|
|
20
20
|
GridEvents["cellEditCommit"] = "cellEditCommit";
|
|
21
21
|
GridEvents["cellEditStart"] = "cellEditStart";
|
|
22
22
|
GridEvents["cellEditStop"] = "cellEditStop";
|
|
23
|
+
GridEvents["cellModesModelChange"] = "cellModesModelChange";
|
|
24
|
+
GridEvents["rowModesModelChange"] = "rowModesModelChange";
|
|
23
25
|
GridEvents["rowEditStart"] = "rowEditStart";
|
|
24
26
|
GridEvents["rowEditStop"] = "rowEditStop";
|
|
25
27
|
GridEvents["rowEditCommit"] = "rowEditCommit";
|
|
@@ -29,6 +31,9 @@ var GridEvents;
|
|
|
29
31
|
GridEvents["rowMouseEnter"] = "rowMouseEnter";
|
|
30
32
|
GridEvents["rowMouseLeave"] = "rowMouseLeave";
|
|
31
33
|
GridEvents["editRowsModelChange"] = "editRowsModelChange";
|
|
34
|
+
GridEvents["rowDragStart"] = "rowDragStart";
|
|
35
|
+
GridEvents["rowDragOver"] = "rowDragOver";
|
|
36
|
+
GridEvents["rowDragEnd"] = "rowDragEnd";
|
|
32
37
|
GridEvents["columnHeaderBlur"] = "columnHeaderBlur";
|
|
33
38
|
GridEvents["columnHeaderFocus"] = "columnHeaderFocus";
|
|
34
39
|
GridEvents["columnHeaderNavigationKeyDown"] = "columnHeaderNavigationKeyDown";
|
|
@@ -57,6 +62,7 @@ var GridEvents;
|
|
|
57
62
|
GridEvents["columnResizeStart"] = "columnResizeStart";
|
|
58
63
|
GridEvents["columnResizeStop"] = "columnResizeStop";
|
|
59
64
|
GridEvents["columnOrderChange"] = "columnOrderChange";
|
|
65
|
+
GridEvents["rowOrderChange"] = "rowOrderChange";
|
|
60
66
|
GridEvents["rowsSet"] = "rowsSet";
|
|
61
67
|
GridEvents["rowExpansionChange"] = "rowExpansionChange";
|
|
62
68
|
GridEvents["sortedRowsSet"] = "sortedRowsSet";
|
|
@@ -72,6 +78,8 @@ var GridEvents;
|
|
|
72
78
|
GridEvents["stateChange"] = "stateChange";
|
|
73
79
|
GridEvents["columnVisibilityChange"] = "columnVisibilityChange";
|
|
74
80
|
GridEvents["virtualScrollerContentSizeChange"] = "virtualScrollerContentSizeChange";
|
|
81
|
+
GridEvents["virtualScrollerWheel"] = "virtualScrollerWheel";
|
|
82
|
+
GridEvents["virtualScrollerTouchMove"] = "virtualScrollerTouchMove";
|
|
75
83
|
GridEvents["preferencePanelClose"] = "preferencePanelClose";
|
|
76
84
|
GridEvents["preferencePanelOpen"] = "preferencePanelOpen";
|
|
77
85
|
})(GridEvents || (GridEvents = {}));
|
package/modern/models/index.js
CHANGED
|
@@ -18,9 +18,10 @@ export * from './gridIconSlotsComponent';
|
|
|
18
18
|
export * from './gridSlotsComponent';
|
|
19
19
|
export * from './gridSlotsComponentsProps';
|
|
20
20
|
export * from './gridDensity';
|
|
21
|
-
export * from './gridExport';
|
|
22
21
|
export * from './logger';
|
|
23
22
|
export * from './muiEvent';
|
|
24
23
|
export * from './events';
|
|
25
|
-
export * from './gridSortModel';
|
|
26
|
-
|
|
24
|
+
export * from './gridSortModel'; // Do not export GridExportFormat and GridExportExtension which are override in pro package
|
|
25
|
+
|
|
26
|
+
export * from './gridFilterOperator';
|
|
27
|
+
export {};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { createSelector as reselectCreateSelector } from 'reselect';
|
|
2
2
|
import { buildWarning } from './warning';
|
|
3
|
-
const
|
|
3
|
+
const cacheContainer = {
|
|
4
|
+
cache: null
|
|
5
|
+
};
|
|
4
6
|
const missingInstanceIdWarning = buildWarning(['MUI: A selector was called without passing the instance ID, which may impact the performance of the grid.', 'To fix, call it with `apiRef`, e.g. `mySelector(apiRef)`, or pass the instance ID explicitly, e.g `mySelector(state, apiRef.current.instanceId)`.']);
|
|
5
7
|
export const createSelector = (...args) => {
|
|
8
|
+
if (cacheContainer.cache === null) {
|
|
9
|
+
cacheContainer.cache = {};
|
|
10
|
+
}
|
|
11
|
+
|
|
6
12
|
const selector = (...selectorArgs) => {
|
|
7
13
|
const [stateOrApiRef, instanceId] = selectorArgs;
|
|
8
14
|
const isApiRef = !!stateOrApiRef.current;
|
|
@@ -15,6 +21,14 @@ export const createSelector = (...args) => {
|
|
|
15
21
|
}
|
|
16
22
|
}
|
|
17
23
|
|
|
24
|
+
if (cacheContainer.cache === null) {
|
|
25
|
+
cacheContainer.cache = {};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const {
|
|
29
|
+
cache
|
|
30
|
+
} = cacheContainer;
|
|
31
|
+
|
|
18
32
|
if (cache[cacheKey] && cache[cacheKey].get(args)) {
|
|
19
33
|
// We pass the cache key because the called selector might have as
|
|
20
34
|
// dependency another selector created with this `createSelector`.
|
|
@@ -33,6 +47,10 @@ export const createSelector = (...args) => {
|
|
|
33
47
|
// or it's only a simple function the receives the state and returns part of it.
|
|
34
48
|
|
|
35
49
|
|
|
36
|
-
selector.
|
|
50
|
+
selector.acceptsApiRef = true;
|
|
37
51
|
return selector;
|
|
52
|
+
}; // eslint-disable-next-line @typescript-eslint/naming-convention
|
|
53
|
+
|
|
54
|
+
export const unstable_resetCreateSelectorCache = () => {
|
|
55
|
+
cacheContainer.cache = null;
|
|
38
56
|
};
|
package/modern/utils/exportAs.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://unpkg.com/browse/@progress/kendo-file-saver@1.0.7/dist/es/save-as.js
|
|
9
9
|
* https://github.com/ag-grid/ag-grid/blob/9565c219b6210aa85fa833c929d0728f9d163a91/community-modules/csv-export/src/csvExport/downloader.ts
|
|
10
10
|
*/
|
|
11
|
-
export function exportAs(blob, extension = 'csv', filename = document.title) {
|
|
11
|
+
export function exportAs(blob, extension = 'csv', filename = document.title || 'untitled') {
|
|
12
12
|
const fullName = `${filename}.${extension}`; // Test download attribute first
|
|
13
13
|
// https://github.com/eligrey/FileSaver.js/issues/193
|
|
14
14
|
|
|
@@ -81,6 +81,11 @@ DataGridRaw.propTypes = {
|
|
|
81
81
|
*/
|
|
82
82
|
autoPageSize: _propTypes.default.bool,
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Controls the modes of the cells.
|
|
86
|
+
*/
|
|
87
|
+
cellModesModel: _propTypes.default.object,
|
|
88
|
+
|
|
84
89
|
/**
|
|
85
90
|
* If `true`, the grid get a first column with a checkbox that allows to select rows.
|
|
86
91
|
* @default false
|
|
@@ -228,7 +233,9 @@ DataGridRaw.propTypes = {
|
|
|
228
233
|
operatorValue: _propTypes.default.string,
|
|
229
234
|
value: _propTypes.default.any
|
|
230
235
|
})).isRequired,
|
|
231
|
-
linkOperator: _propTypes.default.oneOf(['and', 'or'])
|
|
236
|
+
linkOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
237
|
+
quickFilterLogicOperator: _propTypes.default.oneOf(['and', 'or']),
|
|
238
|
+
quickFilterValues: _propTypes.default.array
|
|
232
239
|
}),
|
|
233
240
|
|
|
234
241
|
/**
|
|
@@ -316,6 +323,14 @@ DataGridRaw.propTypes = {
|
|
|
316
323
|
*/
|
|
317
324
|
isRowSelectable: _propTypes.default.func,
|
|
318
325
|
|
|
326
|
+
/**
|
|
327
|
+
* If `true`, the selection model will retain selected rows that do not exist.
|
|
328
|
+
* Useful when using server side pagination and row selections need to be retained
|
|
329
|
+
* when changing pages.
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
keepNonExistentRowsSelected: _propTypes.default.bool,
|
|
333
|
+
|
|
319
334
|
/**
|
|
320
335
|
* If `true`, a loading overlay is displayed.
|
|
321
336
|
*/
|
|
@@ -403,6 +418,13 @@ DataGridRaw.propTypes = {
|
|
|
403
418
|
*/
|
|
404
419
|
onCellKeyDown: _propTypes.default.func,
|
|
405
420
|
|
|
421
|
+
/**
|
|
422
|
+
* Callback fired when the `cellModesModel` prop changes.
|
|
423
|
+
* @param {GridCellModesModel} cellModesModel Object containig which cells are in "edit" mode.
|
|
424
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
425
|
+
*/
|
|
426
|
+
onCellModesModelChange: _propTypes.default.func,
|
|
427
|
+
|
|
406
428
|
/**
|
|
407
429
|
* Callback fired when a click event comes from a column header element.
|
|
408
430
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
@@ -589,6 +611,13 @@ DataGridRaw.propTypes = {
|
|
|
589
611
|
*/
|
|
590
612
|
onRowEditStop: _propTypes.default.func,
|
|
591
613
|
|
|
614
|
+
/**
|
|
615
|
+
* Callback fired when the `rowModesModel` prop changes.
|
|
616
|
+
* @param {GridRowModesModel} rowModesModel Object containig which rows are in "edit" mode.
|
|
617
|
+
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
618
|
+
*/
|
|
619
|
+
onRowModesModelChange: _propTypes.default.func,
|
|
620
|
+
|
|
592
621
|
/**
|
|
593
622
|
* Callback fired when the selection state of one or multiple rows changes.
|
|
594
623
|
* @param {GridSelectionModel} selectionModel With all the row ids [[GridSelectionModel]].
|
|
@@ -674,6 +703,11 @@ DataGridRaw.propTypes = {
|
|
|
674
703
|
*/
|
|
675
704
|
rowHeight: _propTypes.default.number,
|
|
676
705
|
|
|
706
|
+
/**
|
|
707
|
+
* Controls the modes of the rows.
|
|
708
|
+
*/
|
|
709
|
+
rowModesModel: _propTypes.default.object,
|
|
710
|
+
|
|
677
711
|
/**
|
|
678
712
|
* Set of rows of type [[GridRowsProp]].
|
|
679
713
|
*/
|
|
@@ -80,7 +80,8 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
80
80
|
sortingMode: _models.GridFeatureModeConstant.client,
|
|
81
81
|
throttleRowsMs: 0,
|
|
82
82
|
disableColumnReorder: false,
|
|
83
|
-
disableColumnResize: false
|
|
83
|
+
disableColumnResize: false,
|
|
84
|
+
keepNonExistentRowsSelected: false
|
|
84
85
|
};
|
|
85
86
|
exports.DATA_GRID_PROPS_DEFAULT_VALUES = DATA_GRID_PROPS_DEFAULT_VALUES;
|
|
86
87
|
|
|
@@ -24,6 +24,7 @@ const GRID_ACTIONS_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
24
24
|
headerName: '',
|
|
25
25
|
disableColumnMenu: true,
|
|
26
26
|
disableExport: true,
|
|
27
|
-
renderCell: _GridActionsCell.renderActionsCell
|
|
27
|
+
renderCell: _GridActionsCell.renderActionsCell,
|
|
28
|
+
getApplyQuickFilterFn: undefined
|
|
28
29
|
});
|
|
29
30
|
exports.GRID_ACTIONS_COL_DEF = GRID_ACTIONS_COL_DEF;
|
|
@@ -34,6 +34,7 @@ const GRID_BOOLEAN_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
34
34
|
renderEditCell: _GridEditBooleanCell.renderEditBooleanCell,
|
|
35
35
|
sortComparator: _gridSortingUtils.gridNumberComparator,
|
|
36
36
|
valueFormatter: gridBooleanFormatter,
|
|
37
|
-
filterOperators: (0, _gridBooleanOperators.getGridBooleanOperators)()
|
|
37
|
+
filterOperators: (0, _gridBooleanOperators.getGridBooleanOperators)(),
|
|
38
|
+
getApplyQuickFilterFn: undefined
|
|
38
39
|
});
|
|
39
40
|
exports.GRID_BOOLEAN_COL_DEF = GRID_BOOLEAN_COL_DEF;
|
|
@@ -35,6 +35,7 @@ const GRID_CHECKBOX_SELECTION_COL_DEF = (0, _extends2.default)({}, _gridBooleanC
|
|
|
35
35
|
disableColumnMenu: true,
|
|
36
36
|
disableReorder: true,
|
|
37
37
|
disableExport: true,
|
|
38
|
+
getApplyQuickFilterFn: undefined,
|
|
38
39
|
valueGetter: params => {
|
|
39
40
|
const selectionLookup = (0, _gridSelectionSelector.selectedIdsLookupSelector)(params.api.state, params.api.instanceId);
|
|
40
41
|
return selectionLookup[params.id] !== undefined;
|
|
@@ -44,7 +44,8 @@ const GRID_DATE_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRI
|
|
|
44
44
|
sortComparator: _gridSortingUtils.gridDateComparator,
|
|
45
45
|
valueFormatter: gridDateFormatter,
|
|
46
46
|
filterOperators: (0, _gridDateOperators.getGridDateOperators)(),
|
|
47
|
-
renderEditCell: _GridEditDateCell.renderEditDateCell
|
|
47
|
+
renderEditCell: _GridEditDateCell.renderEditDateCell,
|
|
48
|
+
getApplyQuickFilterFn: undefined
|
|
48
49
|
});
|
|
49
50
|
exports.GRID_DATE_COL_DEF = GRID_DATE_COL_DEF;
|
|
50
51
|
const GRID_DATETIME_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
@@ -52,6 +53,7 @@ const GRID_DATETIME_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_
|
|
|
52
53
|
sortComparator: _gridSortingUtils.gridDateComparator,
|
|
53
54
|
valueFormatter: gridDateTimeFormatter,
|
|
54
55
|
filterOperators: (0, _gridDateOperators.getGridDateOperators)(true),
|
|
55
|
-
renderEditCell: _GridEditDateCell.renderEditDateCell
|
|
56
|
+
renderEditCell: _GridEditDateCell.renderEditDateCell,
|
|
57
|
+
getApplyQuickFilterFn: undefined
|
|
56
58
|
});
|
|
57
59
|
exports.GRID_DATETIME_COL_DEF = GRID_DATETIME_COL_DEF;
|
|
@@ -26,6 +26,7 @@ const GRID_NUMERIC_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_S
|
|
|
26
26
|
valueFormatter: ({
|
|
27
27
|
value
|
|
28
28
|
}) => value && (0, _utils.isNumber)(value) && value.toLocaleString() || value,
|
|
29
|
-
filterOperators: (0, _gridNumericOperators.getGridNumericOperators)()
|
|
29
|
+
filterOperators: (0, _gridNumericOperators.getGridNumericOperators)(),
|
|
30
|
+
getApplyQuickFilterFn: _gridNumericOperators.getGridNumericQuickFilterFn
|
|
30
31
|
});
|
|
31
32
|
exports.GRID_NUMERIC_COL_DEF = GRID_NUMERIC_COL_DEF;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getGridNumericOperators = exports.getGridNumericColumnOperators = void 0;
|
|
6
|
+
exports.getGridNumericQuickFilterFn = exports.getGridNumericOperators = exports.getGridNumericColumnOperators = void 0;
|
|
7
7
|
|
|
8
8
|
var _GridFilterInputValue = require("../components/panel/filterPanel/GridFilterInputValue");
|
|
9
9
|
|
|
@@ -19,6 +19,20 @@ const parseNumericValue = value => {
|
|
|
19
19
|
return Number(value);
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
const getGridNumericQuickFilterFn = value => {
|
|
23
|
+
if (value == null || Number.isNaN(value) || value === '') {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return ({
|
|
28
|
+
value: columnValue
|
|
29
|
+
}) => {
|
|
30
|
+
return parseNumericValue(columnValue) === parseNumericValue(value);
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
exports.getGridNumericQuickFilterFn = getGridNumericQuickFilterFn;
|
|
35
|
+
|
|
22
36
|
const getGridNumericOperators = () => [{
|
|
23
37
|
label: '=',
|
|
24
38
|
value: '=',
|
|
@@ -18,6 +18,7 @@ var _gridSingleSelectOperators = require("./gridSingleSelectOperators");
|
|
|
18
18
|
const GRID_SINGLE_SELECT_COL_DEF = (0, _extends2.default)({}, _gridStringColDef.GRID_STRING_COL_DEF, {
|
|
19
19
|
type: 'singleSelect',
|
|
20
20
|
renderEditCell: _GridEditSingleSelectCell.renderEditSingleSelectCell,
|
|
21
|
-
filterOperators: (0, _gridSingleSelectOperators.getGridSingleSelectOperators)()
|
|
21
|
+
filterOperators: (0, _gridSingleSelectOperators.getGridSingleSelectOperators)(),
|
|
22
|
+
getApplyQuickFilterFn: _gridSingleSelectOperators.getGridSingleSelectQuickFilterFn
|
|
22
23
|
});
|
|
23
24
|
exports.GRID_SINGLE_SELECT_COL_DEF = GRID_SINGLE_SELECT_COL_DEF;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getGridSingleSelectOperators = void 0;
|
|
6
|
+
exports.getGridSingleSelectQuickFilterFn = exports.getGridSingleSelectOperators = void 0;
|
|
7
7
|
|
|
8
8
|
var _GridFilterInputSingleSelect = require("../components/panel/filterPanel/GridFilterInputSingleSelect");
|
|
9
9
|
|
|
@@ -17,6 +17,61 @@ const parseObjectValue = value => {
|
|
|
17
17
|
return value.value;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
+
const getGridSingleSelectQuickFilterFn = (value, column, apiRef) => {
|
|
21
|
+
if (!value) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const {
|
|
26
|
+
valueOptions,
|
|
27
|
+
valueFormatter,
|
|
28
|
+
field
|
|
29
|
+
} = column;
|
|
30
|
+
const potentialValues = [parseObjectValue(value).toString()];
|
|
31
|
+
const iterableColumnValues = typeof valueOptions === 'function' ? valueOptions({
|
|
32
|
+
field
|
|
33
|
+
}) : valueOptions || [];
|
|
34
|
+
|
|
35
|
+
if (iterableColumnValues) {
|
|
36
|
+
iterableColumnValues.forEach(option => {
|
|
37
|
+
// for each valueOption, check if the formatted value
|
|
38
|
+
let optionValue;
|
|
39
|
+
let optionLabel;
|
|
40
|
+
|
|
41
|
+
if (typeof option === 'object') {
|
|
42
|
+
optionValue = option.value;
|
|
43
|
+
optionLabel = option.label;
|
|
44
|
+
} else {
|
|
45
|
+
optionValue = option;
|
|
46
|
+
|
|
47
|
+
if (valueFormatter) {
|
|
48
|
+
optionLabel = valueFormatter({
|
|
49
|
+
value: option,
|
|
50
|
+
field,
|
|
51
|
+
api: apiRef.current
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
optionLabel = option;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (optionLabel.slice(0, value.length).toLowerCase() === value.toLowerCase()) {
|
|
59
|
+
if (!potentialValues.includes(optionValue)) {
|
|
60
|
+
potentialValues.push(optionValue.toString());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return ({
|
|
67
|
+
value: columnValue
|
|
68
|
+
}) => {
|
|
69
|
+
return columnValue != null ? potentialValues.includes(parseObjectValue(columnValue).toString()) : false;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.getGridSingleSelectQuickFilterFn = getGridSingleSelectQuickFilterFn;
|
|
74
|
+
|
|
20
75
|
const getGridSingleSelectOperators = () => [{
|
|
21
76
|
value: 'is',
|
|
22
77
|
getApplyFilterFn: filterItem => {
|
|
@@ -27,6 +27,7 @@ const GRID_STRING_COL_DEF = {
|
|
|
27
27
|
type: 'string',
|
|
28
28
|
align: 'left',
|
|
29
29
|
filterOperators: (0, _gridStringOperators.getGridStringOperators)(),
|
|
30
|
-
renderEditCell: _GridEditInputCell.renderEditInputCell
|
|
30
|
+
renderEditCell: _GridEditInputCell.renderEditInputCell,
|
|
31
|
+
getApplyQuickFilterFn: _gridStringOperators.getGridStringQuickFilterFn
|
|
31
32
|
};
|
|
32
33
|
exports.GRID_STRING_COL_DEF = GRID_STRING_COL_DEF;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getGridStringOperators = void 0;
|
|
6
|
+
exports.getGridStringQuickFilterFn = exports.getGridStringOperators = void 0;
|
|
7
7
|
|
|
8
8
|
var _GridFilterInputValue = require("../components/panel/filterPanel/GridFilterInputValue");
|
|
9
9
|
|
|
@@ -11,6 +11,21 @@ var _utils = require("../utils/utils");
|
|
|
11
11
|
|
|
12
12
|
var _GridFilterInputMultipleValue = require("../components/panel/filterPanel/GridFilterInputMultipleValue");
|
|
13
13
|
|
|
14
|
+
const getGridStringQuickFilterFn = value => {
|
|
15
|
+
if (!value) {
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const filterRegex = new RegExp((0, _utils.escapeRegExp)(value), 'i');
|
|
20
|
+
return ({
|
|
21
|
+
value: columnValue
|
|
22
|
+
}) => {
|
|
23
|
+
return columnValue != null ? filterRegex.test(columnValue.toString()) : false;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.getGridStringQuickFilterFn = getGridStringQuickFilterFn;
|
|
28
|
+
|
|
14
29
|
const getGridStringOperators = () => [{
|
|
15
30
|
value: 'contains',
|
|
16
31
|
getApplyFilterFn: filterItem => {
|
|
@@ -11,6 +11,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
13
|
|
|
14
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
14
16
|
var _useGridSelector = require("../hooks/utils/useGridSelector");
|
|
15
17
|
|
|
16
18
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
@@ -57,4 +59,11 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
|
|
|
57
59
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
58
60
|
}));
|
|
59
61
|
});
|
|
60
|
-
exports.GridFooter = GridFooter;
|
|
62
|
+
exports.GridFooter = GridFooter;
|
|
63
|
+
process.env.NODE_ENV !== "production" ? GridFooter.propTypes = {
|
|
64
|
+
// ----------------------------- Warning --------------------------------
|
|
65
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
66
|
+
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
67
|
+
// ----------------------------------------------------------------------
|
|
68
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object])
|
|
69
|
+
} : void 0;
|
|
@@ -19,8 +19,6 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
19
19
|
|
|
20
20
|
var _material = require("@mui/material");
|
|
21
21
|
|
|
22
|
-
var _events = require("../models/events");
|
|
23
|
-
|
|
24
22
|
var _gridEditRowModel = require("../models/gridEditRowModel");
|
|
25
23
|
|
|
26
24
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
@@ -162,6 +160,11 @@ function GridRow(props) {
|
|
|
162
160
|
|
|
163
161
|
if (field === _gridDetailPanelToggleField.GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
164
162
|
return;
|
|
163
|
+
} // User reorders a row
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
if (field === '__reorder__') {
|
|
167
|
+
return;
|
|
165
168
|
} // User is editing a cell
|
|
166
169
|
|
|
167
170
|
|
|
@@ -177,7 +180,7 @@ function GridRow(props) {
|
|
|
177
180
|
}
|
|
178
181
|
}
|
|
179
182
|
|
|
180
|
-
publish(
|
|
183
|
+
publish('rowClick', onClick)(event);
|
|
181
184
|
}, [apiRef, onClick, publish, rowId]);
|
|
182
185
|
const style = (0, _extends2.default)({}, styleProp, {
|
|
183
186
|
maxHeight: rowHeight,
|
|
@@ -303,9 +306,9 @@ function GridRow(props) {
|
|
|
303
306
|
"aria-selected": selected,
|
|
304
307
|
style: style,
|
|
305
308
|
onClick: publishClick,
|
|
306
|
-
onDoubleClick: publish(
|
|
307
|
-
onMouseEnter: publish(
|
|
308
|
-
onMouseLeave: publish(
|
|
309
|
+
onDoubleClick: publish('rowDoubleClick', onDoubleClick),
|
|
310
|
+
onMouseEnter: publish('rowMouseEnter', onMouseEnter),
|
|
311
|
+
onMouseLeave: publish('rowMouseLeave', onMouseLeave)
|
|
309
312
|
}, other, {
|
|
310
313
|
children: [cells, emptyCellWidth > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyCell, {
|
|
311
314
|
width: emptyCellWidth,
|
|
@@ -89,5 +89,6 @@ process.env.NODE_ENV !== "production" ? GridRowCount.propTypes = {
|
|
|
89
89
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
90
90
|
// ----------------------------------------------------------------------
|
|
91
91
|
rowCount: _propTypes.default.number.isRequired,
|
|
92
|
+
sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
|
|
92
93
|
visibleRowCount: _propTypes.default.number.isRequired
|
|
93
94
|
} : void 0;
|
|
@@ -19,8 +19,6 @@ var _material = require("@mui/material");
|
|
|
19
19
|
|
|
20
20
|
var _styles = require("@mui/material/styles");
|
|
21
21
|
|
|
22
|
-
var _events = require("../models/events");
|
|
23
|
-
|
|
24
22
|
var _useGridApiEventHandler = require("../hooks/utils/useGridApiEventHandler");
|
|
25
23
|
|
|
26
24
|
var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
@@ -125,9 +123,9 @@ function GridScrollAreaRaw(props) {
|
|
|
125
123
|
const toggleDragging = React.useCallback(() => {
|
|
126
124
|
setDragging(prevDragging => !prevDragging);
|
|
127
125
|
}, []);
|
|
128
|
-
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef,
|
|
129
|
-
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef,
|
|
130
|
-
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef,
|
|
126
|
+
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef, 'rowsScroll', handleScrolling);
|
|
127
|
+
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef, 'columnHeaderDragStart', toggleDragging);
|
|
128
|
+
(0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef, 'columnHeaderDragEnd', toggleDragging);
|
|
131
129
|
return dragging ? /*#__PURE__*/(0, _jsxRuntime.jsx)(GridScrollAreaRawRoot, {
|
|
132
130
|
ref: rootRef,
|
|
133
131
|
className: (0, _clsx.default)(classes.root),
|