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