@mui/x-data-grid-pro 7.29.0 → 7.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -0
- package/DataGridPro/DataGrid.js +2 -9
- package/DataGridPro/DataGridPro.js +231 -238
- package/DataGridPro/index.js +3 -39
- package/DataGridPro/package.json +2 -2
- package/DataGridPro/useDataGridProComponent.js +91 -99
- package/DataGridPro/useDataGridProProps.js +17 -26
- package/components/GridColumnHeaderCollapseIcon.js +0 -1
- package/components/GridColumnHeaders.js +39 -46
- package/components/GridColumnMenuPinningItem.js +39 -46
- package/components/GridDataSourceTreeDataGroupingCell.js +30 -38
- package/components/GridDetailPanel.js +14 -18
- package/components/GridDetailPanelToggleCell.js +35 -42
- package/components/GridDetailPanels.js +19 -25
- package/components/GridPinnedRows.js +12 -20
- package/components/GridProColumnMenu.js +11 -19
- package/components/GridRowReorderCell.js +36 -45
- package/components/GridTreeDataGroupingCell.js +37 -44
- package/components/headerFiltering/GridHeaderFilterCell.js +71 -78
- package/components/headerFiltering/GridHeaderFilterClearButton.js +9 -16
- package/components/headerFiltering/GridHeaderFilterMenu.js +36 -43
- package/components/headerFiltering/GridHeaderFilterMenuContainer.js +41 -48
- package/components/headerFiltering/index.js +3 -38
- package/components/index.js +7 -71
- package/components/package.json +2 -2
- package/components/reexports.js +1 -24
- package/constants/dataGridProDefaultSlotsComponents.js +16 -23
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +30 -39
- package/hooks/features/columnPinning/gridColumnPinningInterface.js +1 -5
- package/hooks/features/columnPinning/index.js +1 -16
- package/hooks/features/columnPinning/useGridColumnPinning.js +32 -42
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +10 -19
- package/hooks/features/columnReorder/columnReorderInterfaces.js +1 -5
- package/hooks/features/columnReorder/columnReorderSelector.js +3 -10
- package/hooks/features/columnReorder/index.js +2 -16
- package/hooks/features/columnReorder/useGridColumnReorder.js +25 -35
- package/hooks/features/dataSource/cache.js +3 -11
- package/hooks/features/dataSource/gridDataSourceSelector.js +10 -18
- package/hooks/features/dataSource/interfaces.js +1 -5
- package/hooks/features/dataSource/useGridDataSource.js +34 -44
- package/hooks/features/dataSource/utils.js +9 -17
- package/hooks/features/detailPanel/gridDetailPanelInterface.js +1 -5
- package/hooks/features/detailPanel/gridDetailPanelSelector.js +5 -14
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +14 -27
- package/hooks/features/detailPanel/index.js +3 -53
- package/hooks/features/detailPanel/useGridDetailPanel.js +39 -48
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +18 -27
- package/hooks/features/index.js +9 -99
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +18 -27
- package/hooks/features/lazyLoader/useGridLazyLoader.js +14 -22
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +13 -22
- package/hooks/features/rowPinning/gridRowPinningInterface.js +1 -5
- package/hooks/features/rowPinning/gridRowPinningSelector.js +1 -18
- package/hooks/features/rowPinning/index.js +1 -16
- package/hooks/features/rowPinning/useGridRowPinning.js +13 -23
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +24 -34
- package/hooks/features/rowReorder/gridRowReorderColDef.js +5 -12
- package/hooks/features/rowReorder/index.js +1 -16
- package/hooks/features/rowReorder/useGridRowReorder.js +20 -29
- package/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +12 -21
- package/hooks/features/rows/index.js +1 -16
- package/hooks/features/rows/useGridRowAriaAttributes.js +14 -22
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +37 -46
- package/hooks/features/serverSideTreeData/utils.js +6 -13
- package/hooks/features/treeData/gridTreeDataGroupColDef.js +9 -20
- package/hooks/features/treeData/gridTreeDataUtils.js +6 -12
- package/hooks/features/treeData/index.js +1 -12
- package/hooks/features/treeData/useGridTreeData.js +7 -15
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +37 -46
- package/hooks/index.js +1 -16
- package/hooks/package.json +2 -2
- package/hooks/utils/useGridApiContext.js +2 -8
- package/hooks/utils/useGridApiRef.js +2 -8
- package/hooks/utils/useGridAriaAttributes.js +8 -16
- package/hooks/utils/useGridPrivateApiContext.js +2 -8
- package/hooks/utils/useGridRootProps.js +2 -8
- package/index.js +19 -210
- package/internals/index.js +34 -301
- package/internals/package.json +2 -2
- package/internals/propValidation.js +2 -8
- package/locales/package.json +6 -0
- package/material/icons.js +7 -14
- package/material/index.js +6 -13
- package/material/package.json +2 -2
- package/models/dataGridProProps.js +1 -5
- package/models/gridApiPro.js +1 -5
- package/models/gridFetchRowsParams.js +1 -5
- package/models/gridGroupingColDefOverride.js +1 -5
- package/models/gridProIconSlotsComponent.js +1 -5
- package/models/gridProSlotProps.js +1 -5
- package/models/gridProSlotsComponent.js +1 -5
- package/models/gridRowOrderChangeParams.js +1 -5
- package/models/gridRowScrollEndParams.js +1 -5
- package/models/gridStatePro.js +1 -5
- package/models/index.js +8 -82
- package/models/package.json +2 -2
- package/modern/components/GridDetailPanel.js +2 -0
- package/modern/components/GridDetailPanels.js +2 -0
- package/modern/components/headerFiltering/GridHeaderFilterMenu.js +2 -2
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +3 -2
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/{esm → node}/DataGridPro/DataGrid.js +9 -2
- package/{esm → node}/DataGridPro/DataGridPro.js +238 -231
- package/node/DataGridPro/index.js +39 -0
- package/node/DataGridPro/useDataGridProComponent.js +111 -0
- package/node/DataGridPro/useDataGridProProps.js +61 -0
- package/node/components/GridColumnHeaderCollapseIcon.js +1 -0
- package/node/components/GridColumnHeaders.js +99 -0
- package/node/components/GridColumnMenuPinningItem.js +97 -0
- package/node/components/GridDataSourceTreeDataGroupingCell.js +118 -0
- package/{esm → node}/components/GridDetailPanel.js +20 -13
- package/node/components/GridDetailPanelToggleCell.js +128 -0
- package/node/components/GridDetailPanels.js +69 -0
- package/node/components/GridPinnedRows.js +48 -0
- package/node/components/GridProColumnMenu.js +29 -0
- package/{esm → node}/components/GridRowReorderCell.js +45 -36
- package/{esm → node}/components/GridTreeDataGroupingCell.js +44 -37
- package/{esm → node}/components/headerFiltering/GridHeaderFilterCell.js +78 -71
- package/node/components/headerFiltering/GridHeaderFilterClearButton.js +28 -0
- package/node/components/headerFiltering/GridHeaderFilterMenu.js +95 -0
- package/node/components/headerFiltering/GridHeaderFilterMenuContainer.js +106 -0
- package/node/components/headerFiltering/index.js +38 -0
- package/node/components/index.js +71 -0
- package/node/components/reexports.js +24 -0
- package/node/constants/dataGridProDefaultSlotsComponents.js +24 -0
- package/{esm → node}/hooks/features/columnHeaders/useGridColumnHeaders.js +39 -30
- package/node/hooks/features/columnPinning/gridColumnPinningInterface.js +5 -0
- package/node/hooks/features/columnPinning/index.js +16 -0
- package/{esm → node}/hooks/features/columnPinning/useGridColumnPinning.js +42 -32
- package/{esm → node}/hooks/features/columnPinning/useGridColumnPinningPreProcessors.js +19 -10
- package/node/hooks/features/columnReorder/columnReorderInterfaces.js +5 -0
- package/node/hooks/features/columnReorder/columnReorderSelector.js +10 -0
- package/node/hooks/features/columnReorder/index.js +16 -0
- package/{esm → node}/hooks/features/columnReorder/useGridColumnReorder.js +35 -25
- package/{esm → node}/hooks/features/dataSource/cache.js +11 -3
- package/node/hooks/features/dataSource/gridDataSourceSelector.js +32 -0
- package/node/hooks/features/dataSource/interfaces.js +5 -0
- package/{esm → node}/hooks/features/dataSource/useGridDataSource.js +44 -34
- package/{esm → node}/hooks/features/dataSource/utils.js +17 -9
- package/node/hooks/features/detailPanel/gridDetailPanelInterface.js +5 -0
- package/node/hooks/features/detailPanel/gridDetailPanelSelector.js +21 -0
- package/node/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +47 -0
- package/node/hooks/features/detailPanel/index.js +53 -0
- package/{esm → node}/hooks/features/detailPanel/useGridDetailPanel.js +49 -38
- package/node/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +52 -0
- package/node/hooks/features/index.js +99 -0
- package/{esm → node}/hooks/features/infiniteLoader/useGridInfiniteLoader.js +27 -18
- package/{esm → node}/hooks/features/lazyLoader/useGridLazyLoader.js +22 -14
- package/node/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +43 -0
- package/node/hooks/features/rowPinning/gridRowPinningInterface.js +5 -0
- package/node/hooks/features/rowPinning/gridRowPinningSelector.js +18 -0
- package/node/hooks/features/rowPinning/index.js +16 -0
- package/node/hooks/features/rowPinning/useGridRowPinning.js +62 -0
- package/{esm → node}/hooks/features/rowPinning/useGridRowPinningPreProcessors.js +34 -24
- package/node/hooks/features/rowReorder/gridRowReorderColDef.js +27 -0
- package/node/hooks/features/rowReorder/index.js +16 -0
- package/{esm → node}/hooks/features/rowReorder/useGridRowReorder.js +29 -20
- package/{esm → node}/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +21 -12
- package/node/hooks/features/rows/index.js +16 -0
- package/node/hooks/features/rows/useGridRowAriaAttributes.js +45 -0
- package/{esm → node}/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +46 -37
- package/node/hooks/features/serverSideTreeData/utils.js +27 -0
- package/node/hooks/features/treeData/gridTreeDataGroupColDef.js +38 -0
- package/{esm → node}/hooks/features/treeData/gridTreeDataUtils.js +12 -6
- package/node/hooks/features/treeData/index.js +12 -0
- package/node/hooks/features/treeData/useGridTreeData.js +30 -0
- package/{esm → node}/hooks/features/treeData/useGridTreeDataPreProcessors.js +46 -37
- package/node/hooks/index.js +16 -0
- package/node/hooks/utils/useGridApiContext.js +8 -0
- package/node/hooks/utils/useGridApiRef.js +8 -0
- package/node/hooks/utils/useGridAriaAttributes.js +19 -0
- package/node/hooks/utils/useGridPrivateApiContext.js +8 -0
- package/node/hooks/utils/useGridRootProps.js +8 -0
- package/node/index.js +220 -0
- package/node/internals/index.js +302 -0
- package/node/internals/propValidation.js +8 -0
- package/node/material/icons.js +24 -0
- package/node/material/index.js +15 -0
- package/node/models/dataGridProProps.js +5 -0
- package/node/models/gridApiPro.js +5 -0
- package/node/models/gridFetchRowsParams.js +5 -0
- package/node/models/gridGroupingColDefOverride.js +5 -0
- package/node/models/gridProIconSlotsComponent.js +5 -0
- package/node/models/gridProSlotProps.js +5 -0
- package/node/models/gridProSlotsComponent.js +5 -0
- package/node/models/gridRowOrderChangeParams.js +5 -0
- package/node/models/gridRowScrollEndParams.js +5 -0
- package/node/models/gridStatePro.js +5 -0
- package/node/models/index.js +82 -0
- package/node/themeAugmentation/index.js +27 -0
- package/node/themeAugmentation/overrides.js +5 -0
- package/node/themeAugmentation/props.js +5 -0
- package/node/typeOverloads/index.js +16 -0
- package/node/typeOverloads/modules.js +5 -0
- package/node/typeOverloads/reexports.js +26 -0
- package/node/utils/index.js +16 -0
- package/node/utils/releaseInfo.js +20 -0
- package/{esm → node}/utils/tree/createRowTree.js +14 -7
- package/node/utils/tree/index.js +12 -0
- package/{esm → node}/utils/tree/insertDataRowInTree.js +18 -11
- package/node/utils/tree/models.js +5 -0
- package/{esm → node}/utils/tree/removeDataRowFromTree.js +16 -9
- package/{esm → node}/utils/tree/sortRowTree.js +12 -5
- package/{esm → node}/utils/tree/updateRowTree.js +26 -18
- package/{esm → node}/utils/tree/utils.js +34 -18
- package/package.json +6 -6
- package/themeAugmentation/index.js +4 -27
- package/themeAugmentation/overrides.js +1 -5
- package/themeAugmentation/package.json +2 -2
- package/themeAugmentation/props.js +1 -5
- package/typeOverloads/index.js +1 -16
- package/typeOverloads/modules.js +1 -5
- package/typeOverloads/package.json +2 -2
- package/typeOverloads/reexports.js +14 -25
- package/utils/index.js +1 -16
- package/utils/package.json +2 -2
- package/utils/releaseInfo.js +5 -12
- package/utils/tree/createRowTree.js +7 -14
- package/utils/tree/index.js +1 -12
- package/utils/tree/insertDataRowInTree.js +11 -18
- package/utils/tree/models.js +1 -5
- package/utils/tree/removeDataRowFromTree.js +9 -16
- package/utils/tree/sortRowTree.js +5 -12
- package/utils/tree/updateRowTree.js +18 -26
- package/utils/tree/utils.js +18 -34
- package/esm/DataGridPro/index.js +0 -3
- package/esm/DataGridPro/useDataGridProComponent.js +0 -103
- package/esm/DataGridPro/useDataGridProProps.js +0 -52
- package/esm/components/GridColumnHeaderCollapseIcon.js +0 -0
- package/esm/components/GridColumnHeaders.js +0 -92
- package/esm/components/GridColumnMenuPinningItem.js +0 -90
- package/esm/components/GridDataSourceTreeDataGroupingCell.js +0 -110
- package/esm/components/GridDetailPanelToggleCell.js +0 -121
- package/esm/components/GridDetailPanels.js +0 -60
- package/esm/components/GridPinnedRows.js +0 -40
- package/esm/components/GridProColumnMenu.js +0 -21
- package/esm/components/headerFiltering/GridHeaderFilterClearButton.js +0 -21
- package/esm/components/headerFiltering/GridHeaderFilterMenu.js +0 -88
- package/esm/components/headerFiltering/GridHeaderFilterMenuContainer.js +0 -99
- package/esm/components/headerFiltering/index.js +0 -3
- package/esm/components/index.js +0 -7
- package/esm/components/reexports.js +0 -1
- package/esm/constants/dataGridProDefaultSlotsComponents.js +0 -17
- package/esm/hooks/features/columnPinning/gridColumnPinningInterface.js +0 -1
- package/esm/hooks/features/columnPinning/index.js +0 -1
- package/esm/hooks/features/columnReorder/columnReorderInterfaces.js +0 -1
- package/esm/hooks/features/columnReorder/columnReorderSelector.js +0 -3
- package/esm/hooks/features/columnReorder/index.js +0 -2
- package/esm/hooks/features/dataSource/gridDataSourceSelector.js +0 -24
- package/esm/hooks/features/dataSource/interfaces.js +0 -1
- package/esm/hooks/features/detailPanel/gridDetailPanelInterface.js +0 -1
- package/esm/hooks/features/detailPanel/gridDetailPanelSelector.js +0 -12
- package/esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +0 -34
- package/esm/hooks/features/detailPanel/index.js +0 -3
- package/esm/hooks/features/detailPanel/useGridDetailPanelPreProcessors.js +0 -43
- package/esm/hooks/features/index.js +0 -9
- package/esm/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.js +0 -34
- package/esm/hooks/features/rowPinning/gridRowPinningInterface.js +0 -1
- package/esm/hooks/features/rowPinning/gridRowPinningSelector.js +0 -1
- package/esm/hooks/features/rowPinning/index.js +0 -1
- package/esm/hooks/features/rowPinning/useGridRowPinning.js +0 -52
- package/esm/hooks/features/rowReorder/gridRowReorderColDef.js +0 -20
- package/esm/hooks/features/rowReorder/index.js +0 -1
- package/esm/hooks/features/rows/index.js +0 -1
- package/esm/hooks/features/rows/useGridRowAriaAttributes.js +0 -37
- package/esm/hooks/features/serverSideTreeData/utils.js +0 -20
- package/esm/hooks/features/treeData/gridTreeDataGroupColDef.js +0 -27
- package/esm/hooks/features/treeData/index.js +0 -1
- package/esm/hooks/features/treeData/useGridTreeData.js +0 -22
- package/esm/hooks/index.js +0 -1
- package/esm/hooks/utils/useGridApiContext.js +0 -2
- package/esm/hooks/utils/useGridApiRef.js +0 -2
- package/esm/hooks/utils/useGridAriaAttributes.js +0 -11
- package/esm/hooks/utils/useGridPrivateApiContext.js +0 -2
- package/esm/hooks/utils/useGridRootProps.js +0 -2
- package/esm/index.js +0 -22
- package/esm/internals/index.js +0 -35
- package/esm/internals/propValidation.js +0 -2
- package/esm/material/icons.js +0 -17
- package/esm/material/index.js +0 -8
- package/esm/models/dataGridProProps.js +0 -1
- package/esm/models/gridApiPro.js +0 -1
- package/esm/models/gridFetchRowsParams.js +0 -1
- package/esm/models/gridGroupingColDefOverride.js +0 -1
- package/esm/models/gridProIconSlotsComponent.js +0 -1
- package/esm/models/gridProSlotProps.js +0 -1
- package/esm/models/gridProSlotsComponent.js +0 -1
- package/esm/models/gridRowOrderChangeParams.js +0 -1
- package/esm/models/gridRowScrollEndParams.js +0 -1
- package/esm/models/gridStatePro.js +0 -1
- package/esm/models/index.js +0 -8
- package/esm/themeAugmentation/index.js +0 -4
- package/esm/themeAugmentation/overrides.js +0 -1
- package/esm/themeAugmentation/props.js +0 -1
- package/esm/typeOverloads/index.js +0 -1
- package/esm/typeOverloads/modules.js +0 -1
- package/esm/typeOverloads/reexports.js +0 -15
- package/esm/utils/index.js +0 -1
- package/esm/utils/releaseInfo.js +0 -13
- package/esm/utils/tree/index.js +0 -1
- package/esm/utils/tree/models.js +0 -1
- /package/{locales.d.ts → locales/index.d.ts} +0 -0
- /package/{esm/locales.js → locales/index.js} +0 -0
- /package/modern/{locales.js → locales/index.js} +0 -0
- /package/{locales.js → node/locales/index.js} +0 -0
|
@@ -1,50 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
'use client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var _useDataGridProProps = require("./useDataGridProProps");
|
|
19
|
-
var _releaseInfo = require("../utils/releaseInfo");
|
|
20
|
-
var _propValidation = require("../internals/propValidation");
|
|
21
|
-
var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
|
|
22
|
-
var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
|
|
23
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { useLicenseVerifier, Watermark } from '@mui/x-license';
|
|
7
|
+
import { GridRoot, GridContextProvider } from '@mui/x-data-grid';
|
|
8
|
+
import { validateProps } from '@mui/x-data-grid/internals';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
|
+
import { useDataGridProComponent } from "./useDataGridProComponent.js";
|
|
11
|
+
import { useDataGridProProps } from "./useDataGridProProps.js";
|
|
12
|
+
import { getReleaseInfo } from "../utils/releaseInfo.js";
|
|
13
|
+
import { propValidatorsDataGridPro } from "../internals/propValidation.js";
|
|
14
|
+
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
15
|
+
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
17
|
const configuration = {
|
|
25
18
|
hooks: {
|
|
26
|
-
useGridAriaAttributes
|
|
27
|
-
useGridRowAriaAttributes
|
|
19
|
+
useGridAriaAttributes,
|
|
20
|
+
useGridRowAriaAttributes,
|
|
28
21
|
useCellAggregationResult: () => null
|
|
29
22
|
}
|
|
30
23
|
};
|
|
31
|
-
const releaseInfo =
|
|
32
|
-
const watermark = /*#__PURE__*/(
|
|
24
|
+
const releaseInfo = getReleaseInfo();
|
|
25
|
+
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
33
26
|
packageName: "x-data-grid-pro",
|
|
34
27
|
releaseInfo: releaseInfo
|
|
35
28
|
});
|
|
36
|
-
const DataGridProRaw =
|
|
37
|
-
const props =
|
|
38
|
-
const privateApiRef =
|
|
39
|
-
|
|
29
|
+
const DataGridProRaw = forwardRef(function DataGridPro(inProps, ref) {
|
|
30
|
+
const props = useDataGridProProps(inProps);
|
|
31
|
+
const privateApiRef = useDataGridProComponent(props.apiRef, props);
|
|
32
|
+
useLicenseVerifier('x-data-grid-pro', releaseInfo);
|
|
40
33
|
if (process.env.NODE_ENV !== 'production') {
|
|
41
|
-
|
|
34
|
+
validateProps(props, propValidatorsDataGridPro);
|
|
42
35
|
}
|
|
43
|
-
return /*#__PURE__*/(
|
|
36
|
+
return /*#__PURE__*/_jsx(GridContextProvider, {
|
|
44
37
|
privateApiRef: privateApiRef,
|
|
45
38
|
configuration: configuration,
|
|
46
39
|
props: props,
|
|
47
|
-
children: /*#__PURE__*/(
|
|
40
|
+
children: /*#__PURE__*/_jsx(GridRoot, _extends({
|
|
48
41
|
className: props.className,
|
|
49
42
|
style: props.style,
|
|
50
43
|
sx: props.sx
|
|
@@ -61,7 +54,7 @@ const DataGridProRaw = (0, _forwardRef.forwardRef)(function DataGridPro(inProps,
|
|
|
61
54
|
* API:
|
|
62
55
|
* - [DataGridPro API](https://mui.com/x/api/data-grid/data-grid-pro/)
|
|
63
56
|
*/
|
|
64
|
-
const DataGridPro =
|
|
57
|
+
export const DataGridPro = /*#__PURE__*/React.memo(DataGridProRaw);
|
|
65
58
|
DataGridProRaw.propTypes = {
|
|
66
59
|
// ----------------------------- Warning --------------------------------
|
|
67
60
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -70,17 +63,17 @@ DataGridProRaw.propTypes = {
|
|
|
70
63
|
/**
|
|
71
64
|
* The ref object that allows grid manipulation. Can be instantiated with `useGridApiRef()`.
|
|
72
65
|
*/
|
|
73
|
-
apiRef:
|
|
74
|
-
current:
|
|
66
|
+
apiRef: PropTypes.shape({
|
|
67
|
+
current: PropTypes.object.isRequired
|
|
75
68
|
}),
|
|
76
69
|
/**
|
|
77
70
|
* The label of the Data Grid.
|
|
78
71
|
*/
|
|
79
|
-
'aria-label':
|
|
72
|
+
'aria-label': PropTypes.string,
|
|
80
73
|
/**
|
|
81
74
|
* The id of the element containing a label for the Data Grid.
|
|
82
75
|
*/
|
|
83
|
-
'aria-labelledby':
|
|
76
|
+
'aria-labelledby': PropTypes.string,
|
|
84
77
|
/**
|
|
85
78
|
* If `true`, the Data Grid height is dynamic and follows the number of rows in the Data Grid.
|
|
86
79
|
* @default false
|
|
@@ -90,246 +83,246 @@ DataGridProRaw.propTypes = {
|
|
|
90
83
|
* <DataGrid />
|
|
91
84
|
* </div>
|
|
92
85
|
*/
|
|
93
|
-
autoHeight:
|
|
86
|
+
autoHeight: PropTypes.bool,
|
|
94
87
|
/**
|
|
95
88
|
* If `true`, the pageSize is calculated according to the container size and the max number of rows to avoid rendering a vertical scroll bar.
|
|
96
89
|
* @default false
|
|
97
90
|
*/
|
|
98
|
-
autoPageSize:
|
|
91
|
+
autoPageSize: PropTypes.bool,
|
|
99
92
|
/**
|
|
100
93
|
* If `true`, columns are autosized after the datagrid is mounted.
|
|
101
94
|
* @default false
|
|
102
95
|
*/
|
|
103
|
-
autosizeOnMount:
|
|
96
|
+
autosizeOnMount: PropTypes.bool,
|
|
104
97
|
/**
|
|
105
98
|
* The options for autosize when user-initiated.
|
|
106
99
|
*/
|
|
107
|
-
autosizeOptions:
|
|
108
|
-
columns:
|
|
109
|
-
disableColumnVirtualization:
|
|
110
|
-
expand:
|
|
111
|
-
includeHeaders:
|
|
112
|
-
includeOutliers:
|
|
113
|
-
outliersFactor:
|
|
100
|
+
autosizeOptions: PropTypes.shape({
|
|
101
|
+
columns: PropTypes.arrayOf(PropTypes.string),
|
|
102
|
+
disableColumnVirtualization: PropTypes.bool,
|
|
103
|
+
expand: PropTypes.bool,
|
|
104
|
+
includeHeaders: PropTypes.bool,
|
|
105
|
+
includeOutliers: PropTypes.bool,
|
|
106
|
+
outliersFactor: PropTypes.number
|
|
114
107
|
}),
|
|
115
108
|
/**
|
|
116
109
|
* Controls the modes of the cells.
|
|
117
110
|
*/
|
|
118
|
-
cellModesModel:
|
|
111
|
+
cellModesModel: PropTypes.object,
|
|
119
112
|
/**
|
|
120
113
|
* If `true`, the Data Grid will display an extra column with checkboxes for selecting rows.
|
|
121
114
|
* @default false
|
|
122
115
|
*/
|
|
123
|
-
checkboxSelection:
|
|
116
|
+
checkboxSelection: PropTypes.bool,
|
|
124
117
|
/**
|
|
125
118
|
* If `true`, the "Select All" header checkbox selects only the rows on the current page. To be used in combination with `checkboxSelection`.
|
|
126
119
|
* It only works if the pagination is enabled.
|
|
127
120
|
* @default false
|
|
128
121
|
*/
|
|
129
|
-
checkboxSelectionVisibleOnly:
|
|
122
|
+
checkboxSelectionVisibleOnly: PropTypes.bool,
|
|
130
123
|
/**
|
|
131
124
|
* Override or extend the styles applied to the component.
|
|
132
125
|
*/
|
|
133
|
-
classes:
|
|
126
|
+
classes: PropTypes.object,
|
|
134
127
|
/**
|
|
135
128
|
* The character used to separate cell values when copying to the clipboard.
|
|
136
129
|
* @default '\t'
|
|
137
130
|
*/
|
|
138
|
-
clipboardCopyCellDelimiter:
|
|
131
|
+
clipboardCopyCellDelimiter: PropTypes.string,
|
|
139
132
|
/**
|
|
140
133
|
* Column region in pixels to render before/after the viewport
|
|
141
134
|
* @default 150
|
|
142
135
|
*/
|
|
143
|
-
columnBufferPx:
|
|
136
|
+
columnBufferPx: PropTypes.number,
|
|
144
137
|
/**
|
|
145
138
|
* Sets the height in pixels of the column group headers in the Data Grid.
|
|
146
139
|
* Inherits the `columnHeaderHeight` value if not set.
|
|
147
140
|
*/
|
|
148
|
-
columnGroupHeaderHeight:
|
|
149
|
-
columnGroupingModel:
|
|
141
|
+
columnGroupHeaderHeight: PropTypes.number,
|
|
142
|
+
columnGroupingModel: PropTypes.arrayOf(PropTypes.object),
|
|
150
143
|
/**
|
|
151
144
|
* Sets the height in pixel of the column headers in the Data Grid.
|
|
152
145
|
* @default 56
|
|
153
146
|
*/
|
|
154
|
-
columnHeaderHeight:
|
|
147
|
+
columnHeaderHeight: PropTypes.number,
|
|
155
148
|
/**
|
|
156
149
|
* Set of columns of type [[GridColDef]][].
|
|
157
150
|
*/
|
|
158
|
-
columns:
|
|
151
|
+
columns: PropTypes.arrayOf(PropTypes.object).isRequired,
|
|
159
152
|
/**
|
|
160
153
|
* Set the column visibility model of the Data Grid.
|
|
161
154
|
* If defined, the Data Grid will ignore the `hide` property in [[GridColDef]].
|
|
162
155
|
*/
|
|
163
|
-
columnVisibilityModel:
|
|
156
|
+
columnVisibilityModel: PropTypes.object,
|
|
164
157
|
/**
|
|
165
158
|
* If above 0, the row children will be expanded up to this depth.
|
|
166
159
|
* If equal to -1, all the row children will be expanded.
|
|
167
160
|
* @default 0
|
|
168
161
|
*/
|
|
169
|
-
defaultGroupingExpansionDepth:
|
|
162
|
+
defaultGroupingExpansionDepth: PropTypes.number,
|
|
170
163
|
/**
|
|
171
164
|
* Set the density of the Data Grid.
|
|
172
165
|
* @default "standard"
|
|
173
166
|
*/
|
|
174
|
-
density:
|
|
167
|
+
density: PropTypes.oneOf(['comfortable', 'compact', 'standard']),
|
|
175
168
|
/**
|
|
176
169
|
* The row ids to show the detail panel.
|
|
177
170
|
*/
|
|
178
|
-
detailPanelExpandedRowIds:
|
|
171
|
+
detailPanelExpandedRowIds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired),
|
|
179
172
|
/**
|
|
180
173
|
* If `true`, column autosizing on header separator double-click is disabled.
|
|
181
174
|
* @default false
|
|
182
175
|
*/
|
|
183
|
-
disableAutosize:
|
|
176
|
+
disableAutosize: PropTypes.bool,
|
|
184
177
|
/**
|
|
185
178
|
* If `true`, the filtering will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
186
179
|
* @default false
|
|
187
180
|
*/
|
|
188
|
-
disableChildrenFiltering:
|
|
181
|
+
disableChildrenFiltering: PropTypes.bool,
|
|
189
182
|
/**
|
|
190
183
|
* If `true`, the sorting will only be applied to the top level rows when grouping rows with the `treeData` prop.
|
|
191
184
|
* @default false
|
|
192
185
|
*/
|
|
193
|
-
disableChildrenSorting:
|
|
186
|
+
disableChildrenSorting: PropTypes.bool,
|
|
194
187
|
/**
|
|
195
188
|
* If `true`, column filters are disabled.
|
|
196
189
|
* @default false
|
|
197
190
|
*/
|
|
198
|
-
disableColumnFilter:
|
|
191
|
+
disableColumnFilter: PropTypes.bool,
|
|
199
192
|
/**
|
|
200
193
|
* If `true`, the column menu is disabled.
|
|
201
194
|
* @default false
|
|
202
195
|
*/
|
|
203
|
-
disableColumnMenu:
|
|
196
|
+
disableColumnMenu: PropTypes.bool,
|
|
204
197
|
/**
|
|
205
198
|
* If `true`, the column pinning is disabled.
|
|
206
199
|
* @default false
|
|
207
200
|
*/
|
|
208
|
-
disableColumnPinning:
|
|
201
|
+
disableColumnPinning: PropTypes.bool,
|
|
209
202
|
/**
|
|
210
203
|
* If `true`, reordering columns is disabled.
|
|
211
204
|
* @default false
|
|
212
205
|
*/
|
|
213
|
-
disableColumnReorder:
|
|
206
|
+
disableColumnReorder: PropTypes.bool,
|
|
214
207
|
/**
|
|
215
208
|
* If `true`, resizing columns is disabled.
|
|
216
209
|
* @default false
|
|
217
210
|
*/
|
|
218
|
-
disableColumnResize:
|
|
211
|
+
disableColumnResize: PropTypes.bool,
|
|
219
212
|
/**
|
|
220
213
|
* If `true`, hiding/showing columns is disabled.
|
|
221
214
|
* @default false
|
|
222
215
|
*/
|
|
223
|
-
disableColumnSelector:
|
|
216
|
+
disableColumnSelector: PropTypes.bool,
|
|
224
217
|
/**
|
|
225
218
|
* If `true`, the column sorting feature will be disabled.
|
|
226
219
|
* @default false
|
|
227
220
|
*/
|
|
228
|
-
disableColumnSorting:
|
|
221
|
+
disableColumnSorting: PropTypes.bool,
|
|
229
222
|
/**
|
|
230
223
|
* If `true`, the density selector is disabled.
|
|
231
224
|
* @default false
|
|
232
225
|
*/
|
|
233
|
-
disableDensitySelector:
|
|
226
|
+
disableDensitySelector: PropTypes.bool,
|
|
234
227
|
/**
|
|
235
228
|
* If `true`, `eval()` is not used for performance optimization.
|
|
236
229
|
* @default false
|
|
237
230
|
*/
|
|
238
|
-
disableEval:
|
|
231
|
+
disableEval: PropTypes.bool,
|
|
239
232
|
/**
|
|
240
233
|
* If `true`, filtering with multiple columns is disabled.
|
|
241
234
|
* @default false
|
|
242
235
|
*/
|
|
243
|
-
disableMultipleColumnsFiltering:
|
|
236
|
+
disableMultipleColumnsFiltering: PropTypes.bool,
|
|
244
237
|
/**
|
|
245
238
|
* If `true`, the sorting with multiple columns is disabled.
|
|
246
239
|
* @default false
|
|
247
240
|
*/
|
|
248
|
-
disableMultipleColumnsSorting:
|
|
241
|
+
disableMultipleColumnsSorting: PropTypes.bool,
|
|
249
242
|
/**
|
|
250
243
|
* If `true`, multiple selection using the Ctrl/CMD or Shift key is disabled.
|
|
251
244
|
* The MIT DataGrid will ignore this prop, unless `checkboxSelection` is enabled.
|
|
252
245
|
* @default false (`!props.checkboxSelection` for MIT Data Grid)
|
|
253
246
|
*/
|
|
254
|
-
disableMultipleRowSelection:
|
|
247
|
+
disableMultipleRowSelection: PropTypes.bool,
|
|
255
248
|
/**
|
|
256
249
|
* If `true`, the selection on click on a row or cell is disabled.
|
|
257
250
|
* @default false
|
|
258
251
|
*/
|
|
259
|
-
disableRowSelectionOnClick:
|
|
252
|
+
disableRowSelectionOnClick: PropTypes.bool,
|
|
260
253
|
/**
|
|
261
254
|
* If `true`, the virtualization is disabled.
|
|
262
255
|
* @default false
|
|
263
256
|
*/
|
|
264
|
-
disableVirtualization:
|
|
257
|
+
disableVirtualization: PropTypes.bool,
|
|
265
258
|
/**
|
|
266
259
|
* Controls whether to use the cell or row editing.
|
|
267
260
|
* @default "cell"
|
|
268
261
|
*/
|
|
269
|
-
editMode:
|
|
262
|
+
editMode: PropTypes.oneOf(['cell', 'row']),
|
|
270
263
|
/**
|
|
271
264
|
* Use if the actual rowCount is not known upfront, but an estimation is available.
|
|
272
265
|
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
|
273
266
|
* Applicable only with `paginationMode="server"` and when `rowCount="-1"`
|
|
274
267
|
*/
|
|
275
|
-
estimatedRowCount:
|
|
268
|
+
estimatedRowCount: PropTypes.number,
|
|
276
269
|
/**
|
|
277
270
|
* Unstable features, breaking changes might be introduced.
|
|
278
271
|
* For each feature, if the flag is not explicitly set to `true`, the feature will be fully disabled and any property / method call will not have any effect.
|
|
279
272
|
*/
|
|
280
|
-
experimentalFeatures:
|
|
281
|
-
warnIfFocusStateIsNotSynced:
|
|
273
|
+
experimentalFeatures: PropTypes.shape({
|
|
274
|
+
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
282
275
|
}),
|
|
283
276
|
/**
|
|
284
277
|
* The milliseconds delay to wait after a keystroke before triggering filtering.
|
|
285
278
|
* @default 150
|
|
286
279
|
*/
|
|
287
|
-
filterDebounceMs:
|
|
280
|
+
filterDebounceMs: PropTypes.number,
|
|
288
281
|
/**
|
|
289
282
|
* Filtering can be processed on the server or client-side.
|
|
290
283
|
* Set it to 'server' if you would like to handle filtering on the server-side.
|
|
291
284
|
* @default "client"
|
|
292
285
|
*/
|
|
293
|
-
filterMode:
|
|
286
|
+
filterMode: PropTypes.oneOf(['client', 'server']),
|
|
294
287
|
/**
|
|
295
288
|
* Set the filter model of the Data Grid.
|
|
296
289
|
*/
|
|
297
|
-
filterModel:
|
|
298
|
-
items:
|
|
299
|
-
field:
|
|
300
|
-
id:
|
|
301
|
-
operator:
|
|
302
|
-
value:
|
|
290
|
+
filterModel: PropTypes.shape({
|
|
291
|
+
items: PropTypes.arrayOf(PropTypes.shape({
|
|
292
|
+
field: PropTypes.string.isRequired,
|
|
293
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
294
|
+
operator: PropTypes.string.isRequired,
|
|
295
|
+
value: PropTypes.any
|
|
303
296
|
})).isRequired,
|
|
304
|
-
logicOperator:
|
|
305
|
-
quickFilterExcludeHiddenColumns:
|
|
306
|
-
quickFilterLogicOperator:
|
|
307
|
-
quickFilterValues:
|
|
297
|
+
logicOperator: PropTypes.oneOf(['and', 'or']),
|
|
298
|
+
quickFilterExcludeHiddenColumns: PropTypes.bool,
|
|
299
|
+
quickFilterLogicOperator: PropTypes.oneOf(['and', 'or']),
|
|
300
|
+
quickFilterValues: PropTypes.array
|
|
308
301
|
}),
|
|
309
302
|
/**
|
|
310
303
|
* Forwarded props for the Data Grid root element.
|
|
311
304
|
* @ignore - do not document.
|
|
312
305
|
*/
|
|
313
|
-
forwardedProps:
|
|
306
|
+
forwardedProps: PropTypes.object,
|
|
314
307
|
/**
|
|
315
308
|
* Function that applies CSS classes dynamically on cells.
|
|
316
309
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
317
310
|
* @returns {string} The CSS class to apply to the cell.
|
|
318
311
|
*/
|
|
319
|
-
getCellClassName:
|
|
312
|
+
getCellClassName: PropTypes.func,
|
|
320
313
|
/**
|
|
321
314
|
* Function that returns the element to render in row detail.
|
|
322
315
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
323
316
|
* @returns {React.JSX.Element} The row detail element.
|
|
324
317
|
*/
|
|
325
|
-
getDetailPanelContent:
|
|
318
|
+
getDetailPanelContent: PropTypes.func,
|
|
326
319
|
/**
|
|
327
320
|
* Function that returns the height of the row detail panel.
|
|
328
321
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
329
322
|
* @returns {number | string} The height in pixels or "auto" to use the content height.
|
|
330
323
|
* @default "() => 500"
|
|
331
324
|
*/
|
|
332
|
-
getDetailPanelHeight:
|
|
325
|
+
getDetailPanelHeight: PropTypes.func,
|
|
333
326
|
/**
|
|
334
327
|
* Function that returns the estimated height for a row.
|
|
335
328
|
* Only works if dynamic row height is used.
|
|
@@ -337,31 +330,31 @@ DataGridProRaw.propTypes = {
|
|
|
337
330
|
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
|
338
331
|
* @returns {number | null} The estimated row height value. If `null` or `undefined` then the default row height, based on the density, is applied.
|
|
339
332
|
*/
|
|
340
|
-
getEstimatedRowHeight:
|
|
333
|
+
getEstimatedRowHeight: PropTypes.func,
|
|
341
334
|
/**
|
|
342
335
|
* Function that applies CSS classes dynamically on rows.
|
|
343
336
|
* @param {GridRowClassNameParams} params With all properties from [[GridRowClassNameParams]].
|
|
344
337
|
* @returns {string} The CSS class to apply to the row.
|
|
345
338
|
*/
|
|
346
|
-
getRowClassName:
|
|
339
|
+
getRowClassName: PropTypes.func,
|
|
347
340
|
/**
|
|
348
341
|
* Function that sets the row height per row.
|
|
349
342
|
* @param {GridRowHeightParams} params With all properties from [[GridRowHeightParams]].
|
|
350
343
|
* @returns {GridRowHeightReturnValue} The row height value. If `null` or `undefined` then the default row height is applied. If "auto" then the row height is calculated based on the content.
|
|
351
344
|
*/
|
|
352
|
-
getRowHeight:
|
|
345
|
+
getRowHeight: PropTypes.func,
|
|
353
346
|
/**
|
|
354
347
|
* Return the id of a given [[GridRowModel]].
|
|
355
348
|
* Ensure the reference of this prop is stable to avoid performance implications.
|
|
356
349
|
* It could be done by either defining the prop outside of the component or by memoizing it.
|
|
357
350
|
*/
|
|
358
|
-
getRowId:
|
|
351
|
+
getRowId: PropTypes.func,
|
|
359
352
|
/**
|
|
360
353
|
* Function that allows to specify the spacing between rows.
|
|
361
354
|
* @param {GridRowSpacingParams} params With all properties from [[GridRowSpacingParams]].
|
|
362
355
|
* @returns {GridRowSpacing} The row spacing values.
|
|
363
356
|
*/
|
|
364
|
-
getRowSpacing:
|
|
357
|
+
getRowSpacing: PropTypes.func,
|
|
365
358
|
/**
|
|
366
359
|
* Determines the path of a row in the tree data.
|
|
367
360
|
* For instance, a row with the path ["A", "B"] is the child of the row with the path ["A"].
|
|
@@ -370,56 +363,56 @@ DataGridProRaw.propTypes = {
|
|
|
370
363
|
* @param {R} row The row from which we want the path.
|
|
371
364
|
* @returns {string[]} The path to the row.
|
|
372
365
|
*/
|
|
373
|
-
getTreeDataPath:
|
|
366
|
+
getTreeDataPath: PropTypes.func,
|
|
374
367
|
/**
|
|
375
368
|
* The grouping column used by the tree data.
|
|
376
369
|
*/
|
|
377
|
-
groupingColDef:
|
|
370
|
+
groupingColDef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
378
371
|
/**
|
|
379
372
|
* Override the height of the header filters.
|
|
380
373
|
*/
|
|
381
|
-
headerFilterHeight:
|
|
374
|
+
headerFilterHeight: PropTypes.number,
|
|
382
375
|
/**
|
|
383
376
|
* If `true`, the header filters feature is enabled.
|
|
384
377
|
* @default false
|
|
385
378
|
*/
|
|
386
|
-
headerFilters:
|
|
379
|
+
headerFilters: PropTypes.bool,
|
|
387
380
|
/**
|
|
388
381
|
* If `true`, the footer component is hidden.
|
|
389
382
|
* @default false
|
|
390
383
|
*/
|
|
391
|
-
hideFooter:
|
|
384
|
+
hideFooter: PropTypes.bool,
|
|
392
385
|
/**
|
|
393
386
|
* If `true`, the pagination component in the footer is hidden.
|
|
394
387
|
* @default false
|
|
395
388
|
*/
|
|
396
|
-
hideFooterPagination:
|
|
389
|
+
hideFooterPagination: PropTypes.bool,
|
|
397
390
|
/**
|
|
398
391
|
* If `true`, the row count in the footer is hidden.
|
|
399
392
|
* It has no effect if the pagination is enabled.
|
|
400
393
|
* @default false
|
|
401
394
|
*/
|
|
402
|
-
hideFooterRowCount:
|
|
395
|
+
hideFooterRowCount: PropTypes.bool,
|
|
403
396
|
/**
|
|
404
397
|
* If `true`, the selected row count in the footer is hidden.
|
|
405
398
|
* @default false
|
|
406
399
|
*/
|
|
407
|
-
hideFooterSelectedRowCount:
|
|
400
|
+
hideFooterSelectedRowCount: PropTypes.bool,
|
|
408
401
|
/**
|
|
409
402
|
* If `true`, the diacritics (accents) are ignored when filtering or quick filtering.
|
|
410
403
|
* E.g. when filter value is `cafe`, the rows with `café` will be visible.
|
|
411
404
|
* @default false
|
|
412
405
|
*/
|
|
413
|
-
ignoreDiacritics:
|
|
406
|
+
ignoreDiacritics: PropTypes.bool,
|
|
414
407
|
/**
|
|
415
408
|
* If `true`, the Data Grid will not use `valueFormatter` when exporting to CSV or copying to clipboard.
|
|
416
409
|
* If an object is provided, you can choose to ignore the `valueFormatter` for CSV export or clipboard export.
|
|
417
410
|
* @default false
|
|
418
411
|
*/
|
|
419
|
-
ignoreValueFormatterDuringExport:
|
|
420
|
-
clipboardExport:
|
|
421
|
-
csvExport:
|
|
422
|
-
}),
|
|
412
|
+
ignoreValueFormatterDuringExport: PropTypes.oneOfType([PropTypes.shape({
|
|
413
|
+
clipboardExport: PropTypes.bool,
|
|
414
|
+
csvExport: PropTypes.bool
|
|
415
|
+
}), PropTypes.bool]),
|
|
423
416
|
/**
|
|
424
417
|
* If `select`, a group header checkbox in indeterminate state (like "Select All" checkbox)
|
|
425
418
|
* will select all the rows under it.
|
|
@@ -428,274 +421,274 @@ DataGridProRaw.propTypes = {
|
|
|
428
421
|
* @default "deselect"
|
|
429
422
|
* @deprecated `select` will be the default behavior from v8 onwards
|
|
430
423
|
*/
|
|
431
|
-
indeterminateCheckboxAction:
|
|
424
|
+
indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
|
|
432
425
|
/**
|
|
433
426
|
* The initial state of the DataGridPro.
|
|
434
427
|
* The data in it will be set in the state on initialization but will not be controlled.
|
|
435
428
|
* If one of the data in `initialState` is also being controlled, then the control state wins.
|
|
436
429
|
*/
|
|
437
|
-
initialState:
|
|
430
|
+
initialState: PropTypes.object,
|
|
438
431
|
/**
|
|
439
432
|
* Callback fired when a cell is rendered, returns true if the cell is editable.
|
|
440
433
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
441
434
|
* @returns {boolean} A boolean indicating if the cell is editable.
|
|
442
435
|
*/
|
|
443
|
-
isCellEditable:
|
|
436
|
+
isCellEditable: PropTypes.func,
|
|
444
437
|
/**
|
|
445
438
|
* Determines if a group should be expanded after its creation.
|
|
446
439
|
* This prop takes priority over the `defaultGroupingExpansionDepth` prop.
|
|
447
440
|
* @param {GridGroupNode} node The node of the group to test.
|
|
448
441
|
* @returns {boolean} A boolean indicating if the group is expanded.
|
|
449
442
|
*/
|
|
450
|
-
isGroupExpandedByDefault:
|
|
443
|
+
isGroupExpandedByDefault: PropTypes.func,
|
|
451
444
|
/**
|
|
452
445
|
* Determines if a row can be selected.
|
|
453
446
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
454
447
|
* @returns {boolean} A boolean indicating if the row is selectable.
|
|
455
448
|
*/
|
|
456
|
-
isRowSelectable:
|
|
449
|
+
isRowSelectable: PropTypes.func,
|
|
457
450
|
/**
|
|
458
451
|
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
459
452
|
* in a column re-order action will not cause the column to jump back to its original position.
|
|
460
453
|
* @default false
|
|
461
454
|
*/
|
|
462
|
-
keepColumnPositionIfDraggedOutside:
|
|
455
|
+
keepColumnPositionIfDraggedOutside: PropTypes.bool,
|
|
463
456
|
/**
|
|
464
457
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
465
458
|
* Useful when using server side pagination and row selections need to be retained
|
|
466
459
|
* when changing pages.
|
|
467
460
|
* @default false
|
|
468
461
|
*/
|
|
469
|
-
keepNonExistentRowsSelected:
|
|
462
|
+
keepNonExistentRowsSelected: PropTypes.bool,
|
|
470
463
|
/**
|
|
471
464
|
* If `true`, a loading overlay is displayed.
|
|
472
465
|
* @default false
|
|
473
466
|
*/
|
|
474
|
-
loading:
|
|
467
|
+
loading: PropTypes.bool,
|
|
475
468
|
/**
|
|
476
469
|
* Set the locale text of the Data Grid.
|
|
477
470
|
* You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/x-data-grid/src/constants/localeTextConstants.ts) in the GitHub repository.
|
|
478
471
|
*/
|
|
479
|
-
localeText:
|
|
472
|
+
localeText: PropTypes.object,
|
|
480
473
|
/**
|
|
481
474
|
* Pass a custom logger in the components that implements the [[Logger]] interface.
|
|
482
475
|
* @default console
|
|
483
476
|
*/
|
|
484
|
-
logger:
|
|
485
|
-
debug:
|
|
486
|
-
error:
|
|
487
|
-
info:
|
|
488
|
-
warn:
|
|
477
|
+
logger: PropTypes.shape({
|
|
478
|
+
debug: PropTypes.func.isRequired,
|
|
479
|
+
error: PropTypes.func.isRequired,
|
|
480
|
+
info: PropTypes.func.isRequired,
|
|
481
|
+
warn: PropTypes.func.isRequired
|
|
489
482
|
}),
|
|
490
483
|
/**
|
|
491
484
|
* Allows to pass the logging level or false to turn off logging.
|
|
492
485
|
* @default "error" ("warn" in dev mode)
|
|
493
486
|
*/
|
|
494
|
-
logLevel:
|
|
487
|
+
logLevel: PropTypes.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
495
488
|
/**
|
|
496
489
|
* Nonce of the inline styles for [Content Security Policy](https://www.w3.org/TR/2016/REC-CSP2-20161215/#script-src-the-nonce-attribute).
|
|
497
490
|
*/
|
|
498
|
-
nonce:
|
|
491
|
+
nonce: PropTypes.string,
|
|
499
492
|
/**
|
|
500
493
|
* Callback fired when any cell is clicked.
|
|
501
494
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
502
495
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
503
496
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
504
497
|
*/
|
|
505
|
-
onCellClick:
|
|
498
|
+
onCellClick: PropTypes.func,
|
|
506
499
|
/**
|
|
507
500
|
* Callback fired when a double click event comes from a cell element.
|
|
508
501
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
509
502
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
510
503
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
511
504
|
*/
|
|
512
|
-
onCellDoubleClick:
|
|
505
|
+
onCellDoubleClick: PropTypes.func,
|
|
513
506
|
/**
|
|
514
507
|
* Callback fired when the cell turns to edit mode.
|
|
515
508
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
516
509
|
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
517
510
|
*/
|
|
518
|
-
onCellEditStart:
|
|
511
|
+
onCellEditStart: PropTypes.func,
|
|
519
512
|
/**
|
|
520
513
|
* Callback fired when the cell turns to view mode.
|
|
521
514
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
522
515
|
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
523
516
|
*/
|
|
524
|
-
onCellEditStop:
|
|
517
|
+
onCellEditStop: PropTypes.func,
|
|
525
518
|
/**
|
|
526
519
|
* Callback fired when a keydown event comes from a cell element.
|
|
527
520
|
* @param {GridCellParams} params With all properties from [[GridCellParams]].
|
|
528
521
|
* @param {MuiEvent<React.KeyboardEvent>} event The event object.
|
|
529
522
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
530
523
|
*/
|
|
531
|
-
onCellKeyDown:
|
|
524
|
+
onCellKeyDown: PropTypes.func,
|
|
532
525
|
/**
|
|
533
526
|
* Callback fired when the `cellModesModel` prop changes.
|
|
534
527
|
* @param {GridCellModesModel} cellModesModel Object containing which cells are in "edit" mode.
|
|
535
528
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
536
529
|
*/
|
|
537
|
-
onCellModesModelChange:
|
|
530
|
+
onCellModesModelChange: PropTypes.func,
|
|
538
531
|
/**
|
|
539
532
|
* Callback called when the data is copied to the clipboard.
|
|
540
533
|
* @param {string} data The data copied to the clipboard.
|
|
541
534
|
*/
|
|
542
|
-
onClipboardCopy:
|
|
535
|
+
onClipboardCopy: PropTypes.func,
|
|
543
536
|
/**
|
|
544
537
|
* Callback fired when a click event comes from a column header element.
|
|
545
538
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
546
539
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
547
540
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
548
541
|
*/
|
|
549
|
-
onColumnHeaderClick:
|
|
542
|
+
onColumnHeaderClick: PropTypes.func,
|
|
550
543
|
/**
|
|
551
544
|
* Callback fired when a contextmenu event comes from a column header element.
|
|
552
545
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
553
546
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
554
547
|
*/
|
|
555
|
-
onColumnHeaderContextMenu:
|
|
548
|
+
onColumnHeaderContextMenu: PropTypes.func,
|
|
556
549
|
/**
|
|
557
550
|
* Callback fired when a double click event comes from a column header element.
|
|
558
551
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
559
552
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
560
553
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
561
554
|
*/
|
|
562
|
-
onColumnHeaderDoubleClick:
|
|
555
|
+
onColumnHeaderDoubleClick: PropTypes.func,
|
|
563
556
|
/**
|
|
564
557
|
* Callback fired when a mouse enter event comes from a column header element.
|
|
565
558
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
566
559
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
567
560
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
568
561
|
*/
|
|
569
|
-
onColumnHeaderEnter:
|
|
562
|
+
onColumnHeaderEnter: PropTypes.func,
|
|
570
563
|
/**
|
|
571
564
|
* Callback fired when a mouse leave event comes from a column header element.
|
|
572
565
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
573
566
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
574
567
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
575
568
|
*/
|
|
576
|
-
onColumnHeaderLeave:
|
|
569
|
+
onColumnHeaderLeave: PropTypes.func,
|
|
577
570
|
/**
|
|
578
571
|
* Callback fired when a mouseout event comes from a column header element.
|
|
579
572
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
580
573
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
581
574
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
582
575
|
*/
|
|
583
|
-
onColumnHeaderOut:
|
|
576
|
+
onColumnHeaderOut: PropTypes.func,
|
|
584
577
|
/**
|
|
585
578
|
* Callback fired when a mouseover event comes from a column header element.
|
|
586
579
|
* @param {GridColumnHeaderParams} params With all properties from [[GridColumnHeaderParams]].
|
|
587
580
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
588
581
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
589
582
|
*/
|
|
590
|
-
onColumnHeaderOver:
|
|
583
|
+
onColumnHeaderOver: PropTypes.func,
|
|
591
584
|
/**
|
|
592
585
|
* Callback fired when a column is reordered.
|
|
593
586
|
* @param {GridColumnOrderChangeParams} params With all properties from [[GridColumnOrderChangeParams]].
|
|
594
587
|
* @param {MuiEvent<{}>} event The event object.
|
|
595
588
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
596
589
|
*/
|
|
597
|
-
onColumnOrderChange:
|
|
590
|
+
onColumnOrderChange: PropTypes.func,
|
|
598
591
|
/**
|
|
599
592
|
* Callback fired while a column is being resized.
|
|
600
593
|
* @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
|
|
601
594
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
602
595
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
603
596
|
*/
|
|
604
|
-
onColumnResize:
|
|
597
|
+
onColumnResize: PropTypes.func,
|
|
605
598
|
/**
|
|
606
599
|
* Callback fired when the column visibility model changes.
|
|
607
600
|
* @param {GridColumnVisibilityModel} model The new model.
|
|
608
601
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
609
602
|
*/
|
|
610
|
-
onColumnVisibilityModelChange:
|
|
603
|
+
onColumnVisibilityModelChange: PropTypes.func,
|
|
611
604
|
/**
|
|
612
605
|
* Callback fired when the width of a column is changed.
|
|
613
606
|
* @param {GridColumnResizeParams} params With all properties from [[GridColumnResizeParams]].
|
|
614
607
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
615
608
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
616
609
|
*/
|
|
617
|
-
onColumnWidthChange:
|
|
610
|
+
onColumnWidthChange: PropTypes.func,
|
|
618
611
|
/**
|
|
619
612
|
* Callback fired when the density changes.
|
|
620
613
|
* @param {GridDensity} density New density value.
|
|
621
614
|
*/
|
|
622
|
-
onDensityChange:
|
|
615
|
+
onDensityChange: PropTypes.func,
|
|
623
616
|
/**
|
|
624
617
|
* Callback fired when the detail panel of a row is opened or closed.
|
|
625
618
|
* @param {GridRowId[]} ids The ids of the rows which have the detail panel open.
|
|
626
619
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
627
620
|
*/
|
|
628
|
-
onDetailPanelExpandedRowIdsChange:
|
|
621
|
+
onDetailPanelExpandedRowIdsChange: PropTypes.func,
|
|
629
622
|
/**
|
|
630
623
|
* Callback fired when rowCount is set and the next batch of virtualized rows is rendered.
|
|
631
624
|
* @param {GridFetchRowsParams} params With all properties from [[GridFetchRowsParams]].
|
|
632
625
|
* @param {MuiEvent<{}>} event The event object.
|
|
633
626
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
634
627
|
*/
|
|
635
|
-
onFetchRows:
|
|
628
|
+
onFetchRows: PropTypes.func,
|
|
636
629
|
/**
|
|
637
630
|
* Callback fired when the Filter model changes before the filters are applied.
|
|
638
631
|
* @param {GridFilterModel} model With all properties from [[GridFilterModel]].
|
|
639
632
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
640
633
|
*/
|
|
641
|
-
onFilterModelChange:
|
|
634
|
+
onFilterModelChange: PropTypes.func,
|
|
642
635
|
/**
|
|
643
636
|
* Callback fired when the menu is closed.
|
|
644
637
|
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
645
638
|
* @param {MuiEvent<{}>} event The event object.
|
|
646
639
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
647
640
|
*/
|
|
648
|
-
onMenuClose:
|
|
641
|
+
onMenuClose: PropTypes.func,
|
|
649
642
|
/**
|
|
650
643
|
* Callback fired when the menu is opened.
|
|
651
644
|
* @param {GridMenuParams} params With all properties from [[GridMenuParams]].
|
|
652
645
|
* @param {MuiEvent<{}>} event The event object.
|
|
653
646
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
654
647
|
*/
|
|
655
|
-
onMenuOpen:
|
|
648
|
+
onMenuOpen: PropTypes.func,
|
|
656
649
|
/**
|
|
657
650
|
* Callback fired when the pagination meta has changed.
|
|
658
651
|
* @param {GridPaginationMeta} paginationMeta Updated pagination meta.
|
|
659
652
|
*/
|
|
660
|
-
onPaginationMetaChange:
|
|
653
|
+
onPaginationMetaChange: PropTypes.func,
|
|
661
654
|
/**
|
|
662
655
|
* Callback fired when the pagination model has changed.
|
|
663
656
|
* @param {GridPaginationModel} model Updated pagination model.
|
|
664
657
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
665
658
|
*/
|
|
666
|
-
onPaginationModelChange:
|
|
659
|
+
onPaginationModelChange: PropTypes.func,
|
|
667
660
|
/**
|
|
668
661
|
* Callback fired when the pinned columns have changed.
|
|
669
662
|
* @param {GridPinnedColumnFields} pinnedColumns The changed pinned columns.
|
|
670
663
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
671
664
|
*/
|
|
672
|
-
onPinnedColumnsChange:
|
|
665
|
+
onPinnedColumnsChange: PropTypes.func,
|
|
673
666
|
/**
|
|
674
667
|
* Callback fired when the preferences panel is closed.
|
|
675
668
|
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
676
669
|
* @param {MuiEvent<{}>} event The event object.
|
|
677
670
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
678
671
|
*/
|
|
679
|
-
onPreferencePanelClose:
|
|
672
|
+
onPreferencePanelClose: PropTypes.func,
|
|
680
673
|
/**
|
|
681
674
|
* Callback fired when the preferences panel is opened.
|
|
682
675
|
* @param {GridPreferencePanelParams} params With all properties from [[GridPreferencePanelParams]].
|
|
683
676
|
* @param {MuiEvent<{}>} event The event object.
|
|
684
677
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
685
678
|
*/
|
|
686
|
-
onPreferencePanelOpen:
|
|
679
|
+
onPreferencePanelOpen: PropTypes.func,
|
|
687
680
|
/**
|
|
688
681
|
* Callback called when `processRowUpdate` throws an error or rejects.
|
|
689
682
|
* @param {any} error The error thrown.
|
|
690
683
|
*/
|
|
691
|
-
onProcessRowUpdateError:
|
|
684
|
+
onProcessRowUpdateError: PropTypes.func,
|
|
692
685
|
/**
|
|
693
686
|
* Callback fired when the Data Grid is resized.
|
|
694
687
|
* @param {ElementSize} containerSize With all properties from [[ElementSize]].
|
|
695
688
|
* @param {MuiEvent<{}>} event The event object.
|
|
696
689
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
697
690
|
*/
|
|
698
|
-
onResize:
|
|
691
|
+
onResize: PropTypes.func,
|
|
699
692
|
/**
|
|
700
693
|
* Callback fired when a row is clicked.
|
|
701
694
|
* Not called if the target clicked is an interactive element added by the built-in columns.
|
|
@@ -703,63 +696,63 @@ DataGridProRaw.propTypes = {
|
|
|
703
696
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
704
697
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
705
698
|
*/
|
|
706
|
-
onRowClick:
|
|
699
|
+
onRowClick: PropTypes.func,
|
|
707
700
|
/**
|
|
708
701
|
* Callback fired when the row count has changed.
|
|
709
702
|
* @param {number} count Updated row count.
|
|
710
703
|
*/
|
|
711
|
-
onRowCountChange:
|
|
704
|
+
onRowCountChange: PropTypes.func,
|
|
712
705
|
/**
|
|
713
706
|
* Callback fired when a double click event comes from a row container element.
|
|
714
707
|
* @param {GridRowParams} params With all properties from [[RowParams]].
|
|
715
708
|
* @param {MuiEvent<React.MouseEvent>} event The event object.
|
|
716
709
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
717
710
|
*/
|
|
718
|
-
onRowDoubleClick:
|
|
711
|
+
onRowDoubleClick: PropTypes.func,
|
|
719
712
|
/**
|
|
720
713
|
* Callback fired when the row turns to edit mode.
|
|
721
714
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
722
715
|
* @param {MuiEvent<React.KeyboardEvent | React.MouseEvent>} event The event that caused this prop to be called.
|
|
723
716
|
*/
|
|
724
|
-
onRowEditStart:
|
|
717
|
+
onRowEditStart: PropTypes.func,
|
|
725
718
|
/**
|
|
726
719
|
* Callback fired when the row turns to view mode.
|
|
727
720
|
* @param {GridRowParams} params With all properties from [[GridRowParams]].
|
|
728
721
|
* @param {MuiEvent<MuiBaseEvent>} event The event that caused this prop to be called.
|
|
729
722
|
*/
|
|
730
|
-
onRowEditStop:
|
|
723
|
+
onRowEditStop: PropTypes.func,
|
|
731
724
|
/**
|
|
732
725
|
* Callback fired when the `rowModesModel` prop changes.
|
|
733
726
|
* @param {GridRowModesModel} rowModesModel Object containing which rows are in "edit" mode.
|
|
734
727
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
735
728
|
*/
|
|
736
|
-
onRowModesModelChange:
|
|
729
|
+
onRowModesModelChange: PropTypes.func,
|
|
737
730
|
/**
|
|
738
731
|
* Callback fired when a row is being reordered.
|
|
739
732
|
* @param {GridRowOrderChangeParams} params With all properties from [[GridRowOrderChangeParams]].
|
|
740
733
|
* @param {MuiEvent<{}>} event The event object.
|
|
741
734
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
742
735
|
*/
|
|
743
|
-
onRowOrderChange:
|
|
736
|
+
onRowOrderChange: PropTypes.func,
|
|
744
737
|
/**
|
|
745
738
|
* Callback fired when the selection state of one or multiple rows changes.
|
|
746
739
|
* @param {GridRowSelectionModel} rowSelectionModel With all the row ids [[GridSelectionModel]].
|
|
747
740
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
748
741
|
*/
|
|
749
|
-
onRowSelectionModelChange:
|
|
742
|
+
onRowSelectionModelChange: PropTypes.func,
|
|
750
743
|
/**
|
|
751
744
|
* Callback fired when scrolling to the bottom of the grid viewport.
|
|
752
745
|
* @param {GridRowScrollEndParams} params With all properties from [[GridRowScrollEndParams]].
|
|
753
746
|
* @param {MuiEvent<{}>} event The event object.
|
|
754
747
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
755
748
|
*/
|
|
756
|
-
onRowsScrollEnd:
|
|
749
|
+
onRowsScrollEnd: PropTypes.func,
|
|
757
750
|
/**
|
|
758
751
|
* Callback fired when the sort model changes before a column is sorted.
|
|
759
752
|
* @param {GridSortModel} model With all properties from [[GridSortModel]].
|
|
760
753
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
761
754
|
*/
|
|
762
|
-
onSortModelChange:
|
|
755
|
+
onSortModelChange: PropTypes.func,
|
|
763
756
|
/**
|
|
764
757
|
* Callback fired when the state of the Data Grid is updated.
|
|
765
758
|
* @param {GridState} state The new state.
|
|
@@ -767,26 +760,26 @@ DataGridProRaw.propTypes = {
|
|
|
767
760
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
768
761
|
* @ignore - do not document.
|
|
769
762
|
*/
|
|
770
|
-
onStateChange:
|
|
763
|
+
onStateChange: PropTypes.func,
|
|
771
764
|
/**
|
|
772
765
|
* Select the pageSize dynamically using the component UI.
|
|
773
766
|
* @default [25, 50, 100]
|
|
774
767
|
*/
|
|
775
|
-
pageSizeOptions:
|
|
776
|
-
label:
|
|
777
|
-
value:
|
|
768
|
+
pageSizeOptions: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
769
|
+
label: PropTypes.string.isRequired,
|
|
770
|
+
value: PropTypes.number.isRequired
|
|
778
771
|
})]).isRequired),
|
|
779
772
|
/**
|
|
780
773
|
* If `true`, pagination is enabled.
|
|
781
774
|
* @default false
|
|
782
775
|
*/
|
|
783
|
-
pagination:
|
|
776
|
+
pagination: PropTypes.bool,
|
|
784
777
|
/**
|
|
785
778
|
* The extra information about the pagination state of the Data Grid.
|
|
786
779
|
* Only applicable with `paginationMode="server"`.
|
|
787
780
|
*/
|
|
788
|
-
paginationMeta:
|
|
789
|
-
hasNextPage:
|
|
781
|
+
paginationMeta: PropTypes.shape({
|
|
782
|
+
hasNextPage: PropTypes.bool
|
|
790
783
|
}),
|
|
791
784
|
/**
|
|
792
785
|
* Pagination can be processed on the server or client-side.
|
|
@@ -794,24 +787,24 @@ DataGridProRaw.propTypes = {
|
|
|
794
787
|
* Set it to 'server' if you would like to handle the pagination on the server-side.
|
|
795
788
|
* @default "client"
|
|
796
789
|
*/
|
|
797
|
-
paginationMode:
|
|
790
|
+
paginationMode: PropTypes.oneOf(['client', 'server']),
|
|
798
791
|
/**
|
|
799
792
|
* The pagination model of type [[GridPaginationModel]] which refers to current `page` and `pageSize`.
|
|
800
793
|
*/
|
|
801
|
-
paginationModel:
|
|
802
|
-
page:
|
|
803
|
-
pageSize:
|
|
794
|
+
paginationModel: PropTypes.shape({
|
|
795
|
+
page: PropTypes.number.isRequired,
|
|
796
|
+
pageSize: PropTypes.number.isRequired
|
|
804
797
|
}),
|
|
805
798
|
/**
|
|
806
799
|
* The column fields to display pinned to left or right.
|
|
807
800
|
*/
|
|
808
|
-
pinnedColumns:
|
|
801
|
+
pinnedColumns: PropTypes.object,
|
|
809
802
|
/**
|
|
810
803
|
* Rows data to pin on top or bottom.
|
|
811
804
|
*/
|
|
812
|
-
pinnedRows:
|
|
813
|
-
bottom:
|
|
814
|
-
top:
|
|
805
|
+
pinnedRows: PropTypes.shape({
|
|
806
|
+
bottom: PropTypes.arrayOf(PropTypes.object),
|
|
807
|
+
top: PropTypes.arrayOf(PropTypes.object)
|
|
815
808
|
}),
|
|
816
809
|
/**
|
|
817
810
|
* Callback called before updating a row with new values in the row and cell editing.
|
|
@@ -821,38 +814,38 @@ DataGridProRaw.propTypes = {
|
|
|
821
814
|
* @param {{ rowId: GridRowId }} params Additional parameters.
|
|
822
815
|
* @returns {Promise<R> | R} The final values to update the row.
|
|
823
816
|
*/
|
|
824
|
-
processRowUpdate:
|
|
817
|
+
processRowUpdate: PropTypes.func,
|
|
825
818
|
/**
|
|
826
819
|
* If `true`, the page is set to 0 after each sorting or filtering.
|
|
827
820
|
* This prop will be removed in the next major version and resetting the page will become the default behavior.
|
|
828
821
|
* @default false
|
|
829
822
|
*/
|
|
830
|
-
resetPageOnSortFilter:
|
|
823
|
+
resetPageOnSortFilter: PropTypes.bool,
|
|
831
824
|
/**
|
|
832
825
|
* The milliseconds throttle delay for resizing the grid.
|
|
833
826
|
* @default 60
|
|
834
827
|
*/
|
|
835
|
-
resizeThrottleMs:
|
|
828
|
+
resizeThrottleMs: PropTypes.number,
|
|
836
829
|
/**
|
|
837
830
|
* Row region in pixels to render before/after the viewport
|
|
838
831
|
* @default 150
|
|
839
832
|
*/
|
|
840
|
-
rowBufferPx:
|
|
833
|
+
rowBufferPx: PropTypes.number,
|
|
841
834
|
/**
|
|
842
835
|
* Set the total number of rows, if it is different from the length of the value `rows` prop.
|
|
843
836
|
* If some rows have children (for instance in the tree data), this number represents the amount of top level rows.
|
|
844
837
|
* Only works with `paginationMode="server"`, ignored when `paginationMode="client"`.
|
|
845
838
|
*/
|
|
846
|
-
rowCount:
|
|
839
|
+
rowCount: PropTypes.number,
|
|
847
840
|
/**
|
|
848
841
|
* Sets the height in pixel of a row in the Data Grid.
|
|
849
842
|
* @default 52
|
|
850
843
|
*/
|
|
851
|
-
rowHeight:
|
|
844
|
+
rowHeight: PropTypes.number,
|
|
852
845
|
/**
|
|
853
846
|
* Controls the modes of the rows.
|
|
854
847
|
*/
|
|
855
|
-
rowModesModel:
|
|
848
|
+
rowModesModel: PropTypes.object,
|
|
856
849
|
/**
|
|
857
850
|
* The milliseconds delay to wait after measuring the row height before recalculating row positions.
|
|
858
851
|
* Setting it to a lower value could be useful when using dynamic row height,
|
|
@@ -860,26 +853,26 @@ DataGridProRaw.propTypes = {
|
|
|
860
853
|
* @default 166
|
|
861
854
|
* @deprecated
|
|
862
855
|
*/
|
|
863
|
-
rowPositionsDebounceMs:
|
|
856
|
+
rowPositionsDebounceMs: PropTypes.number,
|
|
864
857
|
/**
|
|
865
858
|
* If `true`, the reordering of rows is enabled.
|
|
866
859
|
* @default false
|
|
867
860
|
*/
|
|
868
|
-
rowReordering:
|
|
861
|
+
rowReordering: PropTypes.bool,
|
|
869
862
|
/**
|
|
870
863
|
* Set of rows of type [[GridRowsProp]].
|
|
871
864
|
* @default []
|
|
872
865
|
*/
|
|
873
|
-
rows:
|
|
866
|
+
rows: PropTypes.arrayOf(PropTypes.object),
|
|
874
867
|
/**
|
|
875
868
|
* If `false`, the row selection mode is disabled.
|
|
876
869
|
* @default true
|
|
877
870
|
*/
|
|
878
|
-
rowSelection:
|
|
871
|
+
rowSelection: PropTypes.bool,
|
|
879
872
|
/**
|
|
880
873
|
* Sets the row selection model of the Data Grid.
|
|
881
874
|
*/
|
|
882
|
-
rowSelectionModel:
|
|
875
|
+
rowSelectionModel: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired), PropTypes.number, PropTypes.string]),
|
|
883
876
|
/**
|
|
884
877
|
* When `rowSelectionPropagation.descendants` is set to `true`.
|
|
885
878
|
* - Selecting a parent selects all its filtered descendants automatically.
|
|
@@ -892,9 +885,9 @@ DataGridProRaw.propTypes = {
|
|
|
892
885
|
* Works with tree data and row grouping on the client-side only.
|
|
893
886
|
* @default { parents: false, descendants: false }
|
|
894
887
|
*/
|
|
895
|
-
rowSelectionPropagation:
|
|
896
|
-
descendants:
|
|
897
|
-
parents:
|
|
888
|
+
rowSelectionPropagation: PropTypes.shape({
|
|
889
|
+
descendants: PropTypes.bool,
|
|
890
|
+
parents: PropTypes.bool
|
|
898
891
|
}),
|
|
899
892
|
/**
|
|
900
893
|
* Loading rows can be processed on the server or client-side.
|
|
@@ -902,105 +895,105 @@ DataGridProRaw.propTypes = {
|
|
|
902
895
|
* Set it to 'server' if you would like to enable lazy loading.
|
|
903
896
|
* * @default "client"
|
|
904
897
|
*/
|
|
905
|
-
rowsLoadingMode:
|
|
898
|
+
rowsLoadingMode: PropTypes.oneOf(['client', 'server']),
|
|
906
899
|
/**
|
|
907
900
|
* Sets the type of space between rows added by `getRowSpacing`.
|
|
908
901
|
* @default "margin"
|
|
909
902
|
*/
|
|
910
|
-
rowSpacingType:
|
|
903
|
+
rowSpacingType: PropTypes.oneOf(['border', 'margin']),
|
|
911
904
|
/**
|
|
912
905
|
* Override the height/width of the Data Grid inner scrollbar.
|
|
913
906
|
*/
|
|
914
|
-
scrollbarSize:
|
|
907
|
+
scrollbarSize: PropTypes.number,
|
|
915
908
|
/**
|
|
916
909
|
* Set the area in `px` at the bottom of the grid viewport where onRowsScrollEnd is called.
|
|
917
910
|
* @default 80
|
|
918
911
|
*/
|
|
919
|
-
scrollEndThreshold:
|
|
912
|
+
scrollEndThreshold: PropTypes.number,
|
|
920
913
|
/**
|
|
921
914
|
* If `true`, vertical borders will be displayed between cells.
|
|
922
915
|
* @default false
|
|
923
916
|
*/
|
|
924
|
-
showCellVerticalBorder:
|
|
917
|
+
showCellVerticalBorder: PropTypes.bool,
|
|
925
918
|
/**
|
|
926
919
|
* If `true`, vertical borders will be displayed between column header items.
|
|
927
920
|
* @default false
|
|
928
921
|
*/
|
|
929
|
-
showColumnVerticalBorder:
|
|
922
|
+
showColumnVerticalBorder: PropTypes.bool,
|
|
930
923
|
/**
|
|
931
924
|
* Overridable components props dynamically passed to the component at rendering.
|
|
932
925
|
*/
|
|
933
|
-
slotProps:
|
|
926
|
+
slotProps: PropTypes.object,
|
|
934
927
|
/**
|
|
935
928
|
* Overridable components.
|
|
936
929
|
*/
|
|
937
|
-
slots:
|
|
930
|
+
slots: PropTypes.object,
|
|
938
931
|
/**
|
|
939
932
|
* Sorting can be processed on the server or client-side.
|
|
940
933
|
* Set it to 'client' if you would like to handle sorting on the client-side.
|
|
941
934
|
* Set it to 'server' if you would like to handle sorting on the server-side.
|
|
942
935
|
* @default "client"
|
|
943
936
|
*/
|
|
944
|
-
sortingMode:
|
|
937
|
+
sortingMode: PropTypes.oneOf(['client', 'server']),
|
|
945
938
|
/**
|
|
946
939
|
* The order of the sorting sequence.
|
|
947
940
|
* @default ['asc', 'desc', null]
|
|
948
941
|
*/
|
|
949
|
-
sortingOrder:
|
|
942
|
+
sortingOrder: PropTypes.arrayOf(PropTypes.oneOf(['asc', 'desc'])),
|
|
950
943
|
/**
|
|
951
944
|
* Set the sort model of the Data Grid.
|
|
952
945
|
*/
|
|
953
|
-
sortModel:
|
|
954
|
-
field:
|
|
955
|
-
sort:
|
|
946
|
+
sortModel: PropTypes.arrayOf(PropTypes.shape({
|
|
947
|
+
field: PropTypes.string.isRequired,
|
|
948
|
+
sort: PropTypes.oneOf(['asc', 'desc'])
|
|
956
949
|
})),
|
|
957
950
|
/**
|
|
958
951
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
959
952
|
*/
|
|
960
|
-
sx:
|
|
953
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
961
954
|
/**
|
|
962
955
|
* If positive, the Data Grid will throttle updates coming from `apiRef.current.updateRows` and `apiRef.current.setRows`.
|
|
963
956
|
* It can be useful if you have a high update rate but do not want to do heavy work like filtering / sorting or rendering on each individual update.
|
|
964
957
|
* @default 0
|
|
965
958
|
*/
|
|
966
|
-
throttleRowsMs:
|
|
959
|
+
throttleRowsMs: PropTypes.number,
|
|
967
960
|
/**
|
|
968
961
|
* If `true`, the rows will be gathered in a tree structure according to the `getTreeDataPath` prop.
|
|
969
962
|
* @default false
|
|
970
963
|
*/
|
|
971
|
-
treeData:
|
|
972
|
-
unstable_dataSource:
|
|
973
|
-
getChildrenCount:
|
|
974
|
-
getGroupKey:
|
|
975
|
-
getRows:
|
|
976
|
-
updateRow:
|
|
964
|
+
treeData: PropTypes.bool,
|
|
965
|
+
unstable_dataSource: PropTypes.shape({
|
|
966
|
+
getChildrenCount: PropTypes.func,
|
|
967
|
+
getGroupKey: PropTypes.func,
|
|
968
|
+
getRows: PropTypes.func.isRequired,
|
|
969
|
+
updateRow: PropTypes.func
|
|
977
970
|
}),
|
|
978
|
-
unstable_dataSourceCache:
|
|
979
|
-
clear:
|
|
980
|
-
get:
|
|
981
|
-
set:
|
|
971
|
+
unstable_dataSourceCache: PropTypes.shape({
|
|
972
|
+
clear: PropTypes.func.isRequired,
|
|
973
|
+
get: PropTypes.func.isRequired,
|
|
974
|
+
set: PropTypes.func.isRequired
|
|
982
975
|
}),
|
|
983
976
|
/**
|
|
984
977
|
* Definition of the column rendered when the `unstable_listView` prop is enabled.
|
|
985
978
|
*/
|
|
986
|
-
unstable_listColumn:
|
|
987
|
-
align:
|
|
988
|
-
cellClassName:
|
|
989
|
-
display:
|
|
990
|
-
field:
|
|
991
|
-
renderCell:
|
|
979
|
+
unstable_listColumn: PropTypes.shape({
|
|
980
|
+
align: PropTypes.oneOf(['center', 'left', 'right']),
|
|
981
|
+
cellClassName: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
|
|
982
|
+
display: PropTypes.oneOf(['flex', 'text']),
|
|
983
|
+
field: PropTypes.string.isRequired,
|
|
984
|
+
renderCell: PropTypes.func
|
|
992
985
|
}),
|
|
993
986
|
/**
|
|
994
987
|
* If `true`, displays the data in a list view.
|
|
995
988
|
* Use in combination with `unstable_listColumn`.
|
|
996
989
|
*/
|
|
997
|
-
unstable_listView:
|
|
998
|
-
unstable_onDataSourceError:
|
|
990
|
+
unstable_listView: PropTypes.bool,
|
|
991
|
+
unstable_onDataSourceError: PropTypes.func,
|
|
999
992
|
/**
|
|
1000
993
|
* If `true`, the Data Grid will auto span the cells over the rows having the same value.
|
|
1001
994
|
* @default false
|
|
1002
995
|
*/
|
|
1003
|
-
unstable_rowSpanning:
|
|
996
|
+
unstable_rowSpanning: PropTypes.bool,
|
|
1004
997
|
/**
|
|
1005
998
|
* If `true`, the Data Grid enables column virtualization when `getRowHeight` is set to `() => 'auto'`.
|
|
1006
999
|
* By default, column virtualization is disabled when dynamic row height is enabled to measure the row height correctly.
|
|
@@ -1008,5 +1001,5 @@ DataGridProRaw.propTypes = {
|
|
|
1008
1001
|
* The downside of enabling this prop is that the row height will be estimated based the cells that are currently rendered, which can cause row height change when scrolling horizontally.
|
|
1009
1002
|
* @default false
|
|
1010
1003
|
*/
|
|
1011
|
-
virtualizeColumnsWithAutoRowHeight:
|
|
1004
|
+
virtualizeColumnsWithAutoRowHeight: PropTypes.bool
|
|
1012
1005
|
};
|