@mui/x-data-grid 5.7.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +241 -53
- package/DataGrid/DataGrid.d.ts +8 -3
- package/DataGrid/DataGrid.js +28 -5
- package/DataGrid/useDataGridComponent.js +5 -5
- package/DataGrid/useDataGridProps.d.ts +2 -1
- package/LICENSE +21 -0
- package/README.md +6 -4
- package/colDef/gridBooleanColDef.d.ts +1 -1
- package/colDef/gridBooleanOperators.d.ts +1 -1
- package/colDef/gridDateColDef.d.ts +5 -9
- package/colDef/gridDateColDef.js +2 -2
- package/colDef/gridDateOperators.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.d.ts +1 -1
- package/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/colDef/gridNumericColDef.d.ts +1 -1
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridStringColDef.d.ts +1 -1
- package/colDef/gridStringOperators.d.ts +1 -1
- package/colDef/index.d.ts +1 -0
- package/colDef/index.js +2 -1
- package/components/GridRow.d.ts +4 -0
- package/components/GridRow.js +55 -24
- package/components/base/GridOverlays.js +4 -3
- package/components/cell/GridActionsCell.d.ts +5 -1
- package/components/cell/GridActionsCell.js +170 -21
- package/components/cell/GridActionsCellItem.d.ts +66 -4
- package/components/cell/GridActionsCellItem.js +7 -5
- package/components/cell/GridCell.d.ts +5 -4
- package/components/cell/GridCell.js +30 -9
- package/components/cell/GridEditInputCell.js +3 -3
- package/components/cell/GridEditSingleSelectCell.js +24 -15
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +12 -0
- package/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/components/columnHeaders/GridColumnHeaderItem.js +9 -12
- package/components/columnHeaders/GridColumnHeaders.d.ts +0 -1
- package/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/components/columnHeaders/index.d.ts +1 -0
- package/components/columnHeaders/index.js +1 -0
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +3 -3
- package/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/containers/GridRoot.js +29 -17
- package/components/containers/GridRootStyles.js +36 -1
- package/components/menu/GridMenu.js +1 -0
- package/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/components/panel/GridPanel.d.ts +2 -2
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/GridPreferencesPanel.js +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -15
- package/components/panel/filterPanel/GridFilterInputValue.js +22 -15
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/constants/defaultGridSlotsComponents.js +4 -2
- package/constants/gridClasses.d.ts +35 -3
- package/constants/gridClasses.js +1 -1
- package/constants/gridDetailPanelToggleField.d.ts +1 -0
- package/constants/gridDetailPanelToggleField.js +2 -0
- package/constants/localeTextConstants.js +3 -1
- package/hooks/core/index.d.ts +1 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +85 -0
- package/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/hooks/core/pipeProcessing/index.d.ts +4 -0
- package/hooks/core/pipeProcessing/index.js +4 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.d.ts +32 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +108 -0
- package/hooks/core/pipeProcessing/useGridRegisterPipeApplier.d.ts +3 -0
- package/{modern/hooks/core/preProcessing/useGridRegisterPreProcessor.js → hooks/core/pipeProcessing/useGridRegisterPipeApplier.js} +2 -6
- package/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.d.ts +4 -0
- package/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeProcessor.js} +2 -6
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.d.ts +27 -16
- package/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/hooks/core/useGridInitialization.js +2 -2
- package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +0 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +77 -11
- package/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +6 -6
- package/hooks/features/columns/gridColumnsUtils.d.ts +22 -4
- package/hooks/features/columns/gridColumnsUtils.js +105 -20
- package/hooks/features/columns/useGridColumnSpanning.d.ts +7 -0
- package/hooks/features/columns/useGridColumnSpanning.js +109 -0
- package/hooks/features/columns/useGridColumns.d.ts +1 -1
- package/hooks/features/columns/useGridColumns.js +55 -40
- package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
- package/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/hooks/features/editRows/useGridCellEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridCellEditing.new.js +40 -17
- package/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/hooks/features/editRows/useGridRowEditing.new.d.ts +1 -1
- package/hooks/features/editRows/useGridRowEditing.new.js +44 -21
- package/hooks/features/events/useGridEvents.d.ts +1 -1
- package/hooks/features/events/useGridEvents.js +2 -0
- package/hooks/features/filter/gridFilterSelector.d.ts +3 -9
- package/hooks/features/filter/useGridFilter.js +18 -13
- package/hooks/features/focus/useGridFocus.js +19 -9
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.d.ts +3 -5
- package/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +66 -13
- package/hooks/features/pagination/gridPaginationSelector.d.ts +1 -3
- package/hooks/features/pagination/useGridPage.js +9 -4
- package/hooks/features/pagination/useGridPageSize.js +3 -3
- package/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/hooks/features/rows/gridRowsSelector.d.ts +2 -1
- package/hooks/features/rows/gridRowsSelector.js +1 -0
- package/hooks/features/rows/gridRowsState.d.ts +4 -0
- package/hooks/features/rows/gridRowsUtils.d.ts +8 -0
- package/hooks/features/rows/gridRowsUtils.js +11 -0
- package/hooks/features/rows/index.d.ts +1 -0
- package/hooks/features/rows/index.js +1 -1
- package/hooks/features/rows/useGridRows.d.ts +2 -2
- package/hooks/features/rows/useGridRows.js +27 -7
- package/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/hooks/features/scroll/useGridScroll.d.ts +2 -0
- package/hooks/features/scroll/useGridScroll.js +27 -14
- package/hooks/features/selection/gridSelectionSelector.d.ts +1 -3
- package/hooks/features/selection/useGridSelection.d.ts +4 -2
- package/hooks/features/selection/useGridSelection.js +75 -27
- package/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/hooks/features/sorting/gridSortingSelector.d.ts +1 -3
- package/hooks/features/sorting/gridSortingUtils.d.ts +1 -2
- package/hooks/features/sorting/useGridSorting.js +13 -13
- package/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/hooks/features/virtualization/useGridVirtualScroller.d.ts +9 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +64 -27
- package/hooks/utils/useGridRootProps.d.ts +1 -1
- package/hooks/utils/useGridVisibleRows.d.ts +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +4 -6
- package/internals/index.js +3 -3
- package/legacy/DataGrid/DataGrid.js +28 -5
- package/legacy/DataGrid/useDataGridComponent.js +5 -5
- package/legacy/colDef/gridDateColDef.js +2 -2
- package/legacy/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/legacy/colDef/index.js +2 -1
- package/legacy/components/GridRow.js +53 -24
- package/legacy/components/base/GridOverlays.js +4 -3
- package/legacy/components/cell/GridActionsCell.js +188 -27
- package/legacy/components/cell/GridActionsCellItem.js +7 -5
- package/legacy/components/cell/GridCell.js +31 -9
- package/legacy/components/cell/GridEditInputCell.js +3 -3
- package/legacy/components/cell/GridEditSingleSelectCell.js +35 -26
- package/legacy/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +9 -12
- package/legacy/components/columnHeaders/GridColumnHeaders.js +2 -3
- package/legacy/components/columnHeaders/index.js +1 -0
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +23 -5
- package/legacy/components/containers/GridRoot.js +34 -17
- package/legacy/components/containers/GridRootStyles.js +26 -5
- package/legacy/components/menu/GridMenu.js +1 -0
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/legacy/components/panel/GridPanel.js +1 -0
- package/legacy/components/panel/GridPreferencesPanel.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +14 -10
- package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +13 -8
- package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +22 -17
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +22 -17
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/legacy/components/virtualization/GridVirtualScroller.js +2 -0
- package/legacy/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/legacy/constants/defaultGridSlotsComponents.js +4 -2
- package/legacy/constants/gridClasses.js +1 -1
- package/legacy/constants/gridDetailPanelToggleField.js +2 -0
- package/legacy/constants/localeTextConstants.js +3 -1
- package/legacy/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/legacy/hooks/core/pipeProcessing/index.js +4 -0
- package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +119 -0
- package/legacy/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +2 -6
- package/legacy/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +27 -0
- package/legacy/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/legacy/hooks/core/useGridInitialization.js +2 -2
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +90 -11
- package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/legacy/hooks/features/columns/gridColumnsUtils.js +120 -32
- package/legacy/hooks/features/columns/useGridColumnSpanning.js +107 -0
- package/legacy/hooks/features/columns/useGridColumns.js +55 -40
- package/legacy/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +36 -15
- package/legacy/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +53 -30
- package/legacy/hooks/features/events/useGridEvents.js +2 -0
- package/legacy/hooks/features/filter/useGridFilter.js +18 -13
- package/legacy/hooks/features/focus/useGridFocus.js +19 -9
- package/legacy/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +66 -12
- package/legacy/hooks/features/pagination/useGridPage.js +11 -4
- package/legacy/hooks/features/pagination/useGridPageSize.js +3 -3
- package/legacy/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/legacy/hooks/features/rows/gridRowsSelector.js +3 -0
- package/legacy/hooks/features/rows/gridRowsUtils.js +13 -0
- package/legacy/hooks/features/rows/index.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +35 -9
- package/legacy/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/legacy/hooks/features/scroll/useGridScroll.js +27 -14
- package/legacy/hooks/features/selection/useGridSelection.js +77 -27
- package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/legacy/hooks/features/sorting/useGridSorting.js +8 -10
- package/legacy/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +75 -37
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +3 -3
- package/legacy/locales/arSD.js +3 -1
- package/legacy/locales/bgBG.js +3 -1
- package/legacy/locales/csCZ.js +2 -0
- package/legacy/locales/daDK.js +37 -31
- package/legacy/locales/deDE.js +3 -1
- package/legacy/locales/elGR.js +2 -0
- package/legacy/locales/esES.js +2 -0
- package/legacy/locales/faIR.js +3 -1
- package/legacy/locales/fiFI.js +2 -0
- package/legacy/locales/frFR.js +2 -0
- package/legacy/locales/heIL.js +3 -1
- package/legacy/locales/huHU.js +122 -0
- package/legacy/locales/index.js +1 -0
- package/legacy/locales/itIT.js +2 -0
- package/legacy/locales/jaJP.js +2 -0
- package/legacy/locales/koKR.js +2 -0
- package/legacy/locales/nlNL.js +2 -0
- package/legacy/locales/plPL.js +3 -1
- package/legacy/locales/ptBR.js +3 -1
- package/legacy/locales/ruRU.js +2 -0
- package/legacy/locales/skSK.js +2 -0
- package/legacy/locales/trTR.js +3 -1
- package/legacy/locales/ukUA.js +2 -0
- package/legacy/locales/viVN.js +2 -0
- package/legacy/locales/zhCN.js +2 -0
- package/{modern/hooks/core/preProcessing/gridPreProcessingApi.js → legacy/models/api/gridColumnSpanning.js} +0 -0
- package/legacy/models/colDef/index.js +1 -2
- package/legacy/models/events/gridEvents.js +10 -3
- package/legacy/models/gridColumnSpanning.js +1 -0
- package/legacy/models/gridRows.js +1 -33
- package/legacy/models/index.js +2 -2
- package/legacy/models/params/gridPreferencePanelParams.js +1 -0
- package/legacy/models/params/index.js +2 -1
- package/locales/arSD.js +3 -1
- package/locales/bgBG.js +3 -1
- package/locales/csCZ.js +2 -0
- package/locales/daDK.js +33 -31
- package/locales/deDE.js +3 -1
- package/locales/elGR.js +2 -0
- package/locales/esES.js +2 -0
- package/locales/faIR.js +3 -1
- package/locales/fiFI.js +2 -0
- package/locales/frFR.js +2 -0
- package/locales/heIL.js +3 -1
- package/locales/huHU.d.ts +2 -0
- package/locales/huHU.js +110 -0
- package/locales/index.d.ts +1 -0
- package/locales/index.js +1 -0
- package/locales/itIT.js +2 -0
- package/locales/jaJP.js +2 -0
- package/locales/koKR.js +2 -0
- package/locales/nlNL.js +2 -0
- package/locales/plPL.js +3 -1
- package/locales/ptBR.js +3 -1
- package/locales/ruRU.js +2 -0
- package/locales/skSK.js +2 -0
- package/locales/trTR.js +3 -1
- package/locales/ukUA.js +2 -0
- package/locales/viVN.js +2 -0
- package/locales/zhCN.js +2 -0
- package/models/api/gridApiCommon.d.ts +3 -2
- package/models/api/gridColumnSpanning.d.ts +28 -0
- package/models/api/gridColumnSpanning.js +1 -0
- package/models/api/gridEditingApi.d.ts +51 -5
- package/models/api/gridLocaleTextApi.d.ts +1 -0
- package/models/api/gridParamsApi.d.ts +5 -5
- package/models/api/gridRowApi.d.ts +8 -2
- package/models/colDef/gridColDef.d.ts +38 -28
- package/models/colDef/index.d.ts +0 -1
- package/models/colDef/index.js +1 -2
- package/models/events/gridEventLookup.d.ts +30 -9
- package/models/events/gridEvents.d.ts +50 -17
- package/models/events/gridEvents.js +10 -3
- package/models/gridCell.d.ts +1 -0
- package/models/gridColumnSpanning.d.ts +12 -0
- package/models/gridColumnSpanning.js +1 -0
- package/models/gridEditRowModel.d.ts +1 -1
- package/models/gridFilterOperator.d.ts +3 -2
- package/models/gridIconSlotsComponent.d.ts +5 -0
- package/models/gridRows.d.ts +10 -18
- package/models/gridRows.js +1 -31
- package/models/gridSlotsComponent.d.ts +5 -0
- package/models/gridSlotsComponentsProps.d.ts +1 -0
- package/models/gridSortModel.d.ts +3 -4
- package/models/index.d.ts +1 -1
- package/models/index.js +2 -2
- package/models/params/gridCellParams.d.ts +25 -15
- package/models/params/gridColumnHeaderParams.d.ts +3 -2
- package/models/params/gridEditCellParams.d.ts +2 -3
- package/models/params/gridPreferencePanelParams.d.ts +3 -0
- package/models/params/gridPreferencePanelParams.js +1 -0
- package/models/params/gridRowParams.d.ts +12 -8
- package/models/params/gridValueOptionsParams.d.ts +3 -3
- package/models/params/index.d.ts +1 -0
- package/models/params/index.js +2 -1
- package/models/props/DataGridProps.d.ts +37 -17
- package/modern/DataGrid/DataGrid.js +28 -5
- package/modern/DataGrid/useDataGridComponent.js +5 -5
- package/modern/colDef/gridDateColDef.js +2 -2
- package/modern/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/modern/colDef/index.js +2 -1
- package/modern/components/GridRow.js +53 -22
- package/modern/components/base/GridOverlays.js +4 -3
- package/modern/components/cell/GridActionsCell.js +168 -21
- package/modern/components/cell/GridActionsCellItem.js +7 -5
- package/modern/components/cell/GridCell.js +30 -9
- package/modern/components/cell/GridEditInputCell.js +3 -3
- package/modern/components/cell/GridEditSingleSelectCell.js +22 -13
- package/modern/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +22 -4
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +7 -10
- package/modern/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/modern/components/columnHeaders/index.js +1 -0
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/modern/components/containers/GridRoot.js +29 -17
- package/modern/components/containers/GridRootStyles.js +36 -1
- package/modern/components/menu/GridMenu.js +1 -0
- package/modern/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/modern/components/panel/GridPanel.js +1 -0
- package/modern/components/panel/GridPreferencesPanel.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +10 -6
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +11 -6
- package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +20 -13
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +20 -13
- package/modern/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -0
- package/modern/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/modern/constants/defaultGridSlotsComponents.js +4 -2
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/gridDetailPanelToggleField.js +2 -0
- package/modern/constants/localeTextConstants.js +3 -1
- package/modern/hooks/core/pipeProcessing/gridPipeProcessingApi.js +1 -0
- package/modern/hooks/core/pipeProcessing/index.js +4 -0
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +108 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeApplier.js +27 -0
- package/modern/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +27 -0
- package/modern/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/modern/hooks/core/useGridInitialization.js +2 -2
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +77 -11
- package/modern/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/modern/hooks/features/columns/gridColumnsUtils.js +105 -20
- package/modern/hooks/features/columns/useGridColumnSpanning.js +107 -0
- package/modern/hooks/features/columns/useGridColumns.js +55 -40
- package/modern/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +40 -17
- package/modern/hooks/features/editRows/useGridEditing.new.js +7 -3
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +44 -21
- package/modern/hooks/features/events/useGridEvents.js +2 -0
- package/modern/hooks/features/filter/useGridFilter.js +18 -13
- package/modern/hooks/features/focus/useGridFocus.js +19 -9
- package/modern/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +64 -13
- package/modern/hooks/features/pagination/useGridPage.js +9 -4
- package/modern/hooks/features/pagination/useGridPageSize.js +3 -3
- package/modern/hooks/features/preferencesPanel/useGridPreferencesPanel.js +18 -5
- package/modern/hooks/features/rows/gridRowsSelector.js +1 -0
- package/modern/hooks/features/rows/gridRowsUtils.js +11 -0
- package/modern/hooks/features/rows/index.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +25 -5
- package/modern/hooks/features/rows/useGridRowsMeta.js +7 -14
- package/modern/hooks/features/scroll/useGridScroll.js +25 -10
- package/modern/hooks/features/selection/useGridSelection.js +75 -27
- package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/modern/hooks/features/sorting/useGridSorting.js +13 -13
- package/modern/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +64 -23
- package/modern/index.js +1 -1
- package/modern/internals/index.js +3 -3
- package/modern/locales/arSD.js +3 -1
- package/modern/locales/bgBG.js +3 -1
- package/modern/locales/csCZ.js +2 -0
- package/modern/locales/daDK.js +33 -31
- package/modern/locales/deDE.js +3 -1
- package/modern/locales/elGR.js +2 -0
- package/modern/locales/esES.js +2 -0
- package/modern/locales/faIR.js +3 -1
- package/modern/locales/fiFI.js +2 -0
- package/modern/locales/frFR.js +2 -0
- package/modern/locales/heIL.js +3 -1
- package/modern/locales/huHU.js +110 -0
- package/modern/locales/index.js +1 -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/nlNL.js +2 -0
- package/modern/locales/plPL.js +3 -1
- package/modern/locales/ptBR.js +3 -1
- package/modern/locales/ruRU.js +2 -0
- package/modern/locales/skSK.js +2 -0
- package/modern/locales/trTR.js +3 -1
- package/modern/locales/ukUA.js +2 -0
- package/modern/locales/viVN.js +2 -0
- package/modern/locales/zhCN.js +2 -0
- package/modern/models/api/gridColumnSpanning.js +1 -0
- package/modern/models/colDef/index.js +1 -2
- package/modern/models/events/gridEvents.js +10 -3
- package/modern/models/gridColumnSpanning.js +1 -0
- package/modern/models/gridRows.js +1 -31
- package/modern/models/index.js +2 -2
- package/modern/models/params/gridPreferencePanelParams.js +1 -0
- package/modern/models/params/index.js +2 -1
- package/node/DataGrid/DataGrid.js +28 -5
- package/node/DataGrid/useDataGridComponent.js +6 -6
- package/node/colDef/gridDateColDef.js +2 -2
- package/node/{models/colDef → colDef}/gridDefaultColumnTypes.js +6 -6
- package/node/colDef/index.js +13 -0
- package/node/components/GridRow.js +56 -24
- package/node/components/base/GridOverlays.js +3 -2
- package/node/components/cell/GridActionsCell.js +172 -21
- package/node/components/cell/GridActionsCellItem.js +7 -4
- package/node/components/cell/GridCell.js +30 -9
- package/node/components/cell/GridEditInputCell.js +3 -3
- package/node/components/cell/GridEditSingleSelectCell.js +25 -15
- package/node/components/columnHeaders/{ColumnHeaderFilterIcon.js → GridColumnHeaderFilterIconButton.js} +23 -5
- package/node/components/columnHeaders/GridColumnHeaderItem.js +9 -13
- package/node/components/columnHeaders/GridColumnHeaders.js +1 -1
- package/node/components/columnHeaders/index.js +13 -0
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +22 -5
- package/node/components/containers/GridRoot.js +28 -17
- package/node/components/containers/GridRootStyles.js +36 -1
- package/node/components/menu/GridMenu.js +1 -0
- package/node/components/menu/columnMenu/GridColumnMenu.js +1 -1
- package/node/components/panel/GridPanel.js +1 -0
- package/node/components/panel/GridPreferencesPanel.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +15 -10
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +14 -8
- package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +23 -15
- package/node/components/panel/filterPanel/GridFilterInputValue.js +23 -15
- package/node/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +2 -0
- package/node/components/virtualization/GridVirtualScrollerContent.js +1 -3
- package/node/constants/defaultGridSlotsComponents.js +3 -1
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/gridDetailPanelToggleField.js +9 -0
- package/node/constants/localeTextConstants.js +3 -1
- package/node/hooks/core/{preProcessing/gridPreProcessingApi.js → pipeProcessing/gridPipeProcessingApi.js} +0 -0
- package/node/hooks/core/pipeProcessing/index.js +57 -0
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +124 -0
- package/node/hooks/core/{preProcessing/useGridRegisterPreProcessor.js → pipeProcessing/useGridRegisterPipeApplier.js} +4 -7
- package/node/hooks/core/pipeProcessing/useGridRegisterPipeProcessor.js +42 -0
- package/node/hooks/core/strategyProcessing/useGridStrategyProcessing.js +26 -15
- package/node/hooks/core/useGridInitialization.js +2 -2
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +81 -11
- package/node/hooks/features/columnMenu/useGridColumnMenu.js +2 -1
- package/node/hooks/features/columns/gridColumnsUtils.js +114 -25
- package/node/hooks/features/columns/useGridColumnSpanning.js +130 -0
- package/node/hooks/features/columns/useGridColumns.js +55 -40
- package/node/hooks/features/dimensions/useGridDimensions.js +5 -4
- package/node/hooks/features/editRows/useGridCellEditing.new.js +42 -17
- package/node/hooks/features/editRows/useGridEditing.new.js +6 -2
- package/node/hooks/features/editRows/useGridRowEditing.new.js +45 -21
- package/node/hooks/features/events/useGridEvents.js +2 -0
- package/node/hooks/features/filter/useGridFilter.js +18 -13
- package/node/hooks/features/focus/useGridFocus.js +19 -9
- package/node/hooks/features/{keyboard → keyboardNavigation}/useGridKeyboardNavigation.js +69 -13
- package/node/hooks/features/pagination/useGridPage.js +8 -3
- package/node/hooks/features/pagination/useGridPageSize.js +3 -3
- package/node/hooks/features/preferencesPanel/useGridPreferencesPanel.js +20 -5
- package/node/hooks/features/rows/gridRowsSelector.js +3 -1
- package/node/hooks/features/rows/gridRowsUtils.js +18 -0
- package/node/hooks/features/rows/index.js +15 -1
- package/node/hooks/features/rows/useGridRows.js +29 -9
- package/node/hooks/features/rows/useGridRowsMeta.js +7 -15
- package/node/hooks/features/scroll/useGridScroll.js +28 -14
- package/node/hooks/features/selection/useGridSelection.js +75 -26
- package/node/hooks/features/selection/useGridSelectionPreProcessors.js +2 -2
- package/node/hooks/features/sorting/useGridSorting.js +13 -13
- package/node/hooks/features/statePersistence/useGridStatePersistence.js +2 -2
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +69 -27
- package/node/index.js +1 -1
- package/node/internals/index.js +12 -12
- package/node/locales/arSD.js +3 -1
- package/node/locales/bgBG.js +3 -1
- package/node/locales/csCZ.js +2 -0
- package/node/locales/daDK.js +33 -31
- package/node/locales/deDE.js +3 -1
- package/node/locales/elGR.js +2 -0
- package/node/locales/esES.js +2 -0
- package/node/locales/faIR.js +3 -1
- package/node/locales/fiFI.js +2 -0
- package/node/locales/frFR.js +2 -0
- package/node/locales/heIL.js +3 -1
- package/node/locales/huHU.js +120 -0
- package/node/locales/index.js +13 -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/nlNL.js +2 -0
- package/node/locales/plPL.js +3 -1
- package/node/locales/ptBR.js +3 -1
- package/node/locales/ruRU.js +2 -0
- package/node/locales/skSK.js +2 -0
- package/node/locales/trTR.js +3 -1
- package/node/locales/ukUA.js +2 -0
- package/node/locales/viVN.js +2 -0
- package/node/locales/zhCN.js +2 -0
- package/node/models/api/gridColumnSpanning.js +5 -0
- package/node/models/colDef/index.js +0 -13
- package/node/models/events/gridEvents.js +10 -3
- package/node/models/gridColumnSpanning.js +5 -0
- package/node/models/gridRows.js +1 -34
- package/node/models/index.js +13 -13
- package/node/models/params/gridPreferencePanelParams.js +5 -0
- package/node/models/params/index.js +13 -0
- package/package.json +4 -4
- package/utils/domUtils.d.ts +2 -2
- package/components/columnHeaders/ColumnHeaderFilterIcon.d.ts +0 -5
- package/hooks/core/preProcessing/gridPreProcessingApi.d.ts +0 -67
- package/hooks/core/preProcessing/index.d.ts +0 -3
- package/hooks/core/preProcessing/index.js +0 -3
- package/hooks/core/preProcessing/useGridPreProcessing.d.ts +0 -6
- package/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
- package/hooks/core/preProcessing/useGridRegisterPreProcessor.d.ts +0 -7
- package/hooks/features/keyboard/useGridKeyboard.d.ts +0 -10
- package/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/legacy/hooks/core/preProcessing/index.js +0 -3
- package/legacy/hooks/core/preProcessing/useGridPreProcessing.js +0 -62
- package/legacy/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/modern/hooks/core/preProcessing/index.js +0 -3
- package/modern/hooks/core/preProcessing/useGridPreProcessing.js +0 -53
- package/modern/hooks/features/keyboard/useGridKeyboard.js +0 -70
- package/node/hooks/core/preProcessing/index.js +0 -44
- package/node/hooks/core/preProcessing/useGridPreProcessing.js +0 -72
- package/node/hooks/features/keyboard/useGridKeyboard.js +0 -91
|
@@ -20,6 +20,7 @@ import { useGridVisibleRows } from '../hooks/utils/useGridVisibleRows';
|
|
|
20
20
|
import { findParentElementFromClassName } from '../utils/domUtils';
|
|
21
21
|
import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../colDef/gridCheckboxSelectionColDef';
|
|
22
22
|
import { GRID_ACTIONS_COLUMN_TYPE } from '../colDef/gridActionsColDef';
|
|
23
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '../constants/gridDetailPanelToggleField';
|
|
23
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
25
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
26
|
|
|
@@ -59,6 +60,7 @@ function GridRow(props) {
|
|
|
59
60
|
const {
|
|
60
61
|
selected,
|
|
61
62
|
rowId,
|
|
63
|
+
row,
|
|
62
64
|
index,
|
|
63
65
|
style: styleProp,
|
|
64
66
|
rowHeight,
|
|
@@ -130,7 +132,12 @@ function GridRow(props) {
|
|
|
130
132
|
} // User opened a detail panel
|
|
131
133
|
|
|
132
134
|
|
|
133
|
-
if (field ===
|
|
135
|
+
if (field === GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
136
|
+
return;
|
|
137
|
+
} // User reorders a row
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
if (field === '__reorder__') {
|
|
134
141
|
return;
|
|
135
142
|
} // User is editing a cell
|
|
136
143
|
|
|
@@ -174,7 +181,8 @@ function GridRow(props) {
|
|
|
174
181
|
|
|
175
182
|
const rowParams = _extends({}, apiRef.current.getRowParams(rowId), {
|
|
176
183
|
isFirstVisible: indexRelativeToCurrentPage === 0,
|
|
177
|
-
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1
|
|
184
|
+
isLastVisible: indexRelativeToCurrentPage === currentPage.rows.length - 1,
|
|
185
|
+
indexRelativeToCurrentPage
|
|
178
186
|
});
|
|
179
187
|
|
|
180
188
|
rowClassName = rootProps.getRowClassName(rowParams);
|
|
@@ -207,7 +215,16 @@ function GridRow(props) {
|
|
|
207
215
|
}
|
|
208
216
|
|
|
209
217
|
if (editCellState != null && column.renderEditCell) {
|
|
210
|
-
|
|
218
|
+
let updatedRow = row;
|
|
219
|
+
|
|
220
|
+
if (apiRef.current.unstable_getRowWithUpdatedValues) {
|
|
221
|
+
// Only the new editing API has this method
|
|
222
|
+
updatedRow = apiRef.current.unstable_getRowWithUpdatedValues(rowId, column.field);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
const params = _extends({}, cellParams, {
|
|
226
|
+
row: updatedRow
|
|
227
|
+
}, editCellState, {
|
|
211
228
|
api: apiRef.current
|
|
212
229
|
});
|
|
213
230
|
|
|
@@ -223,24 +240,33 @@ function GridRow(props) {
|
|
|
223
240
|
|
|
224
241
|
const hasFocus = cellFocus !== null && cellFocus.id === rowId && cellFocus.field === column.field;
|
|
225
242
|
const tabIndex = cellTabIndex !== null && cellTabIndex.id === rowId && cellTabIndex.field === column.field && cellParams.cellMode === 'view' ? 0 : -1;
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
|
|
244
|
+
|
|
245
|
+
if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
|
|
246
|
+
const {
|
|
247
|
+
colSpan,
|
|
248
|
+
width
|
|
249
|
+
} = cellColSpanInfo.cellProps;
|
|
250
|
+
cells.push( /*#__PURE__*/_jsx(rootProps.components.Cell, _extends({
|
|
251
|
+
value: cellParams.value,
|
|
252
|
+
field: column.field,
|
|
253
|
+
width: width,
|
|
254
|
+
rowId: rowId,
|
|
255
|
+
height: rowHeight,
|
|
256
|
+
showRightBorder: showRightBorder,
|
|
257
|
+
formattedValue: cellParams.formattedValue,
|
|
258
|
+
align: column.align || 'left',
|
|
259
|
+
cellMode: cellParams.cellMode,
|
|
260
|
+
colIndex: indexRelativeToAllColumns,
|
|
261
|
+
isEditable: cellParams.isEditable,
|
|
262
|
+
hasFocus: hasFocus,
|
|
263
|
+
tabIndex: tabIndex,
|
|
264
|
+
className: clsx(classNames),
|
|
265
|
+
colSpan: colSpan
|
|
266
|
+
}, rootProps.componentsProps?.cell, {
|
|
267
|
+
children: content
|
|
268
|
+
}), column.field));
|
|
269
|
+
}
|
|
244
270
|
}
|
|
245
271
|
|
|
246
272
|
const emptyCellWidth = containerWidth - columnsTotalWidth;
|
|
@@ -274,11 +300,16 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
|
|
|
274
300
|
containerWidth: PropTypes.number.isRequired,
|
|
275
301
|
editRowsState: PropTypes.object.isRequired,
|
|
276
302
|
firstColumnToRender: PropTypes.number.isRequired,
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Index of the row in the whole sorted and filtered dataset.
|
|
306
|
+
* If some rows above have expanded children, this index also take those children into account.
|
|
307
|
+
*/
|
|
277
308
|
index: PropTypes.number.isRequired,
|
|
278
309
|
isLastVisible: PropTypes.bool,
|
|
279
310
|
lastColumnToRender: PropTypes.number.isRequired,
|
|
280
311
|
renderedColumns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
281
|
-
row: PropTypes.
|
|
312
|
+
row: PropTypes.any.isRequired,
|
|
282
313
|
rowHeight: PropTypes.number.isRequired,
|
|
283
314
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
284
315
|
selected: PropTypes.bool.isRequired,
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
4
4
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
5
5
|
import { gridVisibleRowCountSelector } from '../../hooks/features/filter/gridFilterSelector';
|
|
6
|
-
import { gridRowCountSelector } from '../../hooks/features/rows/gridRowsSelector';
|
|
6
|
+
import { gridRowCountSelector, gridRowsLoadingSelector } from '../../hooks/features/rows/gridRowsSelector';
|
|
7
7
|
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { gridDensityHeaderHeightSelector } from '../../hooks/features/density/densitySelector';
|
|
@@ -47,8 +47,9 @@ export function GridOverlays() {
|
|
|
47
47
|
const rootProps = useGridRootProps();
|
|
48
48
|
const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
49
49
|
const visibleRowCount = useGridSelector(apiRef, gridVisibleRowCountSelector);
|
|
50
|
-
const
|
|
51
|
-
const
|
|
50
|
+
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);
|
|
51
|
+
const showNoRowsOverlay = !loading && totalRowCount === 0;
|
|
52
|
+
const showNoResultsOverlay = !loading && totalRowCount > 0 && visibleRowCount === 0;
|
|
52
53
|
let overlay = null;
|
|
53
54
|
|
|
54
55
|
if (showNoRowsOverlay) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["colDef", "id", "api", "hasFocus", "isEditable", "field", "value", "formattedValue", "row", "rowNode", "cellMode", "getValue", "tabIndex", "position", "focusElementRef"];
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
4
6
|
import IconButton from '@mui/material/IconButton';
|
|
@@ -7,26 +9,33 @@ import { unstable_useId as useId } from '@mui/material/utils';
|
|
|
7
9
|
import { gridClasses } from '../../constants/gridClasses';
|
|
8
10
|
import { GridMenu } from '../menu/GridMenu';
|
|
9
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
12
|
+
import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
|
|
10
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
15
|
|
|
13
16
|
const hasActions = colDef => typeof colDef.getActions === 'function';
|
|
14
17
|
|
|
15
18
|
const GridActionsCell = props => {
|
|
19
|
+
const {
|
|
20
|
+
colDef,
|
|
21
|
+
id,
|
|
22
|
+
hasFocus,
|
|
23
|
+
tabIndex,
|
|
24
|
+
position = 'bottom-end',
|
|
25
|
+
focusElementRef
|
|
26
|
+
} = props,
|
|
27
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
|
+
|
|
29
|
+
const [focusedButtonIndex, setFocusedButtonIndex] = React.useState(-1);
|
|
16
30
|
const [open, setOpen] = React.useState(false);
|
|
31
|
+
const apiRef = useGridApiContext();
|
|
32
|
+
const rootRef = React.useRef(null);
|
|
17
33
|
const buttonRef = React.useRef(null);
|
|
34
|
+
const ignoreCallToFocus = React.useRef(false);
|
|
18
35
|
const touchRippleRefs = React.useRef({});
|
|
19
36
|
const menuId = useId();
|
|
20
37
|
const buttonId = useId();
|
|
21
38
|
const rootProps = useGridRootProps();
|
|
22
|
-
const {
|
|
23
|
-
colDef,
|
|
24
|
-
id,
|
|
25
|
-
api,
|
|
26
|
-
hasFocus,
|
|
27
|
-
position = 'bottom-end'
|
|
28
|
-
} = props; // TODO apply the rest to the root element
|
|
29
|
-
|
|
30
39
|
React.useLayoutEffect(() => {
|
|
31
40
|
if (!hasFocus) {
|
|
32
41
|
Object.entries(touchRippleRefs.current).forEach(([index, ref]) => {
|
|
@@ -36,56 +45,142 @@ const GridActionsCell = props => {
|
|
|
36
45
|
});
|
|
37
46
|
}
|
|
38
47
|
}, [hasFocus]);
|
|
48
|
+
React.useEffect(() => {
|
|
49
|
+
if (focusedButtonIndex >= 0) {
|
|
50
|
+
const child = rootRef.current?.children[focusedButtonIndex];
|
|
51
|
+
child.focus();
|
|
52
|
+
}
|
|
53
|
+
}, [focusedButtonIndex]);
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
if (!hasFocus) {
|
|
56
|
+
setFocusedButtonIndex(-1);
|
|
57
|
+
ignoreCallToFocus.current = false;
|
|
58
|
+
}
|
|
59
|
+
}, [hasFocus]);
|
|
60
|
+
React.useImperativeHandle(focusElementRef, () => ({
|
|
61
|
+
focus() {
|
|
62
|
+
// If ignoreCallToFocus is true, then one of the buttons was clicked and the focus is already set
|
|
63
|
+
if (!ignoreCallToFocus.current) {
|
|
64
|
+
setFocusedButtonIndex(0);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
}), []);
|
|
39
69
|
|
|
40
70
|
if (!hasActions(colDef)) {
|
|
41
71
|
throw new Error('MUI: Missing the `getActions` property in the `GridColDef`.');
|
|
42
72
|
}
|
|
43
73
|
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
const hideMenu = () => setOpen(false);
|
|
47
|
-
|
|
48
|
-
const options = colDef.getActions(api.getRowParams(id));
|
|
74
|
+
const options = colDef.getActions(apiRef.current.getRowParams(id));
|
|
49
75
|
const iconButtons = options.filter(option => !option.props.showInMenu);
|
|
50
76
|
const menuButtons = options.filter(option => option.props.showInMenu);
|
|
77
|
+
const numberOfButtons = iconButtons.length + (menuButtons.length ? 1 : 0);
|
|
78
|
+
|
|
79
|
+
const showMenu = () => {
|
|
80
|
+
setOpen(true);
|
|
81
|
+
setFocusedButtonIndex(numberOfButtons - 1);
|
|
82
|
+
ignoreCallToFocus.current = true;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
const hideMenu = () => {
|
|
86
|
+
setOpen(false);
|
|
87
|
+
};
|
|
51
88
|
|
|
52
89
|
const handleTouchRippleRef = index => instance => {
|
|
53
90
|
touchRippleRefs.current[index] = instance;
|
|
54
91
|
};
|
|
55
92
|
|
|
56
|
-
|
|
93
|
+
const handleButtonClick = (index, onClick) => event => {
|
|
94
|
+
setFocusedButtonIndex(index);
|
|
95
|
+
ignoreCallToFocus.current = true;
|
|
96
|
+
|
|
97
|
+
if (onClick) {
|
|
98
|
+
onClick(event);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const handleRootKeyDown = event => {
|
|
103
|
+
if (numberOfButtons <= 1) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let newIndex = focusedButtonIndex;
|
|
108
|
+
|
|
109
|
+
if (event.key === 'ArrowRight') {
|
|
110
|
+
newIndex += 1;
|
|
111
|
+
} else if (event.key === 'ArrowLeft') {
|
|
112
|
+
newIndex -= 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (newIndex < 0 || newIndex >= numberOfButtons) {
|
|
116
|
+
return; // We're already in the first or last item = do nothing and let the grid listen the event
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (newIndex !== focusedButtonIndex) {
|
|
120
|
+
event.preventDefault(); // Prevent scrolling
|
|
121
|
+
|
|
122
|
+
event.stopPropagation(); // Don't stop propagation for other keys, e.g. ArrowUp
|
|
123
|
+
|
|
124
|
+
setFocusedButtonIndex(newIndex);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const handleListKeyDown = event => {
|
|
129
|
+
if (event.key === 'Tab') {
|
|
130
|
+
event.preventDefault();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (['Tab', 'Enter', 'Escape'].includes(event.key)) {
|
|
134
|
+
hideMenu();
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
return /*#__PURE__*/_jsxs("div", _extends({
|
|
139
|
+
role: "menu",
|
|
140
|
+
ref: rootRef,
|
|
141
|
+
tabIndex: -1,
|
|
57
142
|
className: gridClasses.actionsCell,
|
|
143
|
+
onKeyDown: handleRootKeyDown
|
|
144
|
+
}, other, {
|
|
58
145
|
children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
|
|
59
146
|
key: index,
|
|
60
|
-
touchRippleRef: handleTouchRippleRef(index)
|
|
61
|
-
|
|
147
|
+
touchRippleRef: handleTouchRippleRef(index),
|
|
148
|
+
onClick: handleButtonClick(index, button.props.onClick),
|
|
149
|
+
tabIndex: focusedButtonIndex === index ? tabIndex : -1
|
|
150
|
+
})), menuButtons.length > 0 && buttonId && /*#__PURE__*/_jsx(IconButton, {
|
|
62
151
|
ref: buttonRef,
|
|
63
152
|
id: buttonId,
|
|
64
|
-
"aria-label":
|
|
153
|
+
"aria-label": apiRef.current.getLocaleText('actionsCellMore'),
|
|
65
154
|
"aria-controls": menuId,
|
|
66
155
|
"aria-expanded": open ? 'true' : undefined,
|
|
67
156
|
"aria-haspopup": "true",
|
|
157
|
+
role: "menuitem",
|
|
68
158
|
size: "small",
|
|
69
159
|
onClick: showMenu,
|
|
160
|
+
touchRippleRef: handleTouchRippleRef(buttonId),
|
|
161
|
+
tabIndex: focusedButtonIndex === iconButtons.length ? tabIndex : -1,
|
|
70
162
|
children: /*#__PURE__*/_jsx(rootProps.components.MoreActionsIcon, {
|
|
71
163
|
fontSize: "small"
|
|
72
164
|
})
|
|
73
165
|
}), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {
|
|
74
|
-
id: menuId,
|
|
75
166
|
onClickAway: hideMenu,
|
|
76
167
|
onClick: hideMenu,
|
|
77
168
|
open: open,
|
|
78
169
|
target: buttonRef.current,
|
|
79
170
|
position: position,
|
|
80
|
-
"aria-labelledby": buttonId,
|
|
81
171
|
children: /*#__PURE__*/_jsx(MenuList, {
|
|
172
|
+
id: menuId,
|
|
82
173
|
className: gridClasses.menuList,
|
|
174
|
+
onKeyDown: handleListKeyDown,
|
|
175
|
+
"aria-labelledby": buttonId,
|
|
176
|
+
variant: "menu",
|
|
177
|
+
autoFocusItem: true,
|
|
83
178
|
children: menuButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
|
|
84
179
|
key: index
|
|
85
180
|
}))
|
|
86
181
|
})
|
|
87
182
|
})]
|
|
88
|
-
});
|
|
183
|
+
}));
|
|
89
184
|
};
|
|
90
185
|
|
|
91
186
|
process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
|
|
@@ -100,11 +195,42 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
|
|
|
100
195
|
*/
|
|
101
196
|
api: PropTypes.any.isRequired,
|
|
102
197
|
|
|
198
|
+
/**
|
|
199
|
+
* The mode of the cell.
|
|
200
|
+
*/
|
|
201
|
+
cellMode: PropTypes.oneOf(['edit', 'view']).isRequired,
|
|
202
|
+
|
|
103
203
|
/**
|
|
104
204
|
* The column of the row that the current cell belongs to.
|
|
105
205
|
*/
|
|
106
206
|
colDef: PropTypes.object.isRequired,
|
|
107
207
|
|
|
208
|
+
/**
|
|
209
|
+
* The column field of the cell that triggered the event.
|
|
210
|
+
*/
|
|
211
|
+
field: PropTypes.string.isRequired,
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* A ref allowing to set imperative focus.
|
|
215
|
+
* It can be passed to the element that should receive focus.
|
|
216
|
+
* @ignore - do not document.
|
|
217
|
+
*/
|
|
218
|
+
focusElementRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
219
|
+
current: PropTypes.shape({
|
|
220
|
+
focus: PropTypes.func.isRequired
|
|
221
|
+
})
|
|
222
|
+
})]),
|
|
223
|
+
formattedValue: PropTypes.any,
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Get the cell value of a row and field.
|
|
227
|
+
* @param {GridRowId} id The row id.
|
|
228
|
+
* @param {string} field The field.
|
|
229
|
+
* @returns {any} The cell value.
|
|
230
|
+
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
231
|
+
*/
|
|
232
|
+
getValue: PropTypes.func.isRequired,
|
|
233
|
+
|
|
108
234
|
/**
|
|
109
235
|
* If true, the cell is the active element.
|
|
110
236
|
*/
|
|
@@ -114,7 +240,28 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
|
|
|
114
240
|
* The grid row id.
|
|
115
241
|
*/
|
|
116
242
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
117
|
-
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* If true, the cell is editable.
|
|
246
|
+
*/
|
|
247
|
+
isEditable: PropTypes.bool,
|
|
248
|
+
position: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The row model of the row that the current cell belongs to.
|
|
252
|
+
*/
|
|
253
|
+
row: PropTypes.object.isRequired,
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* The node of the row that the current cell belongs to.
|
|
257
|
+
*/
|
|
258
|
+
rowNode: PropTypes.object.isRequired,
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* the tabIndex value.
|
|
262
|
+
*/
|
|
263
|
+
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
264
|
+
value: PropTypes.any
|
|
118
265
|
} : void 0;
|
|
119
266
|
export { GridActionsCell };
|
|
120
267
|
export const renderActionsCell = params => /*#__PURE__*/_jsx(GridActionsCell, _extends({}, params));
|
|
@@ -8,8 +8,7 @@ import MenuItem from '@mui/material/MenuItem';
|
|
|
8
8
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
|
|
12
|
-
const GridActionsCellItem = props => {
|
|
11
|
+
const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
13
12
|
const {
|
|
14
13
|
label,
|
|
15
14
|
icon,
|
|
@@ -26,7 +25,9 @@ const GridActionsCellItem = props => {
|
|
|
26
25
|
|
|
27
26
|
if (!showInMenu) {
|
|
28
27
|
return /*#__PURE__*/_jsx(IconButton, _extends({
|
|
28
|
+
ref: ref,
|
|
29
29
|
size: "small",
|
|
30
|
+
role: "menuitem",
|
|
30
31
|
"aria-label": label
|
|
31
32
|
}, other, {
|
|
32
33
|
onClick: handleClick,
|
|
@@ -36,14 +37,15 @@ const GridActionsCellItem = props => {
|
|
|
36
37
|
}));
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
return /*#__PURE__*/_jsxs(MenuItem, _extends({
|
|
40
|
+
return /*#__PURE__*/_jsxs(MenuItem, _extends({
|
|
41
|
+
ref: ref
|
|
42
|
+
}, other, {
|
|
40
43
|
onClick: onClick,
|
|
41
44
|
children: [icon && /*#__PURE__*/_jsx(ListItemIcon, {
|
|
42
45
|
children: icon
|
|
43
46
|
}), label]
|
|
44
47
|
}));
|
|
45
|
-
};
|
|
46
|
-
|
|
48
|
+
});
|
|
47
49
|
process.env.NODE_ENV !== "production" ? GridActionsCellItem.propTypes = {
|
|
48
50
|
// ----------------------------- Warning --------------------------------
|
|
49
51
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -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 = ["align", "children", "colIndex", "cellMode", "field", "formattedValue", "hasFocus", "height", "isEditable", "rowId", "tabIndex", "value", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onKeyDown", "onDragEnter", "onDragOver"];
|
|
3
|
+
const _excluded = ["align", "children", "colIndex", "colDef", "cellMode", "field", "formattedValue", "hasFocus", "height", "isEditable", "rowId", "tabIndex", "value", "width", "className", "showRightBorder", "extendRowFullWidth", "row", "colSpan", "onClick", "onDoubleClick", "onMouseDown", "onMouseUp", "onKeyDown", "onDragEnter", "onDragOver"];
|
|
4
4
|
|
|
5
5
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
6
6
|
import * as React from 'react';
|
|
@@ -64,6 +64,7 @@ function GridCell(props) {
|
|
|
64
64
|
width,
|
|
65
65
|
className,
|
|
66
66
|
showRightBorder,
|
|
67
|
+
colSpan,
|
|
67
68
|
onClick,
|
|
68
69
|
onDoubleClick,
|
|
69
70
|
onMouseDown,
|
|
@@ -76,6 +77,7 @@ function GridCell(props) {
|
|
|
76
77
|
|
|
77
78
|
const valueToRender = formattedValue == null ? value : formattedValue;
|
|
78
79
|
const cellRef = React.useRef(null);
|
|
80
|
+
const focusElementRef = React.useRef(null);
|
|
79
81
|
const apiRef = useGridApiContext();
|
|
80
82
|
const rootProps = useGridRootProps();
|
|
81
83
|
const ownerState = {
|
|
@@ -126,7 +128,7 @@ function GridCell(props) {
|
|
|
126
128
|
|
|
127
129
|
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
|
128
130
|
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
|
129
|
-
const elementToFocus = focusableElement || cellRef.current;
|
|
131
|
+
const elementToFocus = focusElementRef.current || focusableElement || cellRef.current;
|
|
130
132
|
|
|
131
133
|
if (doesSupportPreventScroll()) {
|
|
132
134
|
elementToFocus.focus({
|
|
@@ -160,6 +162,26 @@ function GridCell(props) {
|
|
|
160
162
|
};
|
|
161
163
|
}
|
|
162
164
|
|
|
165
|
+
const column = apiRef.current.getColumn(field);
|
|
166
|
+
const managesOwnFocus = column.type === 'actions';
|
|
167
|
+
|
|
168
|
+
const renderChildren = () => {
|
|
169
|
+
if (children == null) {
|
|
170
|
+
return /*#__PURE__*/_jsx("div", {
|
|
171
|
+
className: classes.content,
|
|
172
|
+
children: valueToRender?.toString()
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
if ( /*#__PURE__*/React.isValidElement(children) && managesOwnFocus) {
|
|
177
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
178
|
+
focusElementRef
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
return children;
|
|
183
|
+
};
|
|
184
|
+
|
|
163
185
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
164
186
|
ref: cellRef,
|
|
165
187
|
className: clsx(className, classes.root),
|
|
@@ -167,8 +189,9 @@ function GridCell(props) {
|
|
|
167
189
|
"data-field": field,
|
|
168
190
|
"data-colindex": colIndex,
|
|
169
191
|
"aria-colindex": colIndex + 1,
|
|
192
|
+
"aria-colspan": colSpan,
|
|
170
193
|
style: style,
|
|
171
|
-
tabIndex: cellMode === 'view' || !isEditable ? tabIndex : -1,
|
|
194
|
+
tabIndex: (cellMode === 'view' || !isEditable) && !managesOwnFocus ? tabIndex : -1,
|
|
172
195
|
onClick: publish(GridEvents.cellClick, onClick),
|
|
173
196
|
onDoubleClick: publish(GridEvents.cellDoubleClick, onDoubleClick),
|
|
174
197
|
onMouseDown: publish(GridEvents.cellMouseDown, onMouseDown),
|
|
@@ -178,10 +201,7 @@ function GridCell(props) {
|
|
|
178
201
|
onDragOver: publish(GridEvents.cellDragOver, onDragOver)
|
|
179
202
|
}, other, {
|
|
180
203
|
onFocus: handleFocus,
|
|
181
|
-
children:
|
|
182
|
-
className: classes.content,
|
|
183
|
-
children: valueToRender?.toString()
|
|
184
|
-
})
|
|
204
|
+
children: renderChildren()
|
|
185
205
|
}));
|
|
186
206
|
}
|
|
187
207
|
|
|
@@ -195,8 +215,9 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
195
215
|
children: PropTypes.node,
|
|
196
216
|
className: PropTypes.string,
|
|
197
217
|
colIndex: PropTypes.number.isRequired,
|
|
218
|
+
colSpan: PropTypes.number,
|
|
198
219
|
field: PropTypes.string.isRequired,
|
|
199
|
-
formattedValue: PropTypes.
|
|
220
|
+
formattedValue: PropTypes.any,
|
|
200
221
|
hasFocus: PropTypes.bool,
|
|
201
222
|
height: PropTypes.number.isRequired,
|
|
202
223
|
isEditable: PropTypes.bool,
|
|
@@ -210,7 +231,7 @@ process.env.NODE_ENV !== "production" ? GridCell.propTypes = {
|
|
|
210
231
|
rowId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
211
232
|
showRightBorder: PropTypes.bool,
|
|
212
233
|
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
213
|
-
value: PropTypes.
|
|
234
|
+
value: PropTypes.any,
|
|
214
235
|
width: PropTypes.number.isRequired
|
|
215
236
|
} : void 0;
|
|
216
237
|
export { GridCell };
|
|
@@ -118,13 +118,13 @@ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
|
118
118
|
/**
|
|
119
119
|
* The cell value formatted with the column valueFormatter.
|
|
120
120
|
*/
|
|
121
|
-
formattedValue: PropTypes.any
|
|
121
|
+
formattedValue: PropTypes.any,
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Get the cell value of a row and field.
|
|
125
125
|
* @param {GridRowId} id The row id.
|
|
126
126
|
* @param {string} field The field.
|
|
127
|
-
* @returns {
|
|
127
|
+
* @returns {any} The cell value.
|
|
128
128
|
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
129
129
|
*/
|
|
130
130
|
getValue: PropTypes.func.isRequired,
|
|
@@ -149,7 +149,7 @@ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
|
149
149
|
/**
|
|
150
150
|
* The row model of the row that the current cell belongs to.
|
|
151
151
|
*/
|
|
152
|
-
row: PropTypes.
|
|
152
|
+
row: PropTypes.object.isRequired,
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
155
|
* The node of the row that the current cell belongs to.
|
|
@@ -9,15 +9,19 @@ import { isEscapeKey } from '../../utils/keyboardUtils';
|
|
|
9
9
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
10
10
|
import { GridEditModes } from '../../models/gridEditRowModel';
|
|
11
11
|
import { GridEvents } from '../../models/events/gridEvents';
|
|
12
|
+
import { getValueFromValueOptions } from '../panel/filterPanel/filterPanelUtils';
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
14
|
|
|
14
|
-
const renderSingleSelectOptions = option =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const renderSingleSelectOptions = (option, OptionComponent) => {
|
|
16
|
+
const isOptionTypeObject = typeof option === 'object';
|
|
17
|
+
const key = isOptionTypeObject ? option.value : option;
|
|
18
|
+
const value = isOptionTypeObject ? option.value : option;
|
|
19
|
+
const content = isOptionTypeObject ? option.label : option;
|
|
20
|
+
return /*#__PURE__*/_jsx(OptionComponent, {
|
|
21
|
+
value: value,
|
|
22
|
+
children: content
|
|
23
|
+
}, key);
|
|
24
|
+
};
|
|
21
25
|
|
|
22
26
|
function GridEditSingleSelectCell(props) {
|
|
23
27
|
const {
|
|
@@ -36,6 +40,8 @@ function GridEditSingleSelectCell(props) {
|
|
|
36
40
|
const inputRef = React.useRef();
|
|
37
41
|
const rootProps = useGridRootProps();
|
|
38
42
|
const [open, setOpen] = React.useState(rootProps.editMode === 'cell');
|
|
43
|
+
const baseSelectProps = rootProps.componentsProps?.baseSelect || {};
|
|
44
|
+
const isSelectNative = baseSelectProps.native ?? false;
|
|
39
45
|
let valueOptionsFormatted;
|
|
40
46
|
|
|
41
47
|
if (typeof colDef.valueOptions === 'function') {
|
|
@@ -68,11 +74,13 @@ function GridEditSingleSelectCell(props) {
|
|
|
68
74
|
|
|
69
75
|
const handleChange = async event => {
|
|
70
76
|
setOpen(false);
|
|
71
|
-
const target = event.target;
|
|
77
|
+
const target = event.target; // NativeSelect casts the value to a string.
|
|
78
|
+
|
|
79
|
+
const formattedTargetValue = getValueFromValueOptions(target.value, valueOptionsFormatted);
|
|
72
80
|
const isValid = await api.setEditCellValue({
|
|
73
81
|
id,
|
|
74
82
|
field,
|
|
75
|
-
value:
|
|
83
|
+
value: formattedTargetValue
|
|
76
84
|
}, event);
|
|
77
85
|
|
|
78
86
|
if (rootProps.experimentalFeatures?.newEditingApi) {
|
|
@@ -139,9 +147,10 @@ function GridEditSingleSelectCell(props) {
|
|
|
139
147
|
onClose: handleClose
|
|
140
148
|
},
|
|
141
149
|
error: error,
|
|
150
|
+
native: isSelectNative,
|
|
142
151
|
fullWidth: true
|
|
143
152
|
}, other, rootProps.componentsProps?.baseSelect, {
|
|
144
|
-
children: valueOptionsFormatted.map(renderSingleSelectOptions)
|
|
153
|
+
children: valueOptionsFormatted.map(valueOptions => renderSingleSelectOptions(valueOptions, isSelectNative ? 'option' : MenuItem))
|
|
145
154
|
}));
|
|
146
155
|
}
|
|
147
156
|
|
|
@@ -175,13 +184,13 @@ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
|
|
|
175
184
|
/**
|
|
176
185
|
* The cell value formatted with the column valueFormatter.
|
|
177
186
|
*/
|
|
178
|
-
formattedValue: PropTypes.any
|
|
187
|
+
formattedValue: PropTypes.any,
|
|
179
188
|
|
|
180
189
|
/**
|
|
181
190
|
* Get the cell value of a row and field.
|
|
182
191
|
* @param {GridRowId} id The row id.
|
|
183
192
|
* @param {string} field The field.
|
|
184
|
-
* @returns {
|
|
193
|
+
* @returns {any} The cell value.
|
|
185
194
|
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
186
195
|
*/
|
|
187
196
|
getValue: PropTypes.func.isRequired,
|
|
@@ -206,7 +215,7 @@ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
|
|
|
206
215
|
/**
|
|
207
216
|
* The row model of the row that the current cell belongs to.
|
|
208
217
|
*/
|
|
209
|
-
row: PropTypes.
|
|
218
|
+
row: PropTypes.object.isRequired,
|
|
210
219
|
|
|
211
220
|
/**
|
|
212
221
|
* The node of the row that the current cell belongs to.
|