@mui/x-data-grid 8.0.0-alpha.7 → 8.0.0-alpha.9
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 +551 -3
- package/DataGrid/DataGrid.js +4 -5
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridHeaders.js +2 -2
- package/components/GridRow.d.ts +5 -9
- package/components/GridRow.js +28 -78
- package/components/GridScrollArea.js +2 -0
- package/components/GridSkeletonLoadingOverlay.js +18 -18
- package/components/cell/GridCell.d.ts +9 -16
- package/components/cell/GridCell.js +17 -35
- package/components/columnHeaders/GridColumnGroupHeader.d.ts +5 -5
- package/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +3 -3
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -6
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +14 -6
- package/components/containers/GridRootStyles.js +7 -0
- package/components/panel/GridPanel.js +2 -1
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +1 -0
- package/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +2 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +32 -29
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +1 -0
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +1 -0
- package/components/panel/filterPanel/GridFilterInputValue.js +34 -28
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +2 -1
- package/components/toolbar/GridToolbarColumnsButton.js +6 -1
- package/components/toolbar/GridToolbarFilterButton.js +6 -1
- package/components/virtualization/GridVirtualScrollbar.js +11 -12
- package/components/virtualization/GridVirtualScroller.js +4 -4
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +1 -0
- package/context/GridContextProvider.d.ts +2 -1
- package/context/GridRootPropsContext.js +2 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +2 -2
- package/hooks/core/useGridApiInitialization.d.ts +2 -2
- package/hooks/core/useGridInitialization.d.ts +2 -2
- package/hooks/core/useGridIsRtl.d.ts +2 -2
- package/hooks/core/useGridLocaleText.d.ts +2 -2
- package/hooks/core/useGridLoggerFactory.d.ts +2 -2
- package/hooks/core/useGridRefs.d.ts +2 -2
- package/hooks/core/useGridStateInitialization.d.ts +2 -2
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
- package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
- package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
- package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
- package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.d.ts +2 -2
- package/hooks/features/density/useGridDensity.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +1 -3
- package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditing.js +1 -1
- package/hooks/features/editing/useGridEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/events/useGridEvents.d.ts +2 -2
- package/hooks/features/export/serializers/csvSerializer.d.ts +2 -1
- package/hooks/features/export/useGridCsvExport.d.ts +2 -2
- package/hooks/features/export/useGridPrintExport.d.ts +2 -2
- package/hooks/features/export/utils.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.d.ts +1 -1
- package/hooks/features/filter/gridFilterSelector.js +6 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +7 -7
- package/hooks/features/filter/gridFilterUtils.js +3 -3
- package/hooks/features/filter/useGridFilter.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.d.ts +2 -2
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -3
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +21 -2
- package/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +5 -3
- package/hooks/features/pagination/useGridPaginationMeta.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.d.ts +2 -2
- package/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/hooks/features/pagination/useGridRowCount.d.ts +2 -2
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +1 -0
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/hooks/features/preferencesPanel/index.d.ts +1 -1
- package/hooks/features/preferencesPanel/index.js +1 -1
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.d.ts +2 -2
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +3 -2
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
- package/hooks/features/rows/gridRowsSelector.js +1 -1
- package/hooks/features/rows/gridRowsUtils.d.ts +4 -4
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +2 -2
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
- package/hooks/features/scroll/useGridScroll.d.ts +2 -2
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
- package/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/hooks/features/sorting/useGridSorting.d.ts +2 -2
- package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +2 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +92 -50
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +4 -4
- package/hooks/utils/useGridApiMethod.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +2 -2
- package/hooks/utils/useGridApiRef.js +3 -1
- package/hooks/utils/useGridInitializeState.d.ts +3 -3
- package/hooks/utils/useGridLogger.d.ts +2 -2
- package/hooks/utils/useGridNativeEventListener.d.ts +2 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +2 -1
- package/hooks/utils/useGridSelector.d.ts +2 -2
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/internals/utils/attachPinnedStyle.d.ts +2 -0
- package/internals/utils/attachPinnedStyle.js +9 -0
- package/internals/utils/getPinnedCellOffset.d.ts +3 -3
- package/internals/utils/getPinnedCellOffset.js +6 -7
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/locales/arSD.js +2 -0
- package/locales/beBY.js +1 -0
- package/locales/bgBG.js +2 -0
- package/locales/csCZ.js +2 -0
- package/locales/daDK.js +2 -0
- package/locales/deDE.js +2 -0
- package/locales/elGR.js +2 -0
- package/locales/esES.js +2 -0
- package/locales/faIR.js +7 -6
- package/locales/fiFI.js +2 -0
- package/locales/frFR.js +2 -0
- package/locales/heIL.js +2 -0
- package/locales/hrHR.js +2 -0
- package/locales/huHU.js +2 -0
- package/locales/isIS.js +2 -0
- package/locales/itIT.js +2 -0
- package/locales/jaJP.js +2 -0
- package/locales/koKR.js +2 -0
- package/locales/nbNO.js +2 -0
- package/locales/nlNL.js +2 -0
- package/locales/nnNO.js +2 -0
- package/locales/plPL.js +2 -0
- package/locales/ptBR.js +2 -0
- package/locales/ptPT.js +2 -0
- package/locales/roRO.js +2 -0
- package/locales/ruRU.js +2 -0
- package/locales/skSK.js +2 -0
- package/locales/svSE.js +2 -0
- package/locales/trTR.js +2 -0
- package/locales/ukUA.js +2 -0
- package/locales/urPK.js +11 -10
- package/locales/viVN.js +2 -0
- package/locales/zhCN.js +2 -0
- package/locales/zhHK.js +2 -0
- package/locales/zhTW.js +2 -0
- package/material/index.js +2 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/colDef/gridColDef.d.ts +9 -8
- package/models/events/gridEventLookup.d.ts +6 -1
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterOperator.d.ts +2 -1
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/props/DataGridProps.d.ts +2 -1
- package/modern/DataGrid/DataGrid.js +4 -5
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridRow.js +28 -78
- package/modern/components/GridScrollArea.js +2 -0
- package/modern/components/GridSkeletonLoadingOverlay.js +18 -18
- package/modern/components/cell/GridCell.js +17 -35
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -6
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -2
- package/modern/components/containers/GridRoot.js +14 -6
- package/modern/components/containers/GridRootStyles.js +7 -0
- package/modern/components/panel/GridPanel.js +2 -1
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +32 -29
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +34 -28
- package/modern/components/toolbar/GridToolbarColumnsButton.js +6 -1
- package/modern/components/toolbar/GridToolbarFilterButton.js +6 -1
- package/modern/components/virtualization/GridVirtualScrollbar.js +11 -12
- package/modern/components/virtualization/GridVirtualScroller.js +4 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +1 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +34 -76
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +1 -3
- package/modern/hooks/features/editing/useGridCellEditing.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +6 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/useGridPagination.js +5 -3
- package/modern/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +8 -1
- package/modern/hooks/features/preferencesPanel/index.js +1 -1
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +2 -2
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +42 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +92 -50
- package/modern/hooks/utils/useGridApiRef.js +3 -1
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +1 -0
- package/modern/internals/utils/attachPinnedStyle.js +9 -0
- package/modern/internals/utils/getPinnedCellOffset.js +6 -7
- package/modern/internals/utils/index.js +2 -1
- package/modern/locales/arSD.js +2 -0
- package/modern/locales/beBY.js +1 -0
- package/modern/locales/bgBG.js +2 -0
- package/modern/locales/csCZ.js +2 -0
- package/modern/locales/daDK.js +2 -0
- package/modern/locales/deDE.js +2 -0
- package/modern/locales/elGR.js +2 -0
- package/modern/locales/esES.js +2 -0
- package/modern/locales/faIR.js +7 -6
- package/modern/locales/fiFI.js +2 -0
- package/modern/locales/frFR.js +2 -0
- package/modern/locales/heIL.js +2 -0
- package/modern/locales/hrHR.js +2 -0
- package/modern/locales/huHU.js +2 -0
- package/modern/locales/isIS.js +2 -0
- package/modern/locales/itIT.js +2 -0
- package/modern/locales/jaJP.js +2 -0
- package/modern/locales/koKR.js +2 -0
- package/modern/locales/nbNO.js +2 -0
- package/modern/locales/nlNL.js +2 -0
- package/modern/locales/nnNO.js +2 -0
- package/modern/locales/plPL.js +2 -0
- package/modern/locales/ptBR.js +2 -0
- package/modern/locales/ptPT.js +2 -0
- package/modern/locales/roRO.js +2 -0
- package/modern/locales/ruRU.js +2 -0
- package/modern/locales/skSK.js +2 -0
- package/modern/locales/svSE.js +2 -0
- package/modern/locales/trTR.js +2 -0
- package/modern/locales/ukUA.js +2 -0
- package/modern/locales/urPK.js +11 -10
- package/modern/locales/viVN.js +2 -0
- package/modern/locales/zhCN.js +2 -0
- package/modern/locales/zhHK.js +2 -0
- package/modern/locales/zhTW.js +2 -0
- package/modern/material/index.js +2 -1
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/node/DataGrid/DataGrid.js +2 -3
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridRow.js +26 -77
- package/node/components/GridScrollArea.js +1 -0
- package/node/components/GridSkeletonLoadingOverlay.js +17 -17
- package/node/components/cell/GridCell.js +18 -36
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/node/components/containers/GridRoot.js +14 -6
- package/node/components/containers/GridRootStyles.js +7 -0
- package/node/components/panel/GridPanel.js +2 -1
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +12 -16
- package/node/components/panel/filterPanel/GridFilterInputDate.js +31 -28
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +13 -17
- package/node/components/panel/filterPanel/GridFilterInputValue.js +33 -27
- package/node/components/toolbar/GridToolbarColumnsButton.js +6 -1
- package/node/components/toolbar/GridToolbarFilterButton.js +6 -1
- package/node/components/virtualization/GridVirtualScrollbar.js +11 -12
- package/node/components/virtualization/GridVirtualScroller.js +4 -4
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +1 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +32 -74
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/node/hooks/features/dimensions/useGridDimensions.js +3 -5
- package/node/hooks/features/editing/useGridCellEditing.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/useGridPagination.js +5 -3
- package/node/hooks/features/pagination/useGridPaginationModel.js +23 -1
- package/node/hooks/features/preferencesPanel/gridPreferencePanelSelector.js +9 -2
- package/node/hooks/features/preferencesPanel/index.js +11 -10
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +14 -38
- package/node/hooks/features/rows/gridRowsSelector.js +1 -1
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +49 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +94 -52
- package/node/hooks/utils/useGridApiRef.js +3 -1
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +12 -0
- package/node/internals/utils/attachPinnedStyle.js +15 -0
- package/node/internals/utils/getPinnedCellOffset.js +6 -7
- package/node/internals/utils/index.js +11 -0
- package/node/locales/arSD.js +2 -0
- package/node/locales/beBY.js +1 -0
- package/node/locales/bgBG.js +2 -0
- package/node/locales/csCZ.js +2 -0
- package/node/locales/daDK.js +2 -0
- package/node/locales/deDE.js +2 -0
- package/node/locales/elGR.js +2 -0
- package/node/locales/esES.js +2 -0
- package/node/locales/faIR.js +7 -6
- package/node/locales/fiFI.js +2 -0
- package/node/locales/frFR.js +2 -0
- package/node/locales/heIL.js +2 -0
- package/node/locales/hrHR.js +2 -0
- package/node/locales/huHU.js +2 -0
- package/node/locales/isIS.js +2 -0
- package/node/locales/itIT.js +2 -0
- package/node/locales/jaJP.js +2 -0
- package/node/locales/koKR.js +2 -0
- package/node/locales/nbNO.js +2 -0
- package/node/locales/nlNL.js +2 -0
- package/node/locales/nnNO.js +2 -0
- package/node/locales/plPL.js +2 -0
- package/node/locales/ptBR.js +2 -0
- package/node/locales/ptPT.js +2 -0
- package/node/locales/roRO.js +2 -0
- package/node/locales/ruRU.js +2 -0
- package/node/locales/skSK.js +2 -0
- package/node/locales/svSE.js +2 -0
- package/node/locales/trTR.js +2 -0
- package/node/locales/ukUA.js +2 -0
- package/node/locales/urPK.js +11 -10
- package/node/locales/viVN.js +2 -0
- package/node/locales/zhCN.js +2 -0
- package/node/locales/zhHK.js +2 -0
- package/node/locales/zhTW.js +2 -0
- package/node/material/index.js +2 -1
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/package.json +2 -2
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +2 -2
- package/utils/domUtils.js +7 -2
- package/utils/getPublicApiRef.d.ts +2 -1
- package/utils/isJSDOM.d.ts +1 -0
- package/utils/isJSDOM.js +1 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
package/components/GridRow.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridRowId, GridRowModel } from '../models/gridRows';
|
|
3
3
|
import { GridPinnedColumns } from '../hooks/features/columns';
|
|
4
4
|
import type { GridStateColDef } from '../models/colDef/gridColDef';
|
|
5
|
-
import type { GridRenderContext } from '../models/params/gridScrollParams';
|
|
6
|
-
import type { GridDimensions } from '../hooks/features/dimensions';
|
|
7
5
|
export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
6
|
row: GridRowModel;
|
|
9
7
|
rowId: GridRowId;
|
|
@@ -16,8 +14,9 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
16
14
|
rowHeight: number | 'auto';
|
|
17
15
|
offsetTop: number | undefined;
|
|
18
16
|
offsetLeft: number;
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
columnsTotalWidth: number;
|
|
18
|
+
firstColumnIndex: number;
|
|
19
|
+
lastColumnIndex: number;
|
|
21
20
|
visibleColumns: GridStateColDef[];
|
|
22
21
|
pinnedColumns: GridPinnedColumns;
|
|
23
22
|
/**
|
|
@@ -25,15 +24,12 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
24
|
* If `null`, no cell in this row has focus.
|
|
26
25
|
*/
|
|
27
26
|
focusedColumnIndex: number | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Determines which cell should be tabbable by having tabIndex=0.
|
|
30
|
-
* If `null`, no cell in this row is in the tab sequence.
|
|
31
|
-
*/
|
|
32
|
-
tabbableCell: string | null;
|
|
33
27
|
isFirstVisible: boolean;
|
|
34
28
|
isLastVisible: boolean;
|
|
35
29
|
isNotVisible: boolean;
|
|
36
30
|
showBottomBorder: boolean;
|
|
31
|
+
scrollbarWidth: number;
|
|
32
|
+
gridHasFiller: boolean;
|
|
37
33
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
38
34
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
39
35
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
package/components/GridRow.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "
|
|
5
|
+
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetTop", "offsetLeft", "columnsTotalWidth", "firstColumnIndex", "lastColumnIndex", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "scrollbarWidth", "gridHasFiller", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import clsx from 'clsx';
|
|
@@ -11,22 +13,21 @@ import { GridEditModes, GridRowModes, GridCellModes } from "../models/gridEditRo
|
|
|
11
13
|
import { gridClasses } from "../constants/gridClasses.js";
|
|
12
14
|
import { composeGridClasses } from "../utils/composeGridClasses.js";
|
|
13
15
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
16
|
+
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
|
|
14
17
|
import { gridColumnPositionsSelector } from "../hooks/features/columns/gridColumnsSelector.js";
|
|
15
18
|
import { useGridSelector, objectShallowCompare } from "../hooks/utils/useGridSelector.js";
|
|
16
19
|
import { useGridVisibleRows } from "../hooks/utils/useGridVisibleRows.js";
|
|
17
20
|
import { findParentElementFromClassName, isEventTargetInPortal } from "../utils/domUtils.js";
|
|
18
21
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from "../colDef/gridCheckboxSelectionColDef.js";
|
|
19
22
|
import { GRID_ACTIONS_COLUMN_TYPE } from "../colDef/gridActionsColDef.js";
|
|
20
|
-
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from "../internals/constants.js";
|
|
23
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD, PinnedColumnPosition } from "../internals/constants.js";
|
|
21
24
|
import { gridSortModelSelector } from "../hooks/features/sorting/gridSortingSelector.js";
|
|
22
25
|
import { gridRowMaximumTreeDepthSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
23
26
|
import { gridEditRowsStateSelector } from "../hooks/features/editing/gridEditingSelectors.js";
|
|
24
|
-
import { PinnedPosition, gridPinnedColumnPositionLookup } from "./cell/GridCell.js";
|
|
25
27
|
import { GridScrollbarFillerCell as ScrollbarFiller } from "./GridScrollbarFillerCell.js";
|
|
26
28
|
import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
|
|
27
29
|
import { useGridConfiguration } from "../hooks/utils/useGridConfiguration.js";
|
|
28
30
|
import { useGridPrivateApiContext } from "../hooks/utils/useGridPrivateApiContext.js";
|
|
29
|
-
import { gridVirtualizationColumnEnabledSelector } from "../hooks/index.js";
|
|
30
31
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
31
32
|
const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
32
33
|
const {
|
|
@@ -40,13 +41,16 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
40
41
|
visibleColumns,
|
|
41
42
|
pinnedColumns,
|
|
42
43
|
offsetLeft,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
columnsTotalWidth,
|
|
45
|
+
firstColumnIndex,
|
|
46
|
+
lastColumnIndex,
|
|
45
47
|
focusedColumnIndex,
|
|
46
48
|
isFirstVisible,
|
|
47
49
|
isLastVisible,
|
|
48
50
|
isNotVisible,
|
|
49
51
|
showBottomBorder,
|
|
52
|
+
scrollbarWidth,
|
|
53
|
+
gridHasFiller,
|
|
50
54
|
onClick,
|
|
51
55
|
onDoubleClick,
|
|
52
56
|
onMouseEnter,
|
|
@@ -66,14 +70,11 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
66
70
|
const editRowsState = useGridSelector(apiRef, gridEditRowsStateSelector);
|
|
67
71
|
const handleRef = useForkRef(ref, refProp);
|
|
68
72
|
const rowNode = apiRef.current.getRowNode(rowId);
|
|
69
|
-
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
70
|
-
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
71
73
|
const editing = apiRef.current.getRowMode(rowId) === GridRowModes.Edit;
|
|
72
74
|
const editable = rootProps.editMode === GridEditModes.Row;
|
|
73
|
-
const hasColumnVirtualization = useGridSelector(apiRef, gridVirtualizationColumnEnabledSelector);
|
|
74
75
|
const hasFocusCell = focusedColumnIndex !== undefined;
|
|
75
|
-
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex <
|
|
76
|
-
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >=
|
|
76
|
+
const hasVirtualFocusCellLeft = hasFocusCell && focusedColumnIndex >= pinnedColumns.left.length && focusedColumnIndex < firstColumnIndex;
|
|
77
|
+
const hasVirtualFocusCellRight = hasFocusCell && focusedColumnIndex < visibleColumns.length - pinnedColumns.right.length && focusedColumnIndex >= lastColumnIndex;
|
|
77
78
|
const classes = composeGridClasses(rootProps.classes, {
|
|
78
79
|
root: ['row', selected && 'selected', editable && 'row--editable', editing && 'row--editing', isFirstVisible && 'row--firstVisible', isLastVisible && 'row--lastVisible', showBottomBorder && 'row--borderBottom', rowHeight === 'auto' && 'row--dynamicHeight']
|
|
79
80
|
});
|
|
@@ -189,14 +190,14 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
189
190
|
});
|
|
190
191
|
rowClassNames.push(rootProps.getRowClassName(rowParams));
|
|
191
192
|
}
|
|
192
|
-
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition =
|
|
193
|
+
const getCell = (column, indexInSection, indexRelativeToAllColumns, sectionLength, pinnedPosition = PinnedColumnPosition.NONE) => {
|
|
193
194
|
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
194
195
|
if (cellColSpanInfo?.spannedByColSpan) {
|
|
195
196
|
return null;
|
|
196
197
|
}
|
|
197
198
|
const width = cellColSpanInfo?.cellProps.width ?? column.computedWidth;
|
|
198
199
|
const colSpan = cellColSpanInfo?.cellProps.colSpan ?? 1;
|
|
199
|
-
const pinnedOffset = getPinnedCellOffset(
|
|
200
|
+
const pinnedOffset = getPinnedCellOffset(pinnedPosition, column.computedWidth, indexRelativeToAllColumns, columnPositions, columnsTotalWidth, scrollbarWidth);
|
|
200
201
|
if (rowNode?.type === 'skeletonRow') {
|
|
201
202
|
return /*#__PURE__*/_jsx(slots.skeletonCell, {
|
|
202
203
|
type: column.type,
|
|
@@ -215,7 +216,9 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
215
216
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
216
217
|
const canReorderRow = rowReordering && !sortModel.length && treeDepth <= 1 && !isEditingRows;
|
|
217
218
|
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow);
|
|
218
|
-
const cellIsNotVisible = pinnedPosition ===
|
|
219
|
+
const cellIsNotVisible = pinnedPosition === PinnedColumnPosition.VIRTUAL;
|
|
220
|
+
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
221
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
219
222
|
return /*#__PURE__*/_jsx(slots.cell, _extends({
|
|
220
223
|
column: column,
|
|
221
224
|
width: width,
|
|
@@ -228,9 +231,8 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
228
231
|
isNotVisible: cellIsNotVisible,
|
|
229
232
|
pinnedOffset: pinnedOffset,
|
|
230
233
|
pinnedPosition: pinnedPosition,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
gridHasFiller: gridHasFiller
|
|
234
|
+
showLeftBorder: showLeftBorder,
|
|
235
|
+
showRightBorder: showRightBorder
|
|
234
236
|
}, slotProps?.cell), column.field);
|
|
235
237
|
};
|
|
236
238
|
|
|
@@ -241,25 +243,16 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
241
243
|
}
|
|
242
244
|
const leftCells = pinnedColumns.left.map((column, i) => {
|
|
243
245
|
const indexRelativeToAllColumns = i;
|
|
244
|
-
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length,
|
|
246
|
+
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.left.length, PinnedColumnPosition.LEFT);
|
|
245
247
|
});
|
|
246
248
|
const rightCells = pinnedColumns.right.map((column, i) => {
|
|
247
249
|
const indexRelativeToAllColumns = visibleColumns.length - pinnedColumns.right.length + i;
|
|
248
|
-
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length,
|
|
250
|
+
return getCell(column, i, indexRelativeToAllColumns, pinnedColumns.right.length, PinnedColumnPosition.RIGHT);
|
|
249
251
|
});
|
|
250
252
|
const middleColumnsLength = visibleColumns.length - pinnedColumns.left.length - pinnedColumns.right.length;
|
|
251
253
|
const cells = [];
|
|
252
254
|
if (hasVirtualFocusCellLeft) {
|
|
253
|
-
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength,
|
|
254
|
-
}
|
|
255
|
-
let firstColumnIndex;
|
|
256
|
-
let lastColumnIndex;
|
|
257
|
-
if (!rootProps.disableVirtualization && !hasColumnVirtualization) {
|
|
258
|
-
firstColumnIndex = 0;
|
|
259
|
-
lastColumnIndex = visibleColumns.length;
|
|
260
|
-
} else {
|
|
261
|
-
firstColumnIndex = renderContext.firstColumnIndex;
|
|
262
|
-
lastColumnIndex = renderContext.lastColumnIndex;
|
|
255
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
|
|
263
256
|
}
|
|
264
257
|
for (let i = firstColumnIndex; i < lastColumnIndex; i += 1) {
|
|
265
258
|
const column = visibleColumns[i];
|
|
@@ -270,7 +263,7 @@ const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
|
270
263
|
cells.push(getCell(column, indexInSection, i, middleColumnsLength));
|
|
271
264
|
}
|
|
272
265
|
if (hasVirtualFocusCellRight) {
|
|
273
|
-
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength,
|
|
266
|
+
cells.push(getCell(visibleColumns[focusedColumnIndex], focusedColumnIndex - pinnedColumns.left.length, focusedColumnIndex, middleColumnsLength, PinnedColumnPosition.VIRTUAL));
|
|
274
267
|
}
|
|
275
268
|
const eventHandlers = row ? {
|
|
276
269
|
onClick: publishClick,
|
|
@@ -307,48 +300,14 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
307
300
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
308
301
|
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
309
302
|
// ----------------------------------------------------------------------
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
columnsTotalWidth: PropTypes.number.isRequired,
|
|
313
|
-
contentSize: PropTypes.shape({
|
|
314
|
-
height: PropTypes.number.isRequired,
|
|
315
|
-
width: PropTypes.number.isRequired
|
|
316
|
-
}).isRequired,
|
|
317
|
-
groupHeaderHeight: PropTypes.number.isRequired,
|
|
318
|
-
hasScrollX: PropTypes.bool.isRequired,
|
|
319
|
-
hasScrollY: PropTypes.bool.isRequired,
|
|
320
|
-
headerFilterHeight: PropTypes.number.isRequired,
|
|
321
|
-
headerHeight: PropTypes.number.isRequired,
|
|
322
|
-
headersTotalHeight: PropTypes.number.isRequired,
|
|
323
|
-
isReady: PropTypes.bool.isRequired,
|
|
324
|
-
leftPinnedWidth: PropTypes.number.isRequired,
|
|
325
|
-
minimumSize: PropTypes.shape({
|
|
326
|
-
height: PropTypes.number.isRequired,
|
|
327
|
-
width: PropTypes.number.isRequired
|
|
328
|
-
}).isRequired,
|
|
329
|
-
rightPinnedWidth: PropTypes.number.isRequired,
|
|
330
|
-
root: PropTypes.shape({
|
|
331
|
-
height: PropTypes.number.isRequired,
|
|
332
|
-
width: PropTypes.number.isRequired
|
|
333
|
-
}).isRequired,
|
|
334
|
-
rowHeight: PropTypes.number.isRequired,
|
|
335
|
-
rowWidth: PropTypes.number.isRequired,
|
|
336
|
-
scrollbarSize: PropTypes.number.isRequired,
|
|
337
|
-
topContainerHeight: PropTypes.number.isRequired,
|
|
338
|
-
viewportInnerSize: PropTypes.shape({
|
|
339
|
-
height: PropTypes.number.isRequired,
|
|
340
|
-
width: PropTypes.number.isRequired
|
|
341
|
-
}).isRequired,
|
|
342
|
-
viewportOuterSize: PropTypes.shape({
|
|
343
|
-
height: PropTypes.number.isRequired,
|
|
344
|
-
width: PropTypes.number.isRequired
|
|
345
|
-
}).isRequired
|
|
346
|
-
}).isRequired,
|
|
303
|
+
columnsTotalWidth: PropTypes.number.isRequired,
|
|
304
|
+
firstColumnIndex: PropTypes.number.isRequired,
|
|
347
305
|
/**
|
|
348
306
|
* Determines which cell has focus.
|
|
349
307
|
* If `null`, no cell in this row has focus.
|
|
350
308
|
*/
|
|
351
309
|
focusedColumnIndex: PropTypes.number,
|
|
310
|
+
gridHasFiller: PropTypes.bool.isRequired,
|
|
352
311
|
/**
|
|
353
312
|
* Index of the row in the whole sorted and filtered dataset.
|
|
354
313
|
* If some rows above have expanded children, this index also take those children into account.
|
|
@@ -357,6 +316,7 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
357
316
|
isFirstVisible: PropTypes.bool.isRequired,
|
|
358
317
|
isLastVisible: PropTypes.bool.isRequired,
|
|
359
318
|
isNotVisible: PropTypes.bool.isRequired,
|
|
319
|
+
lastColumnIndex: PropTypes.number.isRequired,
|
|
360
320
|
offsetLeft: PropTypes.number.isRequired,
|
|
361
321
|
offsetTop: PropTypes.number,
|
|
362
322
|
onClick: PropTypes.func,
|
|
@@ -364,22 +324,12 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
364
324
|
onMouseEnter: PropTypes.func,
|
|
365
325
|
onMouseLeave: PropTypes.func,
|
|
366
326
|
pinnedColumns: PropTypes.object.isRequired,
|
|
367
|
-
renderContext: PropTypes.shape({
|
|
368
|
-
firstColumnIndex: PropTypes.number.isRequired,
|
|
369
|
-
firstRowIndex: PropTypes.number.isRequired,
|
|
370
|
-
lastColumnIndex: PropTypes.number.isRequired,
|
|
371
|
-
lastRowIndex: PropTypes.number.isRequired
|
|
372
|
-
}).isRequired,
|
|
373
327
|
row: PropTypes.object.isRequired,
|
|
374
328
|
rowHeight: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number]).isRequired,
|
|
375
329
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
330
|
+
scrollbarWidth: PropTypes.number.isRequired,
|
|
376
331
|
selected: PropTypes.bool.isRequired,
|
|
377
332
|
showBottomBorder: PropTypes.bool.isRequired,
|
|
378
|
-
/**
|
|
379
|
-
* Determines which cell should be tabbable by having tabIndex=0.
|
|
380
|
-
* If `null`, no cell in this row is in the tab sequence.
|
|
381
|
-
*/
|
|
382
|
-
tabbableCell: PropTypes.string,
|
|
383
333
|
visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
384
334
|
} : void 0;
|
|
385
335
|
const MemoizedGridRow = fastMemo(GridRow);
|
|
@@ -4,15 +4,19 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import useForkRef from '@mui/utils/useForkRef';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
7
8
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
9
10
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
10
|
-
import {
|
|
11
|
+
import { gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
|
|
12
|
+
import { PinnedColumnPosition } from "../internals/constants.js";
|
|
11
13
|
import { getDataGridUtilityClass, gridClasses } from "../constants/gridClasses.js";
|
|
12
14
|
import { getPinnedCellOffset } from "../internals/utils/getPinnedCellOffset.js";
|
|
13
15
|
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../utils/cellBorderUtils.js";
|
|
14
16
|
import { escapeOperandAttributeSelector } from "../utils/domUtils.js";
|
|
15
17
|
import { GridScrollbarFillerCell } from "./GridScrollbarFillerCell.js";
|
|
18
|
+
import { rtlFlipSide } from "../utils/rtlFlipSide.js";
|
|
19
|
+
import { attachPinnedStyle } from "../internals/utils/index.js";
|
|
16
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
21
|
const SkeletonOverlay = styled('div', {
|
|
18
22
|
name: 'MuiDataGrid',
|
|
@@ -40,6 +44,7 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
40
44
|
const {
|
|
41
45
|
slots
|
|
42
46
|
} = rootProps;
|
|
47
|
+
const isRtl = useRtl();
|
|
43
48
|
const classes = useUtilityClasses({
|
|
44
49
|
classes: rootProps.classes
|
|
45
50
|
});
|
|
@@ -55,18 +60,12 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
55
60
|
const allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
|
56
61
|
const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);
|
|
57
62
|
const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
|
|
58
|
-
const getPinnedStyle = React.useCallback((computedWidth, index, position) => {
|
|
59
|
-
const pinnedOffset = getPinnedCellOffset(position, computedWidth, index, positions, dimensions);
|
|
60
|
-
return {
|
|
61
|
-
[position]: pinnedOffset
|
|
62
|
-
};
|
|
63
|
-
}, [dimensions, positions]);
|
|
64
63
|
const getPinnedPosition = React.useCallback(field => {
|
|
65
64
|
if (pinnedColumns.left.findIndex(col => col.field === field) !== -1) {
|
|
66
|
-
return
|
|
65
|
+
return PinnedColumnPosition.LEFT;
|
|
67
66
|
}
|
|
68
67
|
if (pinnedColumns.right.findIndex(col => col.field === field) !== -1) {
|
|
69
|
-
return
|
|
68
|
+
return PinnedColumnPosition.RIGHT;
|
|
70
69
|
}
|
|
71
70
|
return undefined;
|
|
72
71
|
}, [pinnedColumns.left, pinnedColumns.right]);
|
|
@@ -77,13 +76,15 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
77
76
|
for (let colIndex = 0; colIndex < columns.length; colIndex += 1) {
|
|
78
77
|
const column = columns[colIndex];
|
|
79
78
|
const pinnedPosition = getPinnedPosition(column.field);
|
|
80
|
-
const isPinnedLeft = pinnedPosition ===
|
|
81
|
-
const isPinnedRight = pinnedPosition ===
|
|
82
|
-
const
|
|
79
|
+
const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
80
|
+
const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
81
|
+
const pinnedSide = rtlFlipSide(pinnedPosition, isRtl);
|
|
82
|
+
const sectionLength = pinnedSide ? pinnedColumns[pinnedSide].length // pinned section
|
|
83
83
|
: columns.length - pinnedColumns.left.length - pinnedColumns.right.length; // middle section
|
|
84
|
-
const sectionIndex =
|
|
84
|
+
const sectionIndex = pinnedSide ? pinnedColumns[pinnedSide].findIndex(col => col.field === column.field) // pinned section
|
|
85
85
|
: colIndex - pinnedColumns.left.length; // middle section
|
|
86
|
-
const
|
|
86
|
+
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
87
|
+
const pinnedStyle = attachPinnedStyle({}, isRtl, pinnedPosition, getPinnedCellOffset(pinnedPosition, column.computedWidth, colIndex, positions, dimensions.columnsTotalWidth, scrollbarWidth));
|
|
87
88
|
const gridHasFiller = dimensions.columnsTotalWidth < dimensions.viewportOuterSize.width;
|
|
88
89
|
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
89
90
|
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, sectionIndex);
|
|
@@ -97,7 +98,6 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
97
98
|
width: emptyCellWidth,
|
|
98
99
|
empty: true
|
|
99
100
|
}, `skeleton-filler-column-${i}`);
|
|
100
|
-
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
101
101
|
const hasScrollbarFiller = isLastColumn && scrollbarWidth !== 0;
|
|
102
102
|
if (hasFillerBefore) {
|
|
103
103
|
rowCells.push(emptyCell);
|
|
@@ -129,7 +129,7 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
129
129
|
}, `skeleton-row-${i}`));
|
|
130
130
|
}
|
|
131
131
|
return array;
|
|
132
|
-
}, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions
|
|
132
|
+
}, [slots, columns, pinnedColumns, skeletonRowsCount, rootProps.showCellVerticalBorder, dimensions, positions, getPinnedPosition, isRtl]);
|
|
133
133
|
|
|
134
134
|
// Sync the column resize of the overlay columns with the grid
|
|
135
135
|
const handleColumnResize = params => {
|
|
@@ -143,8 +143,8 @@ const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverla
|
|
|
143
143
|
}
|
|
144
144
|
const resizedColIndex = columns.findIndex(col => col.field === colDef.field);
|
|
145
145
|
const pinnedPosition = getPinnedPosition(colDef.field);
|
|
146
|
-
const isPinnedLeft = pinnedPosition ===
|
|
147
|
-
const isPinnedRight = pinnedPosition ===
|
|
146
|
+
const isPinnedLeft = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
147
|
+
const isPinnedRight = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
148
148
|
const currentWidth = getComputedStyle(cells[0]).getPropertyValue('--width');
|
|
149
149
|
const delta = parseInt(currentWidth, 10) - width;
|
|
150
150
|
if (cells) {
|
|
@@ -2,12 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { GridRowId, GridEditCellProps } from '../../models';
|
|
3
3
|
import { GridColDef, GridAlignment } from '../../models/colDef/gridColDef';
|
|
4
4
|
import { GridPinnedColumnPosition } from '../../hooks/features/columns/gridColumnsInterfaces';
|
|
5
|
-
|
|
6
|
-
NONE = 0,
|
|
7
|
-
LEFT = 1,
|
|
8
|
-
RIGHT = 2,
|
|
9
|
-
VIRTUAL = 3
|
|
10
|
-
}
|
|
5
|
+
import { PinnedColumnPosition } from '../../internals/constants';
|
|
11
6
|
export declare const gridPinnedColumnPositionLookup: {
|
|
12
7
|
1: GridPinnedColumnPosition;
|
|
13
8
|
2: GridPinnedColumnPosition;
|
|
@@ -25,11 +20,10 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
25
20
|
disableDragEvents?: boolean;
|
|
26
21
|
isNotVisible: boolean;
|
|
27
22
|
editCellState: GridEditCellProps<any> | null;
|
|
28
|
-
pinnedOffset
|
|
29
|
-
pinnedPosition:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
gridHasFiller: boolean;
|
|
23
|
+
pinnedOffset?: number;
|
|
24
|
+
pinnedPosition: PinnedColumnPosition;
|
|
25
|
+
showRightBorder: boolean;
|
|
26
|
+
showLeftBorder: boolean;
|
|
33
27
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
34
28
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
35
29
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
@@ -58,11 +52,10 @@ declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> |
|
|
|
58
52
|
disableDragEvents?: boolean;
|
|
59
53
|
isNotVisible: boolean;
|
|
60
54
|
editCellState: GridEditCellProps<any> | null;
|
|
61
|
-
pinnedOffset
|
|
62
|
-
pinnedPosition:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
gridHasFiller: boolean;
|
|
55
|
+
pinnedOffset?: number;
|
|
56
|
+
pinnedPosition: PinnedColumnPosition;
|
|
57
|
+
showRightBorder: boolean;
|
|
58
|
+
showLeftBorder: boolean;
|
|
66
59
|
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
67
60
|
onDoubleClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
68
61
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "
|
|
3
|
+
const _excluded = ["column", "rowId", "editCellState", "align", "children", "colIndex", "width", "className", "style", "colSpan", "disableDragEvents", "isNotVisible", "pinnedOffset", "pinnedPosition", "showRightBorder", "showLeftBorder", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onMouseOver", "onKeyDown", "onKeyUp", "onDragEnter", "onDragOver"],
|
|
4
4
|
_excluded2 = ["changeReason", "unstable_updateValueOnRender"];
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
@@ -16,22 +16,16 @@ import { useGridSelector, objectShallowCompare } from "../../hooks/utils/useGrid
|
|
|
16
16
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
17
17
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
18
18
|
import { gridFocusCellSelector } from "../../hooks/features/focus/gridFocusStateSelector.js";
|
|
19
|
-
import { shouldCellShowLeftBorder, shouldCellShowRightBorder } from "../../utils/cellBorderUtils.js";
|
|
20
19
|
import { GridPinnedColumnPosition } from "../../hooks/features/columns/gridColumnsInterfaces.js";
|
|
20
|
+
import { PinnedColumnPosition } from "../../internals/constants.js";
|
|
21
21
|
import { gridRowSpanningHiddenCellsSelector, gridRowSpanningSpannedCellsSelector } from "../../hooks/features/rows/gridRowSpanningSelectors.js";
|
|
22
|
+
import { attachPinnedStyle } from "../../internals/utils/index.js";
|
|
22
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
export let PinnedPosition = /*#__PURE__*/function (PinnedPosition) {
|
|
24
|
-
PinnedPosition[PinnedPosition["NONE"] = 0] = "NONE";
|
|
25
|
-
PinnedPosition[PinnedPosition["LEFT"] = 1] = "LEFT";
|
|
26
|
-
PinnedPosition[PinnedPosition["RIGHT"] = 2] = "RIGHT";
|
|
27
|
-
PinnedPosition[PinnedPosition["VIRTUAL"] = 3] = "VIRTUAL";
|
|
28
|
-
return PinnedPosition;
|
|
29
|
-
}({});
|
|
30
24
|
export const gridPinnedColumnPositionLookup = {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
25
|
+
[PinnedColumnPosition.LEFT]: GridPinnedColumnPosition.LEFT,
|
|
26
|
+
[PinnedColumnPosition.RIGHT]: GridPinnedColumnPosition.RIGHT,
|
|
27
|
+
[PinnedColumnPosition.NONE]: undefined,
|
|
28
|
+
[PinnedColumnPosition.VIRTUAL]: undefined
|
|
35
29
|
};
|
|
36
30
|
const EMPTY_CELL_PARAMS = {
|
|
37
31
|
id: -1,
|
|
@@ -69,7 +63,7 @@ const useUtilityClasses = ownerState => {
|
|
|
69
63
|
classes
|
|
70
64
|
} = ownerState;
|
|
71
65
|
const slots = {
|
|
72
|
-
root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition ===
|
|
66
|
+
root: ['cell', `cell--text${capitalize(align)}`, isSelected && 'selected', isEditable && 'cell--editable', showLeftBorder && 'cell--withLeftBorder', showRightBorder && 'cell--withRightBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'cell--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'cell--pinnedRight', isSelectionMode && !isEditable && 'cell--selectionMode']
|
|
73
67
|
};
|
|
74
68
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
75
69
|
};
|
|
@@ -92,9 +86,8 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
92
86
|
isNotVisible,
|
|
93
87
|
pinnedOffset,
|
|
94
88
|
pinnedPosition,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
gridHasFiller,
|
|
89
|
+
showRightBorder,
|
|
90
|
+
showLeftBorder,
|
|
98
91
|
onClick,
|
|
99
92
|
onDoubleClick,
|
|
100
93
|
onMouseDown,
|
|
@@ -161,9 +154,6 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
161
154
|
const handleRef = useForkRef(ref, cellRef);
|
|
162
155
|
const focusElementRef = React.useRef(null);
|
|
163
156
|
const isSelectionMode = rootProps.cellSelection ?? false;
|
|
164
|
-
const position = gridPinnedColumnPositionLookup[pinnedPosition];
|
|
165
|
-
const showLeftBorder = shouldCellShowLeftBorder(position, sectionIndex);
|
|
166
|
-
const showRightBorder = shouldCellShowRightBorder(position, sectionIndex, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
167
157
|
const ownerState = {
|
|
168
158
|
align,
|
|
169
159
|
showLeftBorder,
|
|
@@ -212,18 +202,11 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
212
202
|
border: 0
|
|
213
203
|
};
|
|
214
204
|
}
|
|
215
|
-
const cellStyle = _extends({
|
|
205
|
+
const cellStyle = attachPinnedStyle(_extends({
|
|
216
206
|
'--width': `${width}px`
|
|
217
|
-
}, styleProp);
|
|
218
|
-
const isLeftPinned = pinnedPosition ===
|
|
219
|
-
const isRightPinned = pinnedPosition ===
|
|
220
|
-
if (isLeftPinned || isRightPinned) {
|
|
221
|
-
let side = isLeftPinned ? 'left' : 'right';
|
|
222
|
-
if (isRtl) {
|
|
223
|
-
side = isLeftPinned ? 'right' : 'left';
|
|
224
|
-
}
|
|
225
|
-
cellStyle[side] = pinnedOffset;
|
|
226
|
-
}
|
|
207
|
+
}, styleProp), isRtl, pinnedPosition, pinnedOffset);
|
|
208
|
+
const isLeftPinned = pinnedPosition === PinnedColumnPosition.LEFT;
|
|
209
|
+
const isRightPinned = pinnedPosition === PinnedColumnPosition.RIGHT;
|
|
227
210
|
if (rowSpan > 1) {
|
|
228
211
|
cellStyle.height = `calc(var(--height) * ${rowSpan})`;
|
|
229
212
|
cellStyle.zIndex = 5;
|
|
@@ -353,13 +336,12 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
353
336
|
isValidating: PropTypes.bool,
|
|
354
337
|
value: PropTypes.any
|
|
355
338
|
}),
|
|
356
|
-
gridHasFiller: PropTypes.bool.isRequired,
|
|
357
339
|
isNotVisible: PropTypes.bool.isRequired,
|
|
358
|
-
pinnedOffset: PropTypes.number
|
|
340
|
+
pinnedOffset: PropTypes.number,
|
|
359
341
|
pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]).isRequired,
|
|
360
342
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
361
|
-
|
|
362
|
-
|
|
343
|
+
showLeftBorder: PropTypes.bool.isRequired,
|
|
344
|
+
showRightBorder: PropTypes.bool.isRequired,
|
|
363
345
|
width: PropTypes.number.isRequired
|
|
364
346
|
} : void 0;
|
|
365
347
|
const MemoizedGridCell = fastMemo(GridCell);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PinnedColumnPosition } from '../../internals/constants';
|
|
3
3
|
interface GridColumnGroupHeaderProps {
|
|
4
4
|
groupId: string | null;
|
|
5
5
|
width: number;
|
|
@@ -11,11 +11,11 @@ interface GridColumnGroupHeaderProps {
|
|
|
11
11
|
height: number;
|
|
12
12
|
hasFocus?: boolean;
|
|
13
13
|
tabIndex: 0 | -1;
|
|
14
|
-
pinnedPosition?: GridPinnedColumnPosition;
|
|
15
14
|
style?: React.CSSProperties;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
showLeftBorder: boolean;
|
|
16
|
+
showRightBorder: boolean;
|
|
17
|
+
pinnedPosition: PinnedColumnPosition | undefined;
|
|
18
|
+
pinnedOffset?: number;
|
|
19
19
|
}
|
|
20
20
|
declare function GridColumnGroupHeader(props: GridColumnGroupHeaderProps): React.JSX.Element;
|
|
21
21
|
export { GridColumnGroupHeader };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { unstable_useId as useId, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
4
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
4
5
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
5
6
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
6
7
|
import { gridColumnGroupsLookupSelector } from "../../hooks/features/columnGrouping/gridColumnGroupsSelector.js";
|
|
@@ -8,7 +9,8 @@ import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
|
8
9
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
9
10
|
import { GridGenericColumnHeaderItem } from "./GridGenericColumnHeaderItem.js";
|
|
10
11
|
import { isEventTargetInPortal } from "../../utils/domUtils.js";
|
|
11
|
-
import {
|
|
12
|
+
import { PinnedColumnPosition } from "../../internals/constants.js";
|
|
13
|
+
import { attachPinnedStyle } from "../../internals/utils/index.js";
|
|
12
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
const useUtilityClasses = ownerState => {
|
|
14
16
|
const {
|
|
@@ -22,7 +24,7 @@ const useUtilityClasses = ownerState => {
|
|
|
22
24
|
pinnedPosition
|
|
23
25
|
} = ownerState;
|
|
24
26
|
const slots = {
|
|
25
|
-
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition ===
|
|
27
|
+
root: ['columnHeader', headerAlign === 'left' && 'columnHeader--alignLeft', headerAlign === 'center' && 'columnHeader--alignCenter', headerAlign === 'right' && 'columnHeader--alignRight', isDragging && 'columnHeader--moving', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', 'withBorderColor', groupId === null ? 'columnHeader--emptyGroup' : 'columnHeader--filledGroup', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight', isLastColumn && 'columnHeader--last'],
|
|
26
28
|
draggableContainer: ['columnHeaderDraggableContainer'],
|
|
27
29
|
titleContainer: ['columnHeaderTitleContainer', 'withBorderColor'],
|
|
28
30
|
titleContainerContent: ['columnHeaderTitleContainerContent']
|
|
@@ -42,12 +44,10 @@ function GridColumnGroupHeader(props) {
|
|
|
42
44
|
tabIndex,
|
|
43
45
|
isLastColumn,
|
|
44
46
|
pinnedPosition,
|
|
45
|
-
|
|
46
|
-
indexInSection,
|
|
47
|
-
sectionLength,
|
|
48
|
-
gridHasFiller
|
|
47
|
+
pinnedOffset
|
|
49
48
|
} = props;
|
|
50
49
|
const rootProps = useGridRootProps();
|
|
50
|
+
const isRtl = useRtl();
|
|
51
51
|
const headerCellRef = React.useRef(null);
|
|
52
52
|
const apiRef = useGridApiContext();
|
|
53
53
|
const columnGroupsLookup = useGridSelector(apiRef, gridColumnGroupsLookupSelector);
|
|
@@ -72,12 +72,8 @@ function GridColumnGroupHeader(props) {
|
|
|
72
72
|
if (groupId && render) {
|
|
73
73
|
headerComponent = render(renderParams);
|
|
74
74
|
}
|
|
75
|
-
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
76
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
|
|
77
75
|
const ownerState = _extends({}, props, {
|
|
78
76
|
classes: rootProps.classes,
|
|
79
|
-
showLeftBorder,
|
|
80
|
-
showRightBorder,
|
|
81
77
|
headerAlign,
|
|
82
78
|
depth,
|
|
83
79
|
isDragging: false
|
|
@@ -110,6 +106,7 @@ function GridColumnGroupHeader(props) {
|
|
|
110
106
|
onBlur: publish('columnGroupHeaderBlur')
|
|
111
107
|
}), [publish]);
|
|
112
108
|
const headerClassName = typeof group.headerClassName === 'function' ? group.headerClassName(renderParams) : group.headerClassName;
|
|
109
|
+
const style = React.useMemo(() => attachPinnedStyle(_extends({}, props.style), isRtl, pinnedPosition, pinnedOffset), [pinnedPosition, pinnedOffset, props.style, isRtl]);
|
|
113
110
|
return /*#__PURE__*/_jsx(GridGenericColumnHeaderItem, _extends({
|
|
114
111
|
ref: headerCellRef,
|
|
115
112
|
classes: classes,
|
|
@@ -5,8 +5,8 @@ export interface ColumnHeaderFilterIconButtonProps {
|
|
|
5
5
|
counter?: number;
|
|
6
6
|
onClick?: (params: GridColumnHeaderParams, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
7
7
|
}
|
|
8
|
-
declare function
|
|
9
|
-
declare namespace
|
|
8
|
+
declare function GridColumnHeaderFilterIconButtonWrapped(props: ColumnHeaderFilterIconButtonProps): React.JSX.Element | null;
|
|
9
|
+
declare namespace GridColumnHeaderFilterIconButtonWrapped {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|
|
12
|
-
export { GridColumnHeaderFilterIconButton };
|
|
12
|
+
export { GridColumnHeaderFilterIconButtonWrapped as GridColumnHeaderFilterIconButton };
|