@mui/x-data-grid 8.0.0-alpha.1 → 8.0.0-alpha.11
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 +2007 -230
- package/DataGrid/DataGrid.js +20 -38
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +3 -3
- package/DataGrid/useDataGridProps.js +3 -3
- package/README.md +1 -1
- package/colDef/gridDateOperators.d.ts +2 -1
- package/colDef/gridNumericOperators.d.ts +4 -1
- package/components/GridApiContext.js +2 -0
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridConfigurationContext.js +2 -0
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridHeaders.js +2 -2
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +10 -8
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +7 -4
- package/components/GridRow.d.ts +6 -11
- package/components/GridRow.js +60 -88
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridScrollArea.d.ts +5 -2
- package/components/GridScrollArea.js +33 -24
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +23 -21
- package/components/base/GridOverlays.d.ts +4 -3
- package/components/base/GridOverlays.js +2 -24
- package/components/base/index.d.ts +0 -1
- package/components/base/index.js +1 -2
- package/components/cell/GridActionsCell.js +8 -1
- package/components/cell/GridActionsCellItem.d.ts +17 -10
- package/components/cell/GridActionsCellItem.js +9 -8
- package/components/cell/GridCell.d.ts +19 -23
- package/components/cell/GridCell.js +49 -92
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +73 -4
- package/components/cell/GridEditSingleSelectCell.js +2 -2
- package/components/cell/GridSkeletonCell.js +1 -2
- package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- 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 -7
- package/components/columnHeaders/GridColumnHeaderItem.d.ts +5 -5
- package/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/components/columnsManagement/GridColumnsManagement.d.ts +1 -1
- package/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +2 -2
- package/components/containers/GridRoot.js +29 -17
- package/components/containers/GridRootStyles.js +163 -53
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/components/panel/GridColumnsPanel.js +1 -2
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +5 -3
- package/components/panel/GridPanelContent.js +7 -3
- package/components/panel/GridPanelFooter.d.ts +1 -1
- package/components/panel/GridPanelFooter.js +4 -3
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +4 -11
- package/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -3
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +3 -9
- package/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/panel/filterPanel/index.d.ts +2 -2
- package/components/panel/filterPanel/index.js +1 -2
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +11 -5
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/components/toolbar/GridToolbarFilterButton.d.ts +3 -1
- package/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/components/toolbar/GridToolbarQuickFilter.d.ts +6 -2
- package/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/components/virtualization/GridMainContainer.d.ts +13 -1
- package/components/virtualization/GridMainContainer.js +14 -5
- package/components/virtualization/GridVirtualScrollbar.d.ts +5 -1
- package/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/components/virtualization/GridVirtualScroller.js +43 -21
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/constants/dataGridPropsDefaultValues.js +2 -4
- package/constants/gridClasses.d.ts +12 -12
- package/constants/gridClasses.js +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.js +2 -1
- package/constants/localeTextConstants.js +1 -1
- package/constants/signature.d.ts +9 -0
- package/constants/signature.js +10 -0
- package/context/GridContextProvider.d.ts +2 -1
- package/context/GridRootPropsContext.js +2 -0
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +9 -2
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +2 -2
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +25 -9
- package/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/hooks/core/strategyProcessing/useGridRegisterStrategyProcessor.d.ts +2 -2
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +5 -8
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/hooks/core/useGridApiInitialization.d.ts +2 -2
- package/hooks/core/useGridApiInitialization.js +3 -3
- 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/core/useGridStateInitialization.js +6 -5
- package/hooks/features/clipboard/useGridClipboard.d.ts +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +4 -4
- package/hooks/features/columnGrouping/useGridColumnGrouping.d.ts +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +5 -7
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
- package/hooks/features/columnMenu/useGridColumnMenu.d.ts +2 -2
- package/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/hooks/features/columnResize/columnResizeSelector.d.ts +1 -1
- package/hooks/features/columnResize/gridColumnResizeApi.d.ts +6 -0
- package/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/hooks/features/columnResize/useGridColumnResize.d.ts +2 -2
- package/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/hooks/features/columns/gridColumnsSelector.d.ts +11 -16
- package/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/hooks/features/columns/gridColumnsUtils.d.ts +4 -4
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/columns/useGridColumnSpanning.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.d.ts +2 -2
- package/hooks/features/columns/useGridColumns.js +9 -4
- package/hooks/features/density/densitySelector.d.ts +1 -1
- package/hooks/features/density/useGridDensity.d.ts +2 -2
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +0 -4
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +16 -0
- package/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/hooks/features/dimensions/index.d.ts +1 -1
- package/hooks/features/dimensions/index.js +1 -2
- package/hooks/features/dimensions/useGridDimensions.d.ts +2 -2
- package/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/hooks/features/editing/gridEditingSelectors.d.ts +10 -0
- package/hooks/features/editing/gridEditingSelectors.js +12 -1
- package/hooks/features/editing/useGridCellEditing.d.ts +2 -2
- package/hooks/features/editing/useGridCellEditing.js +4 -4
- package/hooks/features/editing/useGridEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.d.ts +2 -2
- package/hooks/features/editing/useGridRowEditing.js +10 -11
- 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/useGridPrintExport.js +1 -1
- package/hooks/features/export/utils.d.ts +2 -2
- package/hooks/features/filter/gridFilterSelector.d.ts +17 -17
- package/hooks/features/filter/gridFilterSelector.js +8 -2
- package/hooks/features/filter/gridFilterState.d.ts +8 -3
- package/hooks/features/filter/gridFilterState.js +5 -0
- 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/filter/useGridFilter.js +10 -15
- package/hooks/features/focus/gridFocusStateSelector.d.ts +8 -8
- package/hooks/features/focus/useGridFocus.d.ts +2 -2
- package/hooks/features/focus/useGridFocus.js +3 -2
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/useGridHeaderFiltering.d.ts +2 -2
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +2 -2
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/hooks/features/keyboardNavigation/utils.d.ts +3 -4
- package/hooks/features/keyboardNavigation/utils.js +0 -5
- package/hooks/features/listView/gridListViewSelectors.d.ts +3 -1
- package/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/hooks/features/listView/index.d.ts +1 -0
- package/hooks/features/listView/index.js +1 -0
- package/hooks/features/listView/useGridListView.d.ts +2 -2
- package/hooks/features/listView/useGridListView.js +2 -1
- package/hooks/features/overlays/useGridOverlays.d.ts +7 -4
- package/hooks/features/overlays/useGridOverlays.js +23 -3
- package/hooks/features/pagination/gridPaginationInterfaces.d.ts +3 -0
- package/hooks/features/pagination/gridPaginationSelector.d.ts +34 -9
- package/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/hooks/features/pagination/gridPaginationUtils.js +1 -1
- package/hooks/features/pagination/useGridPagination.d.ts +3 -3
- package/hooks/features/pagination/useGridPagination.js +6 -4
- 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/gridRowSelectionSelector.d.ts +3 -3
- package/hooks/features/rowSelection/useGridRowSelection.d.ts +2 -2
- package/hooks/features/rowSelection/useGridRowSelection.js +11 -18
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.d.ts +2 -2
- package/hooks/features/rowSelection/utils.d.ts +4 -3
- package/hooks/features/rowSelection/utils.js +4 -4
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +3 -3
- package/hooks/features/rows/gridRowSpanningUtils.d.ts +2 -2
- package/hooks/features/rows/gridRowsInterfaces.d.ts +1 -8
- package/hooks/features/rows/gridRowsMetaState.d.ts +8 -0
- package/hooks/features/rows/gridRowsSelector.d.ts +23 -13
- package/hooks/features/rows/gridRowsSelector.js +1 -2
- package/hooks/features/rows/gridRowsUtils.d.ts +3 -7
- package/hooks/features/rows/gridRowsUtils.js +0 -25
- package/hooks/features/rows/index.d.ts +1 -1
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -2
- package/hooks/features/rows/useGridParamsApi.js +33 -14
- package/hooks/features/rows/useGridRowSpanning.d.ts +2 -2
- package/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +27 -29
- package/hooks/features/rows/useGridRowsMeta.d.ts +2 -2
- package/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/hooks/features/rows/useGridRowsPreProcessors.d.ts +2 -2
- package/hooks/features/scroll/useGridScroll.d.ts +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +10 -5
- package/hooks/features/sorting/gridSortingSelector.js +21 -9
- package/hooks/features/sorting/gridSortingUtils.d.ts +3 -3
- package/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/hooks/features/sorting/index.d.ts +2 -1
- package/hooks/features/sorting/index.js +1 -1
- package/hooks/features/sorting/useGridSorting.d.ts +2 -2
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/statePersistence/useGridStatePersistence.d.ts +2 -2
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +6 -0
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +5 -5
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +21 -6
- package/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
- package/hooks/features/virtualization/useGridVirtualization.d.ts +2 -2
- package/hooks/utils/index.d.ts +1 -1
- package/hooks/utils/index.js +1 -1
- package/hooks/utils/useGridApiContext.d.ts +2 -2
- package/hooks/utils/useGridApiEventHandler.d.ts +9 -19
- package/hooks/utils/useGridApiEventHandler.js +68 -75
- package/hooks/utils/useGridApiMethod.d.ts +2 -2
- package/hooks/utils/useGridApiRef.d.ts +2 -2
- package/hooks/utils/useGridApiRef.js +1 -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 +5 -7
- package/hooks/utils/useGridSelector.js +29 -49
- package/hooks/utils/useGridVisibleRows.d.ts +8 -6
- package/hooks/utils/useGridVisibleRows.js +5 -28
- package/hooks/utils/useIsSSR.d.ts +1 -0
- package/hooks/utils/useIsSSR.js +5 -0
- package/index.js +1 -1
- package/internals/constants.d.ts +6 -0
- package/internals/constants.js +8 -1
- package/internals/index.d.ts +9 -5
- package/internals/index.js +7 -4
- 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 -1
- package/internals/utils/index.js +2 -2
- package/internals/utils/propValidation.js +1 -1
- package/locales/arSD.js +2 -1
- package/locales/beBY.js +1 -1
- package/locales/bgBG.js +2 -1
- package/locales/csCZ.js +2 -1
- package/locales/daDK.js +2 -1
- package/locales/deDE.js +12 -13
- package/locales/elGR.js +2 -1
- package/locales/esES.js +12 -13
- package/locales/faIR.js +7 -7
- package/locales/fiFI.js +2 -1
- package/locales/frFR.js +2 -1
- package/locales/heIL.js +16 -17
- package/locales/hrHR.js +2 -1
- package/locales/huHU.js +2 -1
- package/locales/isIS.js +2 -1
- package/locales/itIT.js +2 -1
- package/locales/jaJP.js +2 -1
- package/locales/koKR.js +46 -49
- package/locales/nbNO.js +2 -1
- package/locales/nlNL.js +7 -7
- package/locales/nnNO.js +2 -1
- package/locales/plPL.js +2 -1
- package/locales/ptBR.js +12 -13
- package/locales/ptPT.js +12 -13
- package/locales/roRO.js +20 -21
- package/locales/ruRU.js +2 -1
- package/locales/skSK.js +2 -1
- package/locales/svSE.js +2 -1
- package/locales/trTR.js +14 -15
- package/locales/ukUA.js +2 -1
- package/locales/urPK.js +11 -11
- package/locales/viVN.js +2 -1
- package/locales/zhCN.js +12 -13
- package/locales/zhHK.js +2 -1
- package/locales/zhTW.js +2 -1
- package/material/index.js +58 -7
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCoreApi.d.ts +7 -7
- package/models/api/gridDensityApi.d.ts +1 -1
- package/models/api/gridLocaleTextApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +29 -2
- package/models/api/gridStateApi.d.ts +2 -1
- package/models/api/index.d.ts +1 -1
- package/models/api/index.js +0 -1
- package/models/colDef/gridColDef.d.ts +34 -33
- package/models/controlStateItem.d.ts +2 -2
- package/models/events/gridEventLookup.d.ts +13 -1
- package/models/gridBaseSlots.d.ts +95 -0
- package/models/gridDataSource.d.ts +1 -1
- package/models/gridExport.d.ts +2 -2
- package/models/gridFilterInputComponent.d.ts +32 -0
- package/models/gridFilterOperator.d.ts +6 -4
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponent.d.ts +16 -1
- package/models/gridSlotsComponentsProps.d.ts +45 -9
- package/models/gridStateCommunity.d.ts +4 -0
- package/models/index.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +12 -24
- package/modern/DataGrid/DataGrid.js +20 -38
- package/modern/DataGrid/useDataGridComponent.js +3 -3
- package/modern/DataGrid/useDataGridProps.js +3 -3
- package/modern/components/GridApiContext.js +2 -0
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridConfigurationContext.js +2 -0
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridHeaders.js +2 -2
- package/modern/components/GridLoadingOverlay.js +10 -8
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +7 -4
- package/modern/components/GridRow.js +60 -88
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridScrollArea.js +33 -24
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +23 -21
- package/modern/components/base/GridOverlays.js +2 -24
- package/modern/components/base/index.js +1 -2
- package/modern/components/cell/GridActionsCell.js +8 -1
- package/modern/components/cell/GridActionsCellItem.js +9 -8
- package/modern/components/cell/GridCell.js +49 -92
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +73 -4
- package/modern/components/cell/GridEditSingleSelectCell.js +2 -2
- package/modern/components/cell/GridSkeletonCell.js +1 -2
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +20 -7
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +11 -9
- package/modern/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/modern/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/containers/GridRootStyles.js +163 -53
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +6 -11
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/modern/components/panel/GridColumnsPanel.js +1 -2
- package/modern/components/panel/GridPanel.js +5 -3
- package/modern/components/panel/GridPanelContent.js +7 -3
- package/modern/components/panel/GridPanelFooter.js +4 -3
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +41 -31
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +50 -31
- package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +63 -38
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/panel/filterPanel/index.js +1 -2
- package/modern/components/toolbar/GridToolbar.js +11 -5
- package/modern/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/modern/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/modern/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/modern/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/modern/components/virtualization/GridMainContainer.js +14 -5
- package/modern/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/modern/components/virtualization/GridVirtualScroller.js +43 -21
- package/modern/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/constants/dataGridPropsDefaultValues.js +2 -4
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/index.js +2 -1
- package/modern/constants/localeTextConstants.js +1 -1
- package/modern/constants/signature.js +10 -0
- package/modern/context/GridRootPropsContext.js +2 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/modern/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +5 -1
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/modern/hooks/core/useGridApiInitialization.js +3 -3
- package/modern/hooks/core/useGridStateInitialization.js +6 -5
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -78
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/modern/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/modern/hooks/features/columns/gridColumnsSelector.js +0 -12
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/columns/useGridColumns.js +9 -4
- package/modern/hooks/features/dimensions/gridDimensionsSelectors.js +26 -1
- package/modern/hooks/features/dimensions/index.js +1 -2
- package/modern/hooks/features/dimensions/useGridDimensions.js +104 -98
- package/modern/hooks/features/editing/gridEditingSelectors.js +12 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +4 -4
- package/modern/hooks/features/editing/useGridRowEditing.js +10 -11
- package/modern/hooks/features/export/useGridPrintExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterSelector.js +8 -2
- package/modern/hooks/features/filter/gridFilterState.js +5 -0
- package/modern/hooks/features/filter/gridFilterUtils.js +3 -3
- package/modern/hooks/features/filter/useGridFilter.js +10 -15
- package/modern/hooks/features/focus/useGridFocus.js +3 -2
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -16
- package/modern/hooks/features/keyboardNavigation/utils.js +0 -5
- package/modern/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/modern/hooks/features/listView/index.js +1 -0
- package/modern/hooks/features/listView/useGridListView.js +2 -1
- package/modern/hooks/features/overlays/useGridOverlays.js +23 -3
- package/modern/hooks/features/pagination/gridPaginationSelector.js +39 -1
- package/modern/hooks/features/pagination/gridPaginationUtils.js +1 -1
- package/modern/hooks/features/pagination/useGridPagination.js +6 -4
- 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/rowSelection/useGridRowSelection.js +11 -18
- package/modern/hooks/features/rowSelection/utils.js +4 -4
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -2
- package/modern/hooks/features/rows/gridRowsUtils.js +0 -25
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridParamsApi.js +33 -14
- package/modern/hooks/features/rows/useGridRowSpanning.js +97 -86
- package/modern/hooks/features/rows/useGridRows.js +27 -29
- package/modern/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/modern/hooks/features/sorting/gridSortingSelector.js +21 -9
- package/modern/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/modern/hooks/features/sorting/index.js +1 -1
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +33 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +209 -118
- package/modern/hooks/utils/index.js +1 -1
- package/modern/hooks/utils/useGridApiEventHandler.js +68 -75
- package/modern/hooks/utils/useGridApiRef.js +1 -1
- package/modern/hooks/utils/useGridSelector.js +29 -49
- package/modern/hooks/utils/useGridVisibleRows.js +5 -28
- package/modern/hooks/utils/useIsSSR.js +5 -0
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +8 -1
- package/modern/internals/index.js +7 -4
- package/modern/internals/utils/attachPinnedStyle.js +9 -0
- package/modern/internals/utils/getPinnedCellOffset.js +6 -7
- package/modern/internals/utils/index.js +2 -2
- package/modern/internals/utils/propValidation.js +1 -1
- package/modern/locales/arSD.js +2 -1
- package/modern/locales/beBY.js +1 -1
- package/modern/locales/bgBG.js +2 -1
- package/modern/locales/csCZ.js +2 -1
- package/modern/locales/daDK.js +2 -1
- package/modern/locales/deDE.js +12 -13
- package/modern/locales/elGR.js +2 -1
- package/modern/locales/esES.js +12 -13
- package/modern/locales/faIR.js +7 -7
- package/modern/locales/fiFI.js +2 -1
- package/modern/locales/frFR.js +2 -1
- package/modern/locales/heIL.js +16 -17
- package/modern/locales/hrHR.js +2 -1
- package/modern/locales/huHU.js +2 -1
- package/modern/locales/isIS.js +2 -1
- package/modern/locales/itIT.js +2 -1
- package/modern/locales/jaJP.js +2 -1
- package/modern/locales/koKR.js +46 -49
- package/modern/locales/nbNO.js +2 -1
- package/modern/locales/nlNL.js +7 -7
- package/modern/locales/nnNO.js +2 -1
- package/modern/locales/plPL.js +2 -1
- package/modern/locales/ptBR.js +12 -13
- package/modern/locales/ptPT.js +12 -13
- package/modern/locales/roRO.js +20 -21
- package/modern/locales/ruRU.js +2 -1
- package/modern/locales/skSK.js +2 -1
- package/modern/locales/svSE.js +2 -1
- package/modern/locales/trTR.js +14 -15
- package/modern/locales/ukUA.js +2 -1
- package/modern/locales/urPK.js +11 -11
- package/modern/locales/viVN.js +2 -1
- package/modern/locales/zhCN.js +12 -13
- package/modern/locales/zhHK.js +2 -1
- package/modern/locales/zhTW.js +2 -1
- package/modern/material/index.js +58 -7
- package/modern/models/api/index.js +0 -1
- package/modern/models/gridBaseSlots.js +1 -0
- package/modern/models/gridFilterInputComponent.js +1 -0
- package/modern/utils/assert.js +3 -0
- package/modern/utils/cellBorderUtils.js +5 -5
- package/modern/utils/createSelector.js +1 -120
- package/modern/utils/domUtils.js +7 -2
- package/modern/utils/isJSDOM.js +1 -0
- package/modern/utils/roundToDecimalPlaces.js +3 -0
- package/modern/utils/rtlFlipSide.js +22 -0
- package/modern/utils/utils.js +6 -1
- package/node/DataGrid/DataGrid.js +18 -36
- package/node/DataGrid/useDataGridComponent.js +3 -3
- package/node/DataGrid/useDataGridProps.js +2 -2
- package/node/components/GridApiContext.js +1 -0
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridConfigurationContext.js +1 -0
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridHeaders.js +2 -2
- package/node/components/GridLoadingOverlay.js +10 -8
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +7 -4
- package/node/components/GridRow.js +56 -85
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridScrollArea.js +32 -24
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +23 -21
- package/node/components/base/GridOverlays.js +2 -24
- package/node/components/base/index.js +0 -11
- package/node/components/cell/GridActionsCell.js +8 -1
- package/node/components/cell/GridActionsCellItem.js +7 -8
- package/node/components/cell/GridCell.js +48 -91
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +73 -4
- package/node/components/cell/GridEditSingleSelectCell.js +2 -2
- package/node/components/cell/GridSkeletonCell.js +1 -2
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnGroupHeader.js +7 -10
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +19 -6
- package/node/components/columnHeaders/GridColumnHeaderItem.js +13 -12
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +10 -8
- package/node/components/columnSelection/GridHeaderCheckbox.js +17 -9
- package/node/components/columnsManagement/GridColumnsManagement.js +50 -27
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +27 -15
- package/node/components/containers/GridRootStyles.js +163 -53
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +8 -4
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.js +5 -10
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +13 -22
- package/node/components/panel/GridColumnsPanel.js +1 -2
- package/node/components/panel/GridPanel.js +5 -3
- package/node/components/panel/GridPanelContent.js +7 -3
- package/node/components/panel/GridPanelFooter.js +5 -4
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +22 -18
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +42 -33
- package/node/components/panel/filterPanel/GridFilterInputDate.js +49 -30
- package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +49 -24
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +55 -33
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +34 -25
- package/node/components/panel/filterPanel/GridFilterInputValue.js +62 -37
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/panel/filterPanel/index.js +7 -23
- package/node/components/toolbar/GridToolbar.js +11 -5
- package/node/components/toolbar/GridToolbarColumnsButton.js +12 -6
- package/node/components/toolbar/GridToolbarDensitySelector.js +9 -11
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +6 -6
- package/node/components/toolbar/GridToolbarFilterButton.js +20 -9
- package/node/components/toolbar/GridToolbarQuickFilter.js +39 -31
- package/node/components/virtualization/GridMainContainer.js +14 -5
- package/node/components/virtualization/GridVirtualScrollbar.js +17 -17
- package/node/components/virtualization/GridVirtualScroller.js +43 -21
- package/node/components/virtualization/GridVirtualScrollerContent.js +15 -6
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/constants/dataGridPropsDefaultValues.js +2 -4
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/index.js +11 -0
- package/node/constants/localeTextConstants.js +1 -1
- package/node/constants/signature.js +16 -0
- package/node/context/GridRootPropsContext.js +1 -0
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +7 -5
- package/node/hooks/core/strategyProcessing/gridStrategyProcessingApi.js +7 -1
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +7 -8
- package/node/hooks/core/useGridApiInitialization.js +4 -4
- package/node/hooks/core/useGridStateInitialization.js +6 -5
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +37 -76
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +0 -2
- package/node/hooks/features/columnResize/gridColumnResizeApi.js +2 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +17 -10
- package/node/hooks/features/columns/gridColumnsSelector.js +1 -13
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/columns/useGridColumns.js +9 -4
- package/node/hooks/features/dimensions/gridDimensionsSelectors.js +38 -2
- package/node/hooks/features/dimensions/index.js +13 -11
- package/node/hooks/features/dimensions/useGridDimensions.js +102 -96
- package/node/hooks/features/editing/gridEditingSelectors.js +12 -2
- package/node/hooks/features/editing/useGridCellEditing.js +3 -3
- package/node/hooks/features/editing/useGridRowEditing.js +8 -9
- package/node/hooks/features/export/useGridPrintExport.js +1 -1
- package/node/hooks/features/filter/gridFilterSelector.js +8 -2
- package/node/hooks/features/filter/gridFilterState.js +6 -1
- package/node/hooks/features/filter/gridFilterUtils.js +3 -3
- package/node/hooks/features/filter/useGridFilter.js +9 -14
- package/node/hooks/features/focus/useGridFocus.js +3 -2
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +24 -15
- package/node/hooks/features/keyboardNavigation/utils.js +0 -6
- package/node/hooks/features/listView/gridListViewSelectors.js +3 -1
- package/node/hooks/features/listView/index.js +16 -0
- package/node/hooks/features/listView/useGridListView.js +2 -1
- package/node/hooks/features/overlays/useGridOverlays.js +25 -3
- package/node/hooks/features/pagination/gridPaginationSelector.js +41 -3
- package/node/hooks/features/pagination/gridPaginationUtils.js +2 -2
- package/node/hooks/features/pagination/useGridPagination.js +6 -4
- 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/rowSelection/useGridRowSelection.js +12 -19
- package/node/hooks/features/rowSelection/utils.js +5 -5
- package/node/hooks/features/rows/gridRowsSelector.js +2 -3
- package/node/hooks/features/rows/gridRowsUtils.js +0 -26
- package/node/hooks/features/rows/index.js +0 -7
- package/node/hooks/features/rows/useGridParamsApi.js +33 -14
- package/node/hooks/features/rows/useGridRowSpanning.js +95 -84
- package/node/hooks/features/rows/useGridRows.js +27 -29
- package/node/hooks/features/rows/useGridRowsMeta.js +36 -19
- package/node/hooks/features/sorting/gridSortingSelector.js +22 -10
- package/node/hooks/features/sorting/gridSortingUtils.js +2 -2
- package/node/hooks/features/sorting/index.js +24 -16
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/gridFocusedVirtualCellSelector.js +40 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +210 -119
- package/node/hooks/utils/index.js +21 -11
- package/node/hooks/utils/useGridApiEventHandler.js +71 -78
- package/node/hooks/utils/useGridApiRef.js +1 -1
- package/node/hooks/utils/useGridSelector.js +31 -52
- package/node/hooks/utils/useGridVisibleRows.js +3 -28
- package/node/hooks/utils/useIsSSR.js +12 -0
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -2
- package/node/internals/index.js +57 -27
- package/node/internals/utils/attachPinnedStyle.js +15 -0
- package/node/internals/utils/getPinnedCellOffset.js +6 -7
- package/node/internals/utils/index.js +11 -11
- package/node/internals/utils/propValidation.js +2 -2
- package/node/locales/arSD.js +2 -1
- package/node/locales/beBY.js +1 -1
- package/node/locales/bgBG.js +2 -1
- package/node/locales/csCZ.js +2 -1
- package/node/locales/daDK.js +2 -1
- package/node/locales/deDE.js +12 -13
- package/node/locales/elGR.js +2 -1
- package/node/locales/esES.js +12 -13
- package/node/locales/faIR.js +7 -7
- package/node/locales/fiFI.js +2 -1
- package/node/locales/frFR.js +2 -1
- package/node/locales/heIL.js +16 -17
- package/node/locales/hrHR.js +2 -1
- package/node/locales/huHU.js +2 -1
- package/node/locales/isIS.js +2 -1
- package/node/locales/itIT.js +2 -1
- package/node/locales/jaJP.js +2 -1
- package/node/locales/koKR.js +46 -49
- package/node/locales/nbNO.js +2 -1
- package/node/locales/nlNL.js +7 -7
- package/node/locales/nnNO.js +2 -1
- package/node/locales/plPL.js +2 -1
- package/node/locales/ptBR.js +12 -13
- package/node/locales/ptPT.js +12 -13
- package/node/locales/roRO.js +20 -21
- package/node/locales/ruRU.js +2 -1
- package/node/locales/skSK.js +2 -1
- package/node/locales/svSE.js +2 -1
- package/node/locales/trTR.js +14 -15
- package/node/locales/ukUA.js +2 -1
- package/node/locales/urPK.js +11 -11
- package/node/locales/viVN.js +2 -1
- package/node/locales/zhCN.js +12 -13
- package/node/locales/zhHK.js +2 -1
- package/node/locales/zhTW.js +2 -1
- package/node/material/index.js +59 -7
- package/node/models/api/index.js +0 -11
- package/node/models/gridFilterInputComponent.js +5 -0
- package/node/utils/assert.js +9 -0
- package/node/utils/cellBorderUtils.js +5 -5
- package/node/utils/createSelector.js +4 -125
- package/node/utils/domUtils.js +7 -2
- package/node/utils/isJSDOM.js +7 -0
- package/node/utils/roundToDecimalPlaces.js +9 -0
- package/node/utils/rtlFlipSide.js +29 -0
- package/node/utils/utils.js +8 -1
- package/package.json +4 -3
- package/themeAugmentation/overrides.d.ts +10 -5
- package/utils/assert.d.ts +2 -0
- package/utils/assert.js +3 -0
- package/utils/cellBorderUtils.d.ts +3 -3
- package/utils/cellBorderUtils.js +5 -5
- package/utils/createSelector.d.ts +7 -19
- package/utils/createSelector.js +1 -120
- 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/keyboardUtils.d.ts +1 -1
- package/utils/roundToDecimalPlaces.d.ts +1 -0
- package/utils/roundToDecimalPlaces.js +3 -0
- package/utils/rtlFlipSide.d.ts +2 -0
- package/utils/rtlFlipSide.js +22 -0
- package/utils/utils.d.ts +1 -0
- package/utils/utils.js +6 -1
- package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +0 -11
- package/internals/utils/useProps.d.ts +0 -1
- package/internals/utils/useProps.js +0 -24
- package/joy/icons.d.ts +0 -32
- package/joy/icons.js +0 -431
- package/joy/index.d.ts +0 -2
- package/joy/index.js +0 -2
- package/joy/joySlots.d.ts +0 -3
- package/joy/joySlots.js +0 -389
- package/joy/package.json +0 -6
- package/modern/internals/utils/useProps.js +0 -24
- package/modern/joy/icons.js +0 -431
- package/modern/joy/index.js +0 -2
- package/modern/joy/joySlots.js +0 -389
- package/node/internals/utils/useProps.js +0 -30
- package/node/joy/icons.js +0 -439
- package/node/joy/index.js +0 -13
- package/node/joy/joySlots.js +0 -397
- /package/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
- /package/{modern/components/panel/filterPanel/GridFilterInputValueProps.js → models/gridFilterInputComponent.js} +0 -0
- /package/node/{components/panel/filterPanel/GridFilterInputValueProps.js → models/gridBaseSlots.js} +0 -0
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
gridDateComparator: true,
|
|
8
|
-
gridNumberComparator: true,
|
|
9
|
-
gridStringOrNumberComparator: true
|
|
10
|
-
};
|
|
11
6
|
Object.defineProperty(exports, "gridDateComparator", {
|
|
12
7
|
enumerable: true,
|
|
13
8
|
get: function () {
|
|
@@ -20,6 +15,30 @@ Object.defineProperty(exports, "gridNumberComparator", {
|
|
|
20
15
|
return _gridSortingUtils.gridNumberComparator;
|
|
21
16
|
}
|
|
22
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "gridSortColumnLookupSelector", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _gridSortingSelector.gridSortColumnLookupSelector;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "gridSortModelSelector", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _gridSortingSelector.gridSortModelSelector;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "gridSortedRowEntriesSelector", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _gridSortingSelector.gridSortedRowEntriesSelector;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "gridSortedRowIdsSelector", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _gridSortingSelector.gridSortedRowIdsSelector;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
23
42
|
Object.defineProperty(exports, "gridStringOrNumberComparator", {
|
|
24
43
|
enumerable: true,
|
|
25
44
|
get: function () {
|
|
@@ -27,15 +46,4 @@ Object.defineProperty(exports, "gridStringOrNumberComparator", {
|
|
|
27
46
|
}
|
|
28
47
|
});
|
|
29
48
|
var _gridSortingSelector = require("./gridSortingSelector");
|
|
30
|
-
Object.keys(_gridSortingSelector).forEach(function (key) {
|
|
31
|
-
if (key === "default" || key === "__esModule") return;
|
|
32
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
33
|
-
if (key in exports && exports[key] === _gridSortingSelector[key]) return;
|
|
34
|
-
Object.defineProperty(exports, key, {
|
|
35
|
-
enumerable: true,
|
|
36
|
-
get: function () {
|
|
37
|
-
return _gridSortingSelector[key];
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
49
|
var _gridSortingUtils = require("./gridSortingUtils");
|
|
@@ -97,7 +97,7 @@ const useGridSorting = (apiRef, props) => {
|
|
|
97
97
|
})
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
const sortModel = (0, _gridSortingSelector.gridSortModelSelector)(state, apiRef.current.instanceId);
|
|
100
|
+
const sortModel = (0, _gridSortingSelector.gridSortModelSelector)(state, undefined, apiRef.current.instanceId);
|
|
101
101
|
const sortRowList = (0, _gridSortingUtils.buildAggregatedSortingApplier)(sortModel, apiRef);
|
|
102
102
|
const sortedRows = apiRef.current.applyStrategyProcessor('sorting', {
|
|
103
103
|
sortRowList
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.gridFocusedVirtualCellSelector = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _reselect = require("reselect");
|
|
10
|
+
var _createSelector = require("../../../utils/createSelector");
|
|
11
|
+
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
12
|
+
var _gridVirtualizationSelectors = require("./gridVirtualizationSelectors");
|
|
13
|
+
var _focus = require("../focus");
|
|
14
|
+
var _pagination = require("../pagination");
|
|
15
|
+
const gridIsFocusedCellOutOfContext = (0, _reselect.createSelector)(_focus.gridFocusCellSelector, _gridVirtualizationSelectors.gridRenderContextSelector, _pagination.gridVisibleRowsSelector, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector, (focusedCell, renderContext, currentPage, visibleColumns) => {
|
|
16
|
+
if (!focusedCell) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
const rowIndex = currentPage.rowIdToIndexMap.get(focusedCell.id);
|
|
20
|
+
const columnIndex = visibleColumns.slice(renderContext.firstColumnIndex, renderContext.lastColumnIndex).findIndex(column => column.field === focusedCell.field);
|
|
21
|
+
const isInRenderContext = rowIndex !== undefined && columnIndex !== -1 && rowIndex >= renderContext.firstRowIndex && rowIndex <= renderContext.lastRowIndex;
|
|
22
|
+
return !isInRenderContext;
|
|
23
|
+
});
|
|
24
|
+
const gridFocusedVirtualCellSelector = exports.gridFocusedVirtualCellSelector = (0, _createSelector.createSelectorMemoized)(gridIsFocusedCellOutOfContext, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector, _pagination.gridVisibleRowsSelector, _focus.gridFocusCellSelector, (isFocusedCellOutOfRenderContext, visibleColumns, currentPage, focusedCell) => {
|
|
25
|
+
if (!isFocusedCellOutOfRenderContext) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const rowIndex = currentPage.rowIdToIndexMap.get(focusedCell.id);
|
|
29
|
+
if (rowIndex === undefined) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const columnIndex = visibleColumns.findIndex(column => column.field === focusedCell.field);
|
|
33
|
+
if (columnIndex === -1) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return (0, _extends2.default)({}, focusedCell, {
|
|
37
|
+
rowIndex,
|
|
38
|
+
columnIndex
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -15,16 +15,15 @@ var ReactDOM = _interopRequireWildcard(require("react-dom"));
|
|
|
15
15
|
var _utils = require("@mui/utils");
|
|
16
16
|
var _useLazyRef = _interopRequireDefault(require("@mui/utils/useLazyRef"));
|
|
17
17
|
var _useTimeout = _interopRequireDefault(require("@mui/utils/useTimeout"));
|
|
18
|
-
var _useResizeObserver = require("@mui/x-internals/useResizeObserver");
|
|
19
18
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
19
|
+
var _reactMajor = _interopRequireDefault(require("@mui/x-internals/reactMajor"));
|
|
20
|
+
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
20
21
|
var _useGridPrivateApiContext = require("../../utils/useGridPrivateApiContext");
|
|
21
22
|
var _useGridRootProps = require("../../utils/useGridRootProps");
|
|
22
23
|
var _useGridSelector = require("../../utils/useGridSelector");
|
|
23
24
|
var _useRunOnce = require("../../utils/useRunOnce");
|
|
24
25
|
var _gridColumnsSelector = require("../columns/gridColumnsSelector");
|
|
25
|
-
var _gridDimensionsSelectors = require("../dimensions/gridDimensionsSelectors");
|
|
26
26
|
var _gridRowsSelector = require("../rows/gridRowsSelector");
|
|
27
|
-
var _gridFocusStateSelector = require("../focus/gridFocusStateSelector");
|
|
28
27
|
var _useGridVisibleRows = require("../../utils/useGridVisibleRows");
|
|
29
28
|
var _utils2 = require("../../utils");
|
|
30
29
|
var platform = _interopRequireWildcard(require("../../../utils/platform"));
|
|
@@ -37,6 +36,10 @@ var _useGridVirtualization = require("./useGridVirtualization");
|
|
|
37
36
|
var _gridRowSpanningSelectors = require("../rows/gridRowSpanningSelectors");
|
|
38
37
|
var _gridListViewSelectors = require("../listView/gridListViewSelectors");
|
|
39
38
|
var _gridRowsUtils = require("../rows/gridRowsUtils");
|
|
39
|
+
var _columns = require("../columns");
|
|
40
|
+
var _gridFocusedVirtualCellSelector = require("./gridFocusedVirtualCellSelector");
|
|
41
|
+
var _roundToDecimalPlaces = require("../../../utils/roundToDecimalPlaces");
|
|
42
|
+
var _isJSDOM = require("../../../utils/isJSDOM");
|
|
40
43
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
41
44
|
const MINIMUM_COLUMN_WIDTH = 50;
|
|
42
45
|
var ScrollDirection = /*#__PURE__*/function (ScrollDirection) {
|
|
@@ -56,14 +59,6 @@ const createScrollCache = (isRtl, rowBufferPx, columnBufferPx, verticalBuffer, h
|
|
|
56
59
|
direction: ScrollDirection.NONE,
|
|
57
60
|
buffer: bufferForDirection(isRtl, ScrollDirection.NONE, rowBufferPx, columnBufferPx, verticalBuffer, horizontalBuffer)
|
|
58
61
|
});
|
|
59
|
-
let isJSDOM = false;
|
|
60
|
-
try {
|
|
61
|
-
if (typeof window !== 'undefined') {
|
|
62
|
-
isJSDOM = /jsdom/.test(window.navigator.userAgent);
|
|
63
|
-
}
|
|
64
|
-
} catch (_) {
|
|
65
|
-
/* ignore */
|
|
66
|
-
}
|
|
67
62
|
const useGridVirtualScroller = () => {
|
|
68
63
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
69
64
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
@@ -71,33 +66,70 @@ const useGridVirtualScroller = () => {
|
|
|
71
66
|
unstable_listView: listView
|
|
72
67
|
} = rootProps;
|
|
73
68
|
const visibleColumns = (0, _useGridSelector.useGridSelector)(apiRef, () => listView ? [(0, _gridListViewSelectors.gridListColumnSelector)(apiRef.current.state)] : (0, _gridColumnsSelector.gridVisibleColumnDefinitionsSelector)(apiRef));
|
|
74
|
-
const enabledForRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationRowEnabledSelector) && !isJSDOM;
|
|
75
|
-
const enabledForColumns = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationColumnEnabledSelector) && !isJSDOM;
|
|
76
|
-
const dimensions = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridDimensionsSelector);
|
|
77
|
-
const outerSize = dimensions.viewportOuterSize;
|
|
69
|
+
const enabledForRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationRowEnabledSelector) && !_isJSDOM.isJSDOM;
|
|
70
|
+
const enabledForColumns = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridVirtualizationColumnEnabledSelector) && !_isJSDOM.isJSDOM;
|
|
78
71
|
const pinnedRows = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridPinnedRowsSelector);
|
|
79
|
-
const pinnedColumnDefinitions = (0,
|
|
80
|
-
const pinnedColumns = listView ?
|
|
81
|
-
left: [],
|
|
82
|
-
right: []
|
|
83
|
-
} : pinnedColumnDefinitions;
|
|
72
|
+
const pinnedColumnDefinitions = (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef);
|
|
73
|
+
const pinnedColumns = listView ? _columns.EMPTY_PINNED_COLUMN_FIELDS : pinnedColumnDefinitions;
|
|
84
74
|
const hasBottomPinnedRows = pinnedRows.bottom.length > 0;
|
|
85
75
|
const [panels, setPanels] = React.useState(EMPTY_DETAIL_PANELS);
|
|
86
76
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
87
|
-
const cellFocus = (0, _useGridSelector.useGridSelector)(apiRef, _gridFocusStateSelector.gridFocusCellSelector);
|
|
88
|
-
const cellTabIndex = (0, _useGridSelector.useGridSelector)(apiRef, _gridFocusStateSelector.gridTabIndexCellSelector);
|
|
89
|
-
const rowsMeta = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsMetaSelector.gridRowsMetaSelector);
|
|
90
77
|
const selectedRowsLookup = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowSelectionSelector.selectedIdsLookupSelector);
|
|
91
|
-
const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef
|
|
92
|
-
const gridRootRef = apiRef.current.rootElementRef;
|
|
78
|
+
const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef);
|
|
93
79
|
const mainRef = apiRef.current.mainElementRef;
|
|
94
80
|
const scrollerRef = apiRef.current.virtualScrollerRef;
|
|
95
81
|
const scrollbarVerticalRef = apiRef.current.virtualScrollbarVerticalRef;
|
|
96
82
|
const scrollbarHorizontalRef = apiRef.current.virtualScrollbarHorizontalRef;
|
|
97
|
-
const contentHeight = dimensions.contentSize.height;
|
|
98
|
-
const columnsTotalWidth = dimensions.columnsTotalWidth;
|
|
99
83
|
const hasColSpan = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridHasColSpanSelector);
|
|
100
|
-
|
|
84
|
+
const isRenderContextReady = React.useRef(false);
|
|
85
|
+
const rowHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridRowHeightSelector);
|
|
86
|
+
const contentHeight = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridContentHeightSelector);
|
|
87
|
+
const columnsTotalWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridColumnsTotalWidthSelector);
|
|
88
|
+
const needsHorizontalScrollbar = (0, _useGridSelector.useGridSelector)(apiRef, needsHorizontalScrollbarSelector);
|
|
89
|
+
const verticalScrollbarWidth = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridVerticalScrollbarWidthSelector);
|
|
90
|
+
const gridHasFiller = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridHasFillerSelector);
|
|
91
|
+
const previousSize = React.useRef(null);
|
|
92
|
+
const mainRefCallback = React.useCallback(node => {
|
|
93
|
+
mainRef.current = node;
|
|
94
|
+
if (!node) {
|
|
95
|
+
return undefined;
|
|
96
|
+
}
|
|
97
|
+
const initialRect = node.getBoundingClientRect();
|
|
98
|
+
let lastSize = {
|
|
99
|
+
width: (0, _roundToDecimalPlaces.roundToDecimalPlaces)(initialRect.width, 1),
|
|
100
|
+
height: (0, _roundToDecimalPlaces.roundToDecimalPlaces)(initialRect.height, 1)
|
|
101
|
+
};
|
|
102
|
+
if (!previousSize.current || lastSize.width !== previousSize.current.width && lastSize.height !== previousSize.current.height) {
|
|
103
|
+
previousSize.current = lastSize;
|
|
104
|
+
apiRef.current.publishEvent('resize', lastSize);
|
|
105
|
+
}
|
|
106
|
+
if (typeof ResizeObserver === 'undefined') {
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
const observer = new ResizeObserver(entries => {
|
|
110
|
+
const entry = entries[0];
|
|
111
|
+
if (!entry) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const newSize = {
|
|
115
|
+
width: (0, _roundToDecimalPlaces.roundToDecimalPlaces)(entry.contentRect.width, 1),
|
|
116
|
+
height: (0, _roundToDecimalPlaces.roundToDecimalPlaces)(entry.contentRect.height, 1)
|
|
117
|
+
};
|
|
118
|
+
if (newSize.width === lastSize.width && newSize.height === lastSize.height) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
apiRef.current.publishEvent('resize', newSize);
|
|
122
|
+
lastSize = newSize;
|
|
123
|
+
});
|
|
124
|
+
observer.observe(node);
|
|
125
|
+
if (_reactMajor.default >= 19) {
|
|
126
|
+
return () => {
|
|
127
|
+
mainRef.current = null;
|
|
128
|
+
observer.disconnect();
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
}, [apiRef, mainRef]);
|
|
101
133
|
|
|
102
134
|
/*
|
|
103
135
|
* Scroll context logic
|
|
@@ -114,17 +146,15 @@ const useGridVirtualScroller = () => {
|
|
|
114
146
|
* work that's not necessary. Thus we store the context at the start of the scroll in `frozenContext`, and the rows
|
|
115
147
|
* that are part of this old context will keep their same render context as to avoid re-rendering.
|
|
116
148
|
*/
|
|
117
|
-
const scrollPosition = React.useRef(EMPTY_SCROLL_POSITION);
|
|
149
|
+
const scrollPosition = React.useRef(rootProps.initialState?.scroll ?? EMPTY_SCROLL_POSITION);
|
|
150
|
+
const ignoreNextScrollEvent = React.useRef(false);
|
|
118
151
|
const previousContextScrollPosition = React.useRef(EMPTY_SCROLL_POSITION);
|
|
119
152
|
const previousRowContext = React.useRef(_useGridVirtualization.EMPTY_RENDER_CONTEXT);
|
|
120
153
|
const renderContext = (0, _useGridSelector.useGridSelector)(apiRef, _gridVirtualizationSelectors.gridRenderContextSelector);
|
|
154
|
+
const focusedVirtualCell = (0, _useGridSelector.useGridSelector)(apiRef, _gridFocusedVirtualCellSelector.gridFocusedVirtualCellSelector);
|
|
121
155
|
const scrollTimeout = (0, _useTimeout.default)();
|
|
122
156
|
const frozenContext = React.useRef(undefined);
|
|
123
|
-
const scrollCache = (0, _useLazyRef.default)(() => createScrollCache(isRtl, rootProps.rowBufferPx, rootProps.columnBufferPx,
|
|
124
|
-
const focusedCell = {
|
|
125
|
-
rowIndex: React.useMemo(() => cellFocus ? currentPage.rows.findIndex(row => row.id === cellFocus.id) : -1, [cellFocus, currentPage.rows]),
|
|
126
|
-
columnIndex: React.useMemo(() => cellFocus ? visibleColumns.findIndex(column => column.field === cellFocus.field) : -1, [cellFocus, visibleColumns])
|
|
127
|
-
};
|
|
157
|
+
const scrollCache = (0, _useLazyRef.default)(() => createScrollCache(isRtl, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6)).current;
|
|
128
158
|
const updateRenderContext = React.useCallback(nextRenderContext => {
|
|
129
159
|
if (areRenderContextsEqual(nextRenderContext, apiRef.current.state.virtualization.renderContext)) {
|
|
130
160
|
return;
|
|
@@ -139,18 +169,28 @@ const useGridVirtualScroller = () => {
|
|
|
139
169
|
});
|
|
140
170
|
|
|
141
171
|
// The lazy-loading hook is listening to `renderedRowsIntervalChange`,
|
|
142
|
-
// but only does something if
|
|
143
|
-
//
|
|
144
|
-
|
|
172
|
+
// but only does something if we already have a render context, because
|
|
173
|
+
// otherwise we would call an update directly on mount
|
|
174
|
+
const isReady = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state).isReady;
|
|
175
|
+
if (isReady && didRowsIntervalChange) {
|
|
145
176
|
previousRowContext.current = nextRenderContext;
|
|
146
177
|
apiRef.current.publishEvent('renderedRowsIntervalChange', nextRenderContext);
|
|
147
178
|
}
|
|
148
179
|
previousContextScrollPosition.current = scrollPosition.current;
|
|
149
|
-
}, [apiRef
|
|
180
|
+
}, [apiRef]);
|
|
150
181
|
const triggerUpdateRenderContext = (0, _utils.unstable_useEventCallback)(() => {
|
|
182
|
+
const scroller = scrollerRef.current;
|
|
183
|
+
if (!scroller) {
|
|
184
|
+
return undefined;
|
|
185
|
+
}
|
|
186
|
+
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
187
|
+
const maxScrollTop = Math.ceil(dimensions.minimumSize.height - dimensions.viewportOuterSize.height);
|
|
188
|
+
const maxScrollLeft = Math.ceil(dimensions.minimumSize.width - dimensions.viewportInnerSize.width);
|
|
189
|
+
|
|
190
|
+
// Clamp the scroll position to the viewport to avoid re-calculating the render context for scroll bounce
|
|
151
191
|
const newScroll = {
|
|
152
|
-
top:
|
|
153
|
-
left:
|
|
192
|
+
top: (0, _utils3.clamp)(scroller.scrollTop, 0, maxScrollTop),
|
|
193
|
+
left: isRtl ? (0, _utils3.clamp)(scroller.scrollLeft, -maxScrollLeft, 0) : (0, _utils3.clamp)(scroller.scrollLeft, 0, maxScrollLeft)
|
|
154
194
|
};
|
|
155
195
|
const dx = newScroll.left - scrollPosition.current.left;
|
|
156
196
|
const dy = newScroll.top - scrollPosition.current.top;
|
|
@@ -163,7 +203,7 @@ const useGridVirtualScroller = () => {
|
|
|
163
203
|
const columnScroll = Math.abs(scrollPosition.current.left - previousContextScrollPosition.current.left);
|
|
164
204
|
|
|
165
205
|
// PERF: use the computed minimum column width instead of a static one
|
|
166
|
-
const didCrossThreshold = rowScroll >=
|
|
206
|
+
const didCrossThreshold = rowScroll >= rowHeight || columnScroll >= MINIMUM_COLUMN_WIDTH;
|
|
167
207
|
const didChangeDirection = scrollCache.direction !== direction;
|
|
168
208
|
const shouldUpdate = didCrossThreshold || didChangeDirection;
|
|
169
209
|
if (!shouldUpdate) {
|
|
@@ -185,7 +225,7 @@ const useGridVirtualScroller = () => {
|
|
|
185
225
|
}
|
|
186
226
|
}
|
|
187
227
|
scrollCache.direction = direction;
|
|
188
|
-
scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx,
|
|
228
|
+
scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
|
|
189
229
|
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
190
230
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
191
231
|
|
|
@@ -197,36 +237,25 @@ const useGridVirtualScroller = () => {
|
|
|
197
237
|
return nextRenderContext;
|
|
198
238
|
});
|
|
199
239
|
const forceUpdateRenderContext = () => {
|
|
240
|
+
// skip update if dimensions are not ready and virtualization is enabled
|
|
241
|
+
if (!(0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state).isReady && (enabledForRows || enabledForColumns)) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
200
244
|
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
201
245
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
202
246
|
// Reset the frozen context when the render context changes, see the illustration in https://github.com/mui/mui-x/pull/12353
|
|
203
247
|
frozenContext.current = undefined;
|
|
204
248
|
updateRenderContext(nextRenderContext);
|
|
205
249
|
};
|
|
206
|
-
const handleScroll = (0, _utils.unstable_useEventCallback)(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
scrollLeft
|
|
210
|
-
} = event.currentTarget;
|
|
211
|
-
|
|
212
|
-
// On iOS and macOS, negative offsets are possible when swiping past the start
|
|
213
|
-
if (scrollTop < 0) {
|
|
250
|
+
const handleScroll = (0, _utils.unstable_useEventCallback)(() => {
|
|
251
|
+
if (ignoreNextScrollEvent.current) {
|
|
252
|
+
ignoreNextScrollEvent.current = false;
|
|
214
253
|
return;
|
|
215
254
|
}
|
|
216
|
-
if (!isRtl) {
|
|
217
|
-
if (scrollLeft < 0) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (isRtl) {
|
|
222
|
-
if (scrollLeft > 0) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
255
|
const nextRenderContext = triggerUpdateRenderContext();
|
|
227
256
|
apiRef.current.publishEvent('scrollPositionChange', {
|
|
228
|
-
top:
|
|
229
|
-
left:
|
|
257
|
+
top: scrollPosition.current.top,
|
|
258
|
+
left: scrollPosition.current.left,
|
|
230
259
|
renderContext: nextRenderContext
|
|
231
260
|
});
|
|
232
261
|
});
|
|
@@ -240,7 +269,12 @@ const useGridVirtualScroller = () => {
|
|
|
240
269
|
if (!params.rows && !currentPage.range) {
|
|
241
270
|
return [];
|
|
242
271
|
}
|
|
243
|
-
|
|
272
|
+
let baseRenderContext = renderContext;
|
|
273
|
+
if (params.renderContext) {
|
|
274
|
+
baseRenderContext = params.renderContext;
|
|
275
|
+
baseRenderContext.firstColumnIndex = renderContext.firstColumnIndex;
|
|
276
|
+
baseRenderContext.lastColumnIndex = renderContext.lastColumnIndex;
|
|
277
|
+
}
|
|
244
278
|
const isLastSection = !hasBottomPinnedRows && params.position === undefined || hasBottomPinnedRows && params.position === 'bottom';
|
|
245
279
|
const isPinnedSection = params.position !== undefined;
|
|
246
280
|
let rowIndexOffset;
|
|
@@ -262,14 +296,14 @@ const useGridVirtualScroller = () => {
|
|
|
262
296
|
const lastRowToRender = Math.min(baseRenderContext.lastRowIndex, rowModels.length);
|
|
263
297
|
const rowIndexes = params.rows ? (0, _utils3.range)(0, params.rows.length) : (0, _utils3.range)(firstRowToRender, lastRowToRender);
|
|
264
298
|
let virtualRowIndex = -1;
|
|
265
|
-
if (!isPinnedSection &&
|
|
266
|
-
if (
|
|
267
|
-
|
|
268
|
-
|
|
299
|
+
if (!isPinnedSection && focusedVirtualCell) {
|
|
300
|
+
if (focusedVirtualCell.rowIndex < firstRowToRender) {
|
|
301
|
+
rowIndexes.unshift(focusedVirtualCell.rowIndex);
|
|
302
|
+
virtualRowIndex = focusedVirtualCell.rowIndex;
|
|
269
303
|
}
|
|
270
|
-
if (
|
|
271
|
-
|
|
272
|
-
|
|
304
|
+
if (focusedVirtualCell.rowIndex > lastRowToRender) {
|
|
305
|
+
rowIndexes.push(focusedVirtualCell.rowIndex);
|
|
306
|
+
virtualRowIndex = focusedVirtualCell.rowIndex;
|
|
273
307
|
}
|
|
274
308
|
}
|
|
275
309
|
const rows = [];
|
|
@@ -309,7 +343,6 @@ const useGridVirtualScroller = () => {
|
|
|
309
343
|
});
|
|
310
344
|
}
|
|
311
345
|
}
|
|
312
|
-
const hasFocus = cellFocus?.id === id;
|
|
313
346
|
const baseRowHeight = !apiRef.current.rowHasAutoHeight(id) ? apiRef.current.unstable_getRowHeight(id) : 'auto';
|
|
314
347
|
let isSelected;
|
|
315
348
|
if (selectedRowsLookup[id] == null) {
|
|
@@ -334,39 +367,37 @@ const useGridVirtualScroller = () => {
|
|
|
334
367
|
isLastVisible = isLastVisibleInSection;
|
|
335
368
|
}
|
|
336
369
|
}
|
|
337
|
-
const isVirtualRow = rowIndexInPage === virtualRowIndex;
|
|
338
|
-
const isNotVisible = isVirtualRow;
|
|
339
|
-
let tabbableCell = null;
|
|
340
|
-
if (cellTabIndex !== null && cellTabIndex.id === id) {
|
|
341
|
-
const cellParams = apiRef.current.getCellParams(id, cellTabIndex.field);
|
|
342
|
-
tabbableCell = cellParams.cellMode === 'view' ? cellTabIndex.field : null;
|
|
343
|
-
}
|
|
344
370
|
let currentRenderContext = baseRenderContext;
|
|
345
|
-
if (
|
|
371
|
+
if (frozenContext.current && rowIndexInPage >= frozenContext.current.firstRowIndex && rowIndexInPage < frozenContext.current.lastRowIndex) {
|
|
346
372
|
currentRenderContext = frozenContext.current;
|
|
347
373
|
}
|
|
374
|
+
const isVirtualFocusRow = rowIndexInPage === virtualRowIndex;
|
|
375
|
+
const isVirtualFocusColumn = focusedVirtualCell?.rowIndex === rowIndex;
|
|
348
376
|
const offsetLeft = computeOffsetLeft(columnPositions, currentRenderContext, pinnedColumns.left.length);
|
|
349
377
|
const showBottomBorder = isLastVisibleInSection && params.position === 'top';
|
|
378
|
+
const firstColumnIndex = currentRenderContext.firstColumnIndex;
|
|
379
|
+
const lastColumnIndex = currentRenderContext.lastColumnIndex;
|
|
350
380
|
rows.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.row, (0, _extends2.default)({
|
|
351
381
|
row: model,
|
|
352
382
|
rowId: id,
|
|
353
383
|
index: rowIndex,
|
|
354
384
|
selected: isSelected,
|
|
355
|
-
offsetTop: params.rows ? undefined : rowsMeta.positions[rowIndexInPage],
|
|
356
385
|
offsetLeft: offsetLeft,
|
|
357
|
-
|
|
386
|
+
columnsTotalWidth: columnsTotalWidth,
|
|
358
387
|
rowHeight: baseRowHeight,
|
|
359
|
-
tabbableCell: tabbableCell,
|
|
360
388
|
pinnedColumns: pinnedColumns,
|
|
361
389
|
visibleColumns: visibleColumns,
|
|
362
|
-
|
|
363
|
-
|
|
390
|
+
firstColumnIndex: firstColumnIndex,
|
|
391
|
+
lastColumnIndex: lastColumnIndex,
|
|
392
|
+
focusedColumnIndex: isVirtualFocusColumn ? focusedVirtualCell.columnIndex : undefined,
|
|
364
393
|
isFirstVisible: isFirstVisible,
|
|
365
394
|
isLastVisible: isLastVisible,
|
|
366
|
-
isNotVisible:
|
|
367
|
-
showBottomBorder: showBottomBorder
|
|
395
|
+
isNotVisible: isVirtualFocusRow,
|
|
396
|
+
showBottomBorder: showBottomBorder,
|
|
397
|
+
scrollbarWidth: verticalScrollbarWidth,
|
|
398
|
+
gridHasFiller: gridHasFiller
|
|
368
399
|
}, rowProps), id));
|
|
369
|
-
if (
|
|
400
|
+
if (isVirtualFocusRow) {
|
|
370
401
|
return;
|
|
371
402
|
}
|
|
372
403
|
const panel = panels.get(id);
|
|
@@ -381,7 +412,6 @@ const useGridVirtualScroller = () => {
|
|
|
381
412
|
});
|
|
382
413
|
return rows;
|
|
383
414
|
};
|
|
384
|
-
const needsHorizontalScrollbar = outerSize.width && columnsTotalWidth > outerSize.width;
|
|
385
415
|
const scrollerStyle = React.useMemo(() => ({
|
|
386
416
|
overflowX: !needsHorizontalScrollbar || listView ? 'hidden' : undefined,
|
|
387
417
|
overflowY: rootProps.autoHeight ? 'hidden' : undefined
|
|
@@ -397,49 +427,92 @@ const useGridVirtualScroller = () => {
|
|
|
397
427
|
}
|
|
398
428
|
return size;
|
|
399
429
|
}, [columnsTotalWidth, contentHeight, needsHorizontalScrollbar]);
|
|
400
|
-
React.
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
404
|
-
// FIXME: Is this really necessary?
|
|
405
|
-
apiRef.current.resize();
|
|
406
|
-
}, [apiRef, rowsMeta.currentPageTotalHeight]);
|
|
407
|
-
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
408
|
-
// TODO a scroll reset should not be necessary
|
|
409
|
-
if (enabledForColumns) {
|
|
410
|
-
scrollerRef.current.scrollLeft = 0;
|
|
430
|
+
const onContentSizeApplied = React.useCallback(node => {
|
|
431
|
+
if (!node) {
|
|
432
|
+
return;
|
|
411
433
|
}
|
|
412
|
-
|
|
413
|
-
|
|
434
|
+
apiRef.current.publishEvent('virtualScrollerContentSizeChange', {
|
|
435
|
+
columnsTotalWidth,
|
|
436
|
+
contentHeight
|
|
437
|
+
});
|
|
438
|
+
}, [apiRef, columnsTotalWidth, contentHeight]);
|
|
439
|
+
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
440
|
+
if (!isRenderContextReady.current) {
|
|
441
|
+
return;
|
|
414
442
|
}
|
|
415
|
-
|
|
443
|
+
apiRef.current.updateRenderContext?.();
|
|
444
|
+
}, [apiRef, enabledForColumns, enabledForRows]);
|
|
416
445
|
(0, _utils.unstable_useEnhancedEffect)(() => {
|
|
417
446
|
if (listView) {
|
|
418
447
|
scrollerRef.current.scrollLeft = 0;
|
|
419
448
|
}
|
|
420
449
|
}, [listView, scrollerRef]);
|
|
421
|
-
(0, _useRunOnce.useRunOnce)(
|
|
422
|
-
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
423
|
-
const initialRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
424
|
-
updateRenderContext(initialRenderContext);
|
|
450
|
+
(0, _useRunOnce.useRunOnce)(renderContext !== _useGridVirtualization.EMPTY_RENDER_CONTEXT, () => {
|
|
425
451
|
apiRef.current.publishEvent('scrollPositionChange', {
|
|
426
452
|
top: scrollPosition.current.top,
|
|
427
453
|
left: scrollPosition.current.left,
|
|
428
|
-
renderContext
|
|
454
|
+
renderContext
|
|
429
455
|
});
|
|
456
|
+
isRenderContextReady.current = true;
|
|
457
|
+
if (rootProps.initialState?.scroll && scrollerRef.current) {
|
|
458
|
+
const scroller = scrollerRef.current;
|
|
459
|
+
const {
|
|
460
|
+
top,
|
|
461
|
+
left
|
|
462
|
+
} = rootProps.initialState.scroll;
|
|
463
|
+
|
|
464
|
+
// On initial mount, if we have columns available, we can restore the horizontal scroll immediately, but we need to skip the resulting scroll event, otherwise we would recalculate the render context at position top=0, left=restoredValue, but the initial render context is already calculated based on the initial value of scrollPosition ref.
|
|
465
|
+
const isScrollRestored = {
|
|
466
|
+
top: !(top > 0),
|
|
467
|
+
left: !(left > 0)
|
|
468
|
+
};
|
|
469
|
+
if (!isScrollRestored.left && columnsTotalWidth) {
|
|
470
|
+
scroller.scrollLeft = left;
|
|
471
|
+
ignoreNextScrollEvent.current = true;
|
|
472
|
+
isScrollRestored.left = true;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
// For the sake of completeness, but I'm not sure if contentHeight is ever available at this point. Maybe when virtualisation is disabled?
|
|
476
|
+
if (!isScrollRestored.top && contentHeight) {
|
|
477
|
+
scroller.scrollTop = top;
|
|
478
|
+
ignoreNextScrollEvent.current = true;
|
|
479
|
+
isScrollRestored.top = true;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
// To restore the vertical scroll, we need to wait until the rows are available in the DOM (otherwise there's nowhere to scroll), but before paint to avoid reflows
|
|
483
|
+
if (!isScrollRestored.top || !isScrollRestored.left) {
|
|
484
|
+
const unsubscribeContentSizeChange = apiRef.current.subscribeEvent('virtualScrollerContentSizeChange', params => {
|
|
485
|
+
if (!isScrollRestored.left && params.columnsTotalWidth) {
|
|
486
|
+
scroller.scrollLeft = left;
|
|
487
|
+
ignoreNextScrollEvent.current = true;
|
|
488
|
+
isScrollRestored.left = true;
|
|
489
|
+
}
|
|
490
|
+
if (!isScrollRestored.top && params.contentHeight) {
|
|
491
|
+
scroller.scrollTop = top;
|
|
492
|
+
ignoreNextScrollEvent.current = true;
|
|
493
|
+
isScrollRestored.top = true;
|
|
494
|
+
}
|
|
495
|
+
if (isScrollRestored.left && isScrollRestored.top) {
|
|
496
|
+
unsubscribeContentSizeChange();
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
return unsubscribeContentSizeChange;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
return undefined;
|
|
430
503
|
});
|
|
431
504
|
apiRef.current.register('private', {
|
|
432
505
|
updateRenderContext: forceUpdateRenderContext
|
|
433
506
|
});
|
|
434
|
-
(0, _utils2.
|
|
435
|
-
(0, _utils2.
|
|
436
|
-
(0, _utils2.
|
|
507
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'sortedRowsSet', forceUpdateRenderContext);
|
|
508
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'paginationModelChange', forceUpdateRenderContext);
|
|
509
|
+
(0, _utils2.useGridApiOptionHandler)(apiRef, 'columnsChange', forceUpdateRenderContext);
|
|
437
510
|
return {
|
|
438
511
|
renderContext,
|
|
439
512
|
setPanels,
|
|
440
513
|
getRows,
|
|
441
514
|
getContainerProps: () => ({
|
|
442
|
-
ref:
|
|
515
|
+
ref: mainRefCallback
|
|
443
516
|
}),
|
|
444
517
|
getScrollerProps: () => ({
|
|
445
518
|
ref: scrollerRef,
|
|
@@ -454,22 +527,32 @@ const useGridVirtualScroller = () => {
|
|
|
454
527
|
}),
|
|
455
528
|
getContentProps: () => ({
|
|
456
529
|
style: contentSize,
|
|
457
|
-
role: 'presentation'
|
|
530
|
+
role: 'presentation',
|
|
531
|
+
ref: onContentSizeApplied
|
|
458
532
|
}),
|
|
459
533
|
getRenderZoneProps: () => ({
|
|
460
534
|
role: 'rowgroup'
|
|
461
535
|
}),
|
|
462
536
|
getScrollbarVerticalProps: () => ({
|
|
463
537
|
ref: scrollbarVerticalRef,
|
|
464
|
-
role: 'presentation'
|
|
538
|
+
role: 'presentation',
|
|
539
|
+
scrollPosition
|
|
465
540
|
}),
|
|
466
541
|
getScrollbarHorizontalProps: () => ({
|
|
467
542
|
ref: scrollbarHorizontalRef,
|
|
468
|
-
role: 'presentation'
|
|
543
|
+
role: 'presentation',
|
|
544
|
+
scrollPosition
|
|
545
|
+
}),
|
|
546
|
+
getScrollAreaProps: () => ({
|
|
547
|
+
scrollPosition
|
|
469
548
|
})
|
|
470
549
|
};
|
|
471
550
|
};
|
|
472
551
|
exports.useGridVirtualScroller = useGridVirtualScroller;
|
|
552
|
+
// dimension selectors
|
|
553
|
+
function needsHorizontalScrollbarSelector(state) {
|
|
554
|
+
return state.dimensions.viewportOuterSize.width > 0 && state.dimensions.columnsTotalWidth > state.dimensions.viewportOuterSize.width;
|
|
555
|
+
}
|
|
473
556
|
function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
474
557
|
const dimensions = (0, _gridDimensionsSelectors.gridDimensionsSelector)(apiRef.current.state);
|
|
475
558
|
const currentPage = (0, _useGridVisibleRows.getVisibleRows)(apiRef, rootProps);
|
|
@@ -497,7 +580,8 @@ function inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns) {
|
|
|
497
580
|
pinnedColumns: (0, _gridColumnsSelector.gridVisiblePinnedColumnDefinitionsSelector)(apiRef),
|
|
498
581
|
visibleColumns,
|
|
499
582
|
hiddenCellsOriginMap,
|
|
500
|
-
listView: rootProps.unstable_listView ?? false
|
|
583
|
+
listView: rootProps.unstable_listView ?? false,
|
|
584
|
+
virtualizeColumnsWithAutoRowHeight: rootProps.virtualizeColumnsWithAutoRowHeight
|
|
501
585
|
};
|
|
502
586
|
}
|
|
503
587
|
function computeRenderContext(inputs, scrollPosition, scrollCache) {
|
|
@@ -507,6 +591,11 @@ function computeRenderContext(inputs, scrollPosition, scrollCache) {
|
|
|
507
591
|
firstColumnIndex: 0,
|
|
508
592
|
lastColumnIndex: inputs.visibleColumns.length
|
|
509
593
|
};
|
|
594
|
+
if (inputs.listView) {
|
|
595
|
+
return (0, _extends2.default)({}, renderContext, {
|
|
596
|
+
lastColumnIndex: 1
|
|
597
|
+
});
|
|
598
|
+
}
|
|
510
599
|
const {
|
|
511
600
|
top,
|
|
512
601
|
left
|
|
@@ -545,11 +634,13 @@ function computeRenderContext(inputs, scrollPosition, scrollCache) {
|
|
|
545
634
|
positions: inputs.rowsMeta.positions,
|
|
546
635
|
lastSize: inputs.lastRowHeight
|
|
547
636
|
});
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
637
|
+
if (!inputs.virtualizeColumnsWithAutoRowHeight) {
|
|
638
|
+
for (let i = firstRowToRender; i < lastRowToRender && !hasRowWithAutoHeight; i += 1) {
|
|
639
|
+
const row = inputs.rows[i];
|
|
640
|
+
hasRowWithAutoHeight = inputs.apiRef.current.rowHasAutoHeight(row.id);
|
|
641
|
+
}
|
|
551
642
|
}
|
|
552
|
-
if (!hasRowWithAutoHeight) {
|
|
643
|
+
if (!hasRowWithAutoHeight || inputs.virtualizeColumnsWithAutoRowHeight) {
|
|
553
644
|
firstColumnIndex = binarySearch(realLeft, inputs.columnPositions, {
|
|
554
645
|
atStart: true,
|
|
555
646
|
lastPosition: inputs.columnsTotalWidth
|