@mui/x-data-grid 7.23.3 → 7.23.4
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 +38 -0
- package/DataGrid/DataGrid.js +4 -3
- package/README.md +1 -1
- package/components/GridColumnHeaders.d.ts +1 -1
- package/components/GridColumnHeaders.js +4 -4
- package/components/GridFooter.d.ts +2 -1
- package/components/GridFooter.js +4 -4
- package/components/GridLoadingOverlay.d.ts +1 -1
- package/components/GridLoadingOverlay.js +3 -2
- package/components/GridNoResultsOverlay.d.ts +2 -1
- package/components/GridNoResultsOverlay.js +4 -4
- package/components/GridNoRowsOverlay.d.ts +2 -1
- package/components/GridNoRowsOverlay.js +4 -4
- package/components/GridPagination.d.ts +1 -1
- package/components/GridPagination.js +5 -3
- package/components/GridRow.d.ts +1 -1
- package/components/GridRow.js +3 -2
- package/components/GridRowCount.d.ts +1 -1
- package/components/GridRowCount.js +3 -2
- package/components/GridSelectedRowCount.d.ts +4 -1
- package/components/GridSelectedRowCount.js +3 -2
- package/components/GridSkeletonLoadingOverlay.d.ts +1 -1
- package/components/GridSkeletonLoadingOverlay.js +4 -3
- package/components/cell/GridActionsCellItem.d.ts +1 -1
- package/components/cell/GridActionsCellItem.js +3 -2
- package/components/cell/GridCell.d.ts +1 -1
- package/components/cell/GridCell.js +3 -2
- package/components/cell/GridEditInputCell.d.ts +1 -1
- package/components/cell/GridEditInputCell.js +72 -3
- package/components/columnHeaders/GridBaseColumnHeaders.d.ts +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/components/columnHeaders/GridIconButtonContainer.d.ts +1 -1
- package/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
- package/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/components/columnSelection/GridHeaderCheckbox.d.ts +1 -1
- package/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/components/containers/GridFooterContainer.d.ts +1 -1
- package/components/containers/GridFooterContainer.js +5 -3
- package/components/containers/GridOverlay.d.ts +1 -1
- package/components/containers/GridOverlay.js +5 -3
- package/components/containers/GridRoot.d.ts +1 -1
- package/components/containers/GridRoot.js +5 -3
- package/components/containers/GridToolbarContainer.d.ts +1 -1
- package/components/containers/GridToolbarContainer.js +3 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +2 -2
- package/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/components/menu/columnMenu/GridColumnMenuContainer.d.ts +1 -1
- package/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +3 -2
- package/components/panel/GridPanelWrapper.d.ts +1 -1
- package/components/panel/GridPanelWrapper.js +5 -3
- package/components/panel/filterPanel/GridFilterForm.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/components/panel/filterPanel/GridFilterPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/components/toolbar/GridToolbar.d.ts +1 -1
- package/components/toolbar/GridToolbar.js +4 -4
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/components/toolbar/GridToolbarExport.d.ts +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -1
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/components/virtualization/GridMainContainer.d.ts +3 -1
- package/components/virtualization/GridMainContainer.js +3 -2
- package/components/virtualization/GridVirtualScrollbar.d.ts +1 -1
- package/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/components/virtualization/GridVirtualScrollerContent.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/components/virtualization/GridVirtualScrollerRenderZone.d.ts +2 -0
- package/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/index.js +1 -1
- package/locales/nlNL.js +5 -6
- package/modern/DataGrid/DataGrid.js +4 -3
- package/modern/components/GridColumnHeaders.js +4 -4
- package/modern/components/GridFooter.js +4 -4
- package/modern/components/GridLoadingOverlay.js +3 -2
- package/modern/components/GridNoResultsOverlay.js +4 -4
- package/modern/components/GridNoRowsOverlay.js +4 -4
- package/modern/components/GridPagination.js +5 -3
- package/modern/components/GridRow.js +3 -2
- package/modern/components/GridRowCount.js +3 -2
- package/modern/components/GridSelectedRowCount.js +3 -2
- package/modern/components/GridSkeletonLoadingOverlay.js +4 -3
- package/modern/components/cell/GridActionsCellItem.js +3 -2
- package/modern/components/cell/GridCell.js +3 -2
- package/modern/components/cell/GridEditInputCell.js +72 -3
- package/modern/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/modern/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/modern/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/modern/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/modern/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/modern/components/containers/GridFooterContainer.js +5 -3
- package/modern/components/containers/GridOverlay.js +5 -3
- package/modern/components/containers/GridRoot.js +5 -3
- package/modern/components/containers/GridToolbarContainer.js +3 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/modern/components/panel/GridPanel.js +3 -2
- package/modern/components/panel/GridPanelWrapper.js +5 -3
- package/modern/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/modern/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/modern/components/toolbar/GridToolbar.js +4 -4
- package/modern/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/modern/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/modern/components/toolbar/GridToolbarExport.js +2 -1
- package/modern/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/modern/components/virtualization/GridMainContainer.js +3 -2
- package/modern/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/modern/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/modern/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/modern/index.js +1 -1
- package/modern/locales/nlNL.js +5 -6
- package/node/DataGrid/DataGrid.js +4 -3
- package/node/components/GridColumnHeaders.js +4 -4
- package/node/components/GridFooter.js +4 -4
- package/node/components/GridLoadingOverlay.js +3 -2
- package/node/components/GridNoResultsOverlay.js +4 -4
- package/node/components/GridNoRowsOverlay.js +4 -4
- package/node/components/GridPagination.js +5 -3
- package/node/components/GridRow.js +3 -2
- package/node/components/GridRowCount.js +3 -2
- package/node/components/GridSelectedRowCount.js +3 -2
- package/node/components/GridSkeletonLoadingOverlay.js +4 -3
- package/node/components/cell/GridActionsCellItem.js +3 -2
- package/node/components/cell/GridCell.js +3 -2
- package/node/components/cell/GridEditInputCell.js +72 -3
- package/node/components/columnHeaders/GridBaseColumnHeaders.js +4 -3
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -3
- package/node/components/columnHeaders/GridGenericColumnHeaderItem.js +3 -2
- package/node/components/columnHeaders/GridIconButtonContainer.js +5 -3
- package/node/components/columnSelection/GridCellCheckboxRenderer.js +5 -3
- package/node/components/columnSelection/GridHeaderCheckbox.js +5 -3
- package/node/components/containers/GridFooterContainer.js +5 -3
- package/node/components/containers/GridOverlay.js +5 -3
- package/node/components/containers/GridRoot.js +5 -3
- package/node/components/containers/GridToolbarContainer.js +3 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +5 -5
- package/node/components/menu/columnMenu/GridColumnMenuContainer.js +3 -2
- package/node/components/panel/GridPanel.js +3 -2
- package/node/components/panel/GridPanelWrapper.js +5 -3
- package/node/components/panel/filterPanel/GridFilterForm.js +3 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +17 -10
- package/node/components/panel/filterPanel/GridFilterPanel.js +4 -4
- package/node/components/toolbar/GridToolbar.js +4 -4
- package/node/components/toolbar/GridToolbarColumnsButton.js +3 -2
- package/node/components/toolbar/GridToolbarDensitySelector.js +3 -2
- package/node/components/toolbar/GridToolbarExport.js +2 -1
- package/node/components/toolbar/GridToolbarExportContainer.js +3 -2
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -2
- package/node/components/virtualization/GridMainContainer.js +3 -2
- package/node/components/virtualization/GridVirtualScrollbar.js +2 -1
- package/node/components/virtualization/GridVirtualScrollerContent.js +5 -5
- package/node/components/virtualization/GridVirtualScrollerRenderZone.js +5 -3
- package/node/index.js +1 -1
- package/node/locales/nlNL.js +5 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## v7.23.4
|
|
7
|
+
|
|
8
|
+
_Dec 27, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Data Grid
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
|
|
15
|
+
Special thanks go out to the community contributor who has helped make this release possible:
|
|
16
|
+
@JoepVerkoelen.
|
|
17
|
+
Following are all team members who have contributed to this release:
|
|
18
|
+
@arminmeh, @oliviertassinari.
|
|
19
|
+
|
|
20
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
21
|
+
|
|
22
|
+
### Data Grid
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@7.23.4`
|
|
25
|
+
|
|
26
|
+
- [DataGrid] Fix header filters showing clear button while empty (#15990) @k-rajat19
|
|
27
|
+
- [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15984) @lauri865
|
|
28
|
+
- [l10n] Improve Dutch (nl-NL) locale (#15920) @JoepVerkoelen
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-pro@7.23.4` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid@7.23.4`.
|
|
33
|
+
|
|
34
|
+
#### `@mui/x-data-grid-premium@7.23.4` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
35
|
+
|
|
36
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.4`, plus:
|
|
37
|
+
|
|
38
|
+
- [DataGridPremium] Fix column pinning with checkbox selection and row grouping (#15949) @k-rajat19
|
|
39
|
+
|
|
40
|
+
### Docs
|
|
41
|
+
|
|
42
|
+
- [docs] Fix outdated link to handbook (#15855) @oliviertassinari
|
|
43
|
+
|
|
6
44
|
## 7.23.3
|
|
7
45
|
|
|
8
46
|
_Dec 19, 2024_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
7
|
import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from "../components/index.js";
|
|
7
8
|
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
8
9
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
@@ -23,7 +24,7 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
23
24
|
// Only validate in MIT version
|
|
24
25
|
props => props.columns && props.columns.some(column => column.resizable) && [`MUI X: \`column.resizable = true\` is not a valid prop.`, 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n') || undefined];
|
|
25
26
|
}
|
|
26
|
-
const DataGridRaw =
|
|
27
|
+
const DataGridRaw = forwardRef(function DataGrid(inProps, ref) {
|
|
27
28
|
const props = useDataGridProps(inProps);
|
|
28
29
|
const privateApiRef = useDataGridComponent(props.apiRef, props);
|
|
29
30
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -36,9 +37,9 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
|
|
|
36
37
|
children: /*#__PURE__*/_jsxs(GridRoot, _extends({
|
|
37
38
|
className: props.className,
|
|
38
39
|
style: props.style,
|
|
39
|
-
sx: props.sx
|
|
40
|
-
ref: ref
|
|
40
|
+
sx: props.sx
|
|
41
41
|
}, props.forwardedProps, props.slotProps?.root, {
|
|
42
|
+
ref: ref,
|
|
42
43
|
children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
43
44
|
}))
|
|
44
45
|
});
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# MUI X Data Grid
|
|
2
2
|
|
|
3
3
|
This package is the Community plan edition of the Data Grid components.
|
|
4
|
-
It's part of [MUI X](https://mui.com/x/), an open-core extension of
|
|
4
|
+
It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -3,5 +3,5 @@ import { UseGridColumnHeadersProps } from '../hooks/features/columnHeaders/useGr
|
|
|
3
3
|
export interface GridColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement>, UseGridColumnHeadersProps {
|
|
4
4
|
ref?: React.Ref<HTMLDivElement>;
|
|
5
5
|
}
|
|
6
|
-
declare const MemoizedGridColumnHeaders: React.ForwardRefExoticComponent<Omit<GridColumnHeadersProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const MemoizedGridColumnHeaders: React.ForwardRefExoticComponent<GridColumnHeadersProps> | React.ForwardRefExoticComponent<Omit<GridColumnHeadersProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
7
|
export { MemoizedGridColumnHeaders as GridColumnHeaders };
|
|
@@ -4,10 +4,11 @@ const _excluded = ["className", "visibleColumns", "sortColumnLookup", "filterCol
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
|
|
8
9
|
import { GridBaseColumnHeaders } from "./columnHeaders/GridBaseColumnHeaders.js";
|
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
-
const GridColumnHeaders =
|
|
11
|
+
const GridColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
|
|
11
12
|
const {
|
|
12
13
|
visibleColumns,
|
|
13
14
|
sortColumnLookup,
|
|
@@ -41,9 +42,8 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
|
|
|
41
42
|
columnGroupsHeaderStructure,
|
|
42
43
|
hasOtherElementInTabSequence
|
|
43
44
|
});
|
|
44
|
-
return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({
|
|
45
|
-
ref: ref
|
|
46
|
-
}, other, getInnerProps(), {
|
|
45
|
+
return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({}, other, getInnerProps(), {
|
|
46
|
+
ref: ref,
|
|
47
47
|
children: [getColumnGroupHeadersRows(), getColumnHeadersRow()]
|
|
48
48
|
}));
|
|
49
49
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { GridFooterContainerProps } from './containers/GridFooterContainer';
|
|
3
|
+
declare const GridFooter: React.ForwardRefExoticComponent<GridFooterContainerProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
4
|
sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
|
|
4
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
export { GridFooter };
|
package/components/GridFooter.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
4
5
|
import { useGridSelector } from "../hooks/utils/useGridSelector.js";
|
|
5
6
|
import { gridTopLevelRowCountSelector } from "../hooks/features/rows/gridRowsSelector.js";
|
|
6
7
|
import { selectedGridRowsCountSelector } from "../hooks/features/rowSelection/gridRowSelectionSelector.js";
|
|
@@ -10,7 +11,7 @@ import { GridSelectedRowCount } from "./GridSelectedRowCount.js";
|
|
|
10
11
|
import { GridFooterContainer } from "./containers/GridFooterContainer.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
12
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
const GridFooter =
|
|
14
|
+
const GridFooter = forwardRef(function GridFooter(props, ref) {
|
|
14
15
|
const apiRef = useGridApiContext();
|
|
15
16
|
const rootProps = useGridRootProps();
|
|
16
17
|
const totalTopLevelRowCount = useGridSelector(apiRef, gridTopLevelRowCountSelector);
|
|
@@ -24,9 +25,8 @@ const GridFooter = /*#__PURE__*/React.forwardRef(function GridFooter(props, ref)
|
|
|
24
25
|
visibleRowCount: visibleTopLevelRowCount
|
|
25
26
|
})) : null;
|
|
26
27
|
const paginationElement = rootProps.pagination && !rootProps.hideFooterPagination && rootProps.slots.pagination && /*#__PURE__*/_jsx(rootProps.slots.pagination, _extends({}, rootProps.slotProps?.pagination));
|
|
27
|
-
return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({
|
|
28
|
-
ref: ref
|
|
29
|
-
}, props, {
|
|
28
|
+
return /*#__PURE__*/_jsxs(GridFooterContainer, _extends({}, props, {
|
|
29
|
+
ref: ref,
|
|
30
30
|
children: [selectedRowCountElement, rowCountElement, paginationElement]
|
|
31
31
|
}));
|
|
32
32
|
});
|
|
@@ -13,5 +13,5 @@ export interface GridLoadingOverlayProps extends GridOverlayProps {
|
|
|
13
13
|
*/
|
|
14
14
|
noRowsVariant?: GridLoadingOverlayVariant;
|
|
15
15
|
}
|
|
16
|
-
declare const GridLoadingOverlay: React.ForwardRefExoticComponent<GridLoadingOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const GridLoadingOverlay: React.ForwardRefExoticComponent<GridLoadingOverlayProps> | React.ForwardRefExoticComponent<GridLoadingOverlayProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export { GridLoadingOverlay };
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import LinearProgress from '@mui/material/LinearProgress';
|
|
7
7
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
8
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
8
9
|
import { GridOverlay } from "./containers/GridOverlay.js";
|
|
9
10
|
import { GridSkeletonLoadingOverlay } from "./GridSkeletonLoadingOverlay.js";
|
|
10
11
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
@@ -28,7 +29,7 @@ const LOADING_VARIANTS = {
|
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
};
|
|
31
|
-
const GridLoadingOverlay =
|
|
32
|
+
const GridLoadingOverlay = forwardRef(function GridLoadingOverlay(props, ref) {
|
|
32
33
|
const {
|
|
33
34
|
variant = 'circular-progress',
|
|
34
35
|
noRowsVariant = 'circular-progress',
|
|
@@ -39,9 +40,9 @@ const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOve
|
|
|
39
40
|
const rowsCount = useGridSelector(apiRef, gridRowCountSelector);
|
|
40
41
|
const activeVariant = LOADING_VARIANTS[rowsCount === 0 ? noRowsVariant : variant];
|
|
41
42
|
return /*#__PURE__*/_jsx(GridOverlay, _extends({
|
|
42
|
-
ref: ref,
|
|
43
43
|
style: _extends({}, activeVariant.style, style)
|
|
44
44
|
}, other, {
|
|
45
|
+
ref: ref,
|
|
45
46
|
children: /*#__PURE__*/_jsx(activeVariant.component, {})
|
|
46
47
|
}));
|
|
47
48
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { GridOverlayProps } from './containers/GridOverlay';
|
|
3
|
+
export declare const GridNoResultsOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
4
|
sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
|
|
4
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
3
4
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
4
5
|
import { GridOverlay } from "./containers/GridOverlay.js";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
-
export const GridNoResultsOverlay =
|
|
7
|
+
export const GridNoResultsOverlay = forwardRef(function GridNoResultsOverlay(props, ref) {
|
|
7
8
|
const apiRef = useGridApiContext();
|
|
8
9
|
const noResultsOverlayLabel = apiRef.current.getLocaleText('noResultsOverlayLabel');
|
|
9
|
-
return /*#__PURE__*/_jsx(GridOverlay, _extends({
|
|
10
|
-
ref: ref
|
|
11
|
-
}, props, {
|
|
10
|
+
return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
|
|
11
|
+
ref: ref,
|
|
12
12
|
children: noResultsOverlayLabel
|
|
13
13
|
}));
|
|
14
14
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { GridOverlayProps } from './containers/GridOverlay';
|
|
3
|
+
declare const GridNoRowsOverlay: React.ForwardRefExoticComponent<GridOverlayProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
3
4
|
sx?: import("@mui/system").SxProps<import("@mui/system").Theme>;
|
|
4
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
export { GridNoRowsOverlay };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
4
5
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
5
6
|
import { GridOverlay } from "./containers/GridOverlay.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
const GridNoRowsOverlay =
|
|
8
|
+
const GridNoRowsOverlay = forwardRef(function GridNoRowsOverlay(props, ref) {
|
|
8
9
|
const apiRef = useGridApiContext();
|
|
9
10
|
const noRowsLabel = apiRef.current.getLocaleText('noRowsLabel');
|
|
10
|
-
return /*#__PURE__*/_jsx(GridOverlay, _extends({
|
|
11
|
-
ref: ref
|
|
12
|
-
}, props, {
|
|
11
|
+
return /*#__PURE__*/_jsx(GridOverlay, _extends({}, props, {
|
|
12
|
+
ref: ref,
|
|
13
13
|
children: noRowsLabel
|
|
14
14
|
}));
|
|
15
15
|
});
|
|
@@ -6,5 +6,5 @@ export type WrappedLabelDisplayedRows = (args: LabelDisplayedRowsArgs & {
|
|
|
6
6
|
interface GridPaginationOwnProps {
|
|
7
7
|
component?: React.ElementType;
|
|
8
8
|
}
|
|
9
|
-
declare const GridPagination: React.ForwardRefExoticComponent<Omit<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps, "ref"> & React.RefAttributes<unknown>>;
|
|
9
|
+
declare const GridPagination: React.ForwardRefExoticComponent<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps> | React.ForwardRefExoticComponent<Omit<Partial<Omit<TablePaginationProps, "component">> & GridPaginationOwnProps, "ref"> & React.RefAttributes<unknown>>;
|
|
10
10
|
export { GridPagination };
|
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { styled } from '@mui/material/styles';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import TablePagination, { tablePaginationClasses } from '@mui/material/TablePagination';
|
|
6
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
6
7
|
import { useGridSelector } from "../hooks/utils/useGridSelector.js";
|
|
7
8
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
8
9
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -55,7 +56,7 @@ const defaultLabelDisplayedRows = ({
|
|
|
55
56
|
|
|
56
57
|
// A mutable version of a readonly array.
|
|
57
58
|
|
|
58
|
-
const GridPagination =
|
|
59
|
+
const GridPagination = forwardRef(function GridPagination(props, ref) {
|
|
59
60
|
const apiRef = useGridApiContext();
|
|
60
61
|
const rootProps = useGridRootProps();
|
|
61
62
|
const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
|
|
@@ -119,7 +120,6 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
119
120
|
const locales = apiRef.current.getLocaleText('MuiTablePagination');
|
|
120
121
|
const wrappedLabelDisplayedRows = wrapLabelDisplayedRows(locales.labelDisplayedRows || defaultLabelDisplayedRows, estimatedRowCount);
|
|
121
122
|
return /*#__PURE__*/_jsx(GridPaginationRoot, _extends({
|
|
122
|
-
ref: ref,
|
|
123
123
|
component: "div",
|
|
124
124
|
count: rowCount,
|
|
125
125
|
page: computedPage
|
|
@@ -133,7 +133,9 @@ const GridPagination = /*#__PURE__*/React.forwardRef(function GridPagination(pro
|
|
|
133
133
|
onRowsPerPageChange: handlePageSizeChange
|
|
134
134
|
}, computedProps, locales, {
|
|
135
135
|
labelDisplayedRows: wrappedLabelDisplayedRows
|
|
136
|
-
}, props
|
|
136
|
+
}, props, {
|
|
137
|
+
ref: ref
|
|
138
|
+
}));
|
|
137
139
|
});
|
|
138
140
|
process.env.NODE_ENV !== "production" ? GridPagination.propTypes = {
|
|
139
141
|
// ----------------------------- Warning --------------------------------
|
package/components/GridRow.d.ts
CHANGED
|
@@ -40,5 +40,5 @@ export interface GridRowProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
40
40
|
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
|
|
41
41
|
[x: `data-${string}`]: string;
|
|
42
42
|
}
|
|
43
|
-
declare const MemoizedGridRow: React.ForwardRefExoticComponent<GridRowProps & React.RefAttributes<HTMLDivElement>>;
|
|
43
|
+
declare const MemoizedGridRow: React.ForwardRefExoticComponent<GridRowProps> | React.ForwardRefExoticComponent<GridRowProps & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
export { MemoizedGridRow as GridRow };
|
package/components/GridRow.js
CHANGED
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_useForkRef as useForkRef } from '@mui/utils';
|
|
8
8
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { GridEditModes, GridRowModes, GridCellModes } from "../models/gridEditRowModel.js";
|
|
10
11
|
import { gridClasses } from "../constants/gridClasses.js";
|
|
11
12
|
import { composeGridClasses } from "../utils/composeGridClasses.js";
|
|
@@ -48,7 +49,7 @@ process.env.NODE_ENV !== "production" ? EmptyCell.propTypes = {
|
|
|
48
49
|
// ----------------------------------------------------------------------
|
|
49
50
|
width: PropTypes.number.isRequired
|
|
50
51
|
} : void 0;
|
|
51
|
-
const GridRow =
|
|
52
|
+
const GridRow = forwardRef(function GridRow(props, refProp) {
|
|
52
53
|
const {
|
|
53
54
|
selected,
|
|
54
55
|
rowId,
|
|
@@ -303,13 +304,13 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
303
304
|
const expandedWidth = dimensions.viewportOuterSize.width - dimensions.columnsTotalWidth - scrollbarWidth;
|
|
304
305
|
const emptyCellWidth = Math.max(0, expandedWidth);
|
|
305
306
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
306
|
-
ref: handleRef,
|
|
307
307
|
"data-id": rowId,
|
|
308
308
|
"data-rowindex": index,
|
|
309
309
|
role: "row",
|
|
310
310
|
className: clsx(...rowClassNames, classes.root, className),
|
|
311
311
|
style: style
|
|
312
312
|
}, ariaAttributes, eventHandlers, other, {
|
|
313
|
+
ref: handleRef,
|
|
313
314
|
children: [leftCells, /*#__PURE__*/_jsx("div", {
|
|
314
315
|
role: "presentation",
|
|
315
316
|
className: gridClasses.cellOffsetLeft,
|
|
@@ -7,7 +7,7 @@ interface RowCountProps {
|
|
|
7
7
|
export type GridRowCountProps = React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
8
8
|
sx?: SxProps<Theme>;
|
|
9
9
|
};
|
|
10
|
-
declare const GridRowCount: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
10
|
+
declare const GridRowCount: React.ForwardRefExoticComponent<GridRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & RowCountProps & {
|
|
11
11
|
sx?: SxProps<Theme>;
|
|
12
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
13
13
|
export { GridRowCount };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -30,7 +31,7 @@ const GridRowCountRoot = styled('div', {
|
|
|
30
31
|
display: 'flex',
|
|
31
32
|
margin: theme.spacing(0, 2)
|
|
32
33
|
}));
|
|
33
|
-
const GridRowCount =
|
|
34
|
+
const GridRowCount = forwardRef(function GridRowCount(props, ref) {
|
|
34
35
|
const {
|
|
35
36
|
className,
|
|
36
37
|
rowCount,
|
|
@@ -45,10 +46,10 @@ const GridRowCount = /*#__PURE__*/React.forwardRef(function GridRowCount(props,
|
|
|
45
46
|
}
|
|
46
47
|
const text = visibleRowCount < rowCount ? apiRef.current.getLocaleText('footerTotalVisibleRows')(visibleRowCount, rowCount) : rowCount.toLocaleString();
|
|
47
48
|
return /*#__PURE__*/_jsxs(GridRowCountRoot, _extends({
|
|
48
|
-
ref: ref,
|
|
49
49
|
className: clsx(classes.root, className),
|
|
50
50
|
ownerState: ownerState
|
|
51
51
|
}, other, {
|
|
52
|
+
ref: ref,
|
|
52
53
|
children: [apiRef.current.getLocaleText('footerTotalRows'), " ", text]
|
|
53
54
|
}));
|
|
54
55
|
});
|
|
@@ -3,7 +3,10 @@ import { SxProps, Theme } from '@mui/system';
|
|
|
3
3
|
interface SelectedRowCountProps {
|
|
4
4
|
selectedRowCount: number;
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type GridSelectedRowCountProps = React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
|
|
7
|
+
sx?: SxProps<Theme>;
|
|
8
|
+
};
|
|
9
|
+
declare const GridSelectedRowCount: React.ForwardRefExoticComponent<GridSelectedRowCountProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & SelectedRowCountProps & {
|
|
7
10
|
sx?: SxProps<Theme>;
|
|
8
11
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
9
12
|
export { GridSelectedRowCount };
|
|
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { styled } from '@mui/system';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
10
11
|
import { getDataGridUtilityClass } from "../constants/gridClasses.js";
|
|
11
12
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
@@ -38,7 +39,7 @@ const GridSelectedRowCountRoot = styled('div', {
|
|
|
38
39
|
height: 'auto'
|
|
39
40
|
}
|
|
40
41
|
}));
|
|
41
|
-
const GridSelectedRowCount =
|
|
42
|
+
const GridSelectedRowCount = forwardRef(function GridSelectedRowCount(props, ref) {
|
|
42
43
|
const {
|
|
43
44
|
className,
|
|
44
45
|
selectedRowCount
|
|
@@ -49,10 +50,10 @@ const GridSelectedRowCount = /*#__PURE__*/React.forwardRef(function GridSelected
|
|
|
49
50
|
const classes = useUtilityClasses(ownerState);
|
|
50
51
|
const rowSelectedText = apiRef.current.getLocaleText('footerRowSelected')(selectedRowCount);
|
|
51
52
|
return /*#__PURE__*/_jsx(GridSelectedRowCountRoot, _extends({
|
|
52
|
-
ref: ref,
|
|
53
53
|
className: clsx(classes.root, className),
|
|
54
54
|
ownerState: ownerState
|
|
55
55
|
}, other, {
|
|
56
|
+
ref: ref,
|
|
56
57
|
children: rowSelectedText
|
|
57
58
|
}));
|
|
58
59
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
2
|
+
declare const GridSkeletonLoadingOverlay: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement>> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export { GridSkeletonLoadingOverlay };
|
|
@@ -4,6 +4,7 @@ import clsx from 'clsx';
|
|
|
4
4
|
import { styled } from '@mui/system';
|
|
5
5
|
import useForkRef from '@mui/utils/useForkRef';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
7
8
|
import { useGridApiContext } from "../hooks/utils/useGridApiContext.js";
|
|
8
9
|
import { useGridRootProps } from "../hooks/utils/useGridRootProps.js";
|
|
9
10
|
import { GridPinnedColumnPosition, gridColumnPositionsSelector, gridColumnsTotalWidthSelector, gridDimensionsSelector, gridVisibleColumnDefinitionsSelector, gridVisiblePinnedColumnDefinitionsSelector, useGridApiEventHandler, useGridSelector } from "../hooks/index.js";
|
|
@@ -34,7 +35,7 @@ const useUtilityClasses = ownerState => {
|
|
|
34
35
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
35
36
|
};
|
|
36
37
|
const getColIndex = el => parseInt(el.getAttribute('data-colindex'), 10);
|
|
37
|
-
const GridSkeletonLoadingOverlay =
|
|
38
|
+
const GridSkeletonLoadingOverlay = forwardRef(function GridSkeletonLoadingOverlay(props, forwardedRef) {
|
|
38
39
|
const rootProps = useGridRootProps();
|
|
39
40
|
const {
|
|
40
41
|
slots
|
|
@@ -172,9 +173,9 @@ const GridSkeletonLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridSk
|
|
|
172
173
|
};
|
|
173
174
|
useGridApiEventHandler(apiRef, 'columnResize', handleColumnResize);
|
|
174
175
|
return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({
|
|
175
|
-
className: classes.root
|
|
176
|
-
ref: handleRef
|
|
176
|
+
className: classes.root
|
|
177
177
|
}, props, {
|
|
178
|
+
ref: handleRef,
|
|
178
179
|
children: children
|
|
179
180
|
}));
|
|
180
181
|
});
|
|
@@ -19,7 +19,7 @@ export type GridActionsCellItemProps = GridActionsCellItemCommonProps & (({
|
|
|
19
19
|
closeMenuOnClick?: boolean;
|
|
20
20
|
closeMenu?: () => void;
|
|
21
21
|
} & Omit<MenuItemProps, 'component'>));
|
|
22
|
-
declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
|
|
22
|
+
declare const GridActionsCellItem: React.ForwardRefExoticComponent<GridActionsCellItemProps> | React.ForwardRefExoticComponent<(Omit<GridActionsCellItemCommonProps & {
|
|
23
23
|
showInMenu?: false;
|
|
24
24
|
icon: React.ReactElement;
|
|
25
25
|
} & Omit<IconButtonProps, "component">, "ref"> | Omit<GridActionsCellItemCommonProps & {
|
|
@@ -6,9 +6,10 @@ import * as React from 'react';
|
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import MenuItem from '@mui/material/MenuItem';
|
|
8
8
|
import ListItemIcon from '@mui/material/ListItemIcon';
|
|
9
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
9
10
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
-
const GridActionsCellItem =
|
|
12
|
+
const GridActionsCellItem = forwardRef((props, ref) => {
|
|
12
13
|
const rootProps = useGridRootProps();
|
|
13
14
|
if (!props.showInMenu) {
|
|
14
15
|
const {
|
|
@@ -21,13 +22,13 @@ const GridActionsCellItem = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
21
22
|
onClick?.(event);
|
|
22
23
|
};
|
|
23
24
|
return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
24
|
-
ref: ref,
|
|
25
25
|
size: "small",
|
|
26
26
|
role: "menuitem",
|
|
27
27
|
"aria-label": label
|
|
28
28
|
}, other, {
|
|
29
29
|
onClick: handleClick
|
|
30
30
|
}, rootProps.slotProps?.baseIconButton, {
|
|
31
|
+
ref: ref,
|
|
31
32
|
children: /*#__PURE__*/React.cloneElement(icon, {
|
|
32
33
|
fontSize: 'small'
|
|
33
34
|
})
|
|
@@ -46,7 +46,7 @@ export type GridCellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
46
46
|
style?: React.CSSProperties;
|
|
47
47
|
[x: `data-${string}`]: string;
|
|
48
48
|
};
|
|
49
|
-
declare const MemoizedGridCell: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
49
|
+
declare const MemoizedGridCell: React.ForwardRefExoticComponent<GridCellProps> | React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
50
50
|
[x: `data-${string}`]: string;
|
|
51
51
|
align: GridAlignment;
|
|
52
52
|
className?: string;
|
|
@@ -8,6 +8,7 @@ import clsx from 'clsx';
|
|
|
8
8
|
import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_ownerDocument as ownerDocument, unstable_capitalize as capitalize } from '@mui/utils';
|
|
9
9
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
10
10
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
11
|
+
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
11
12
|
import { doesSupportPreventScroll } from "../../utils/doesSupportPreventScroll.js";
|
|
12
13
|
import { getDataGridUtilityClass, gridClasses } from "../../constants/gridClasses.js";
|
|
13
14
|
import { GridCellModes } from "../../models/index.js";
|
|
@@ -76,7 +77,7 @@ let warnedOnce = false;
|
|
|
76
77
|
|
|
77
78
|
// TODO(v7): Removing the wrapper will break the docs performance visualization demo.
|
|
78
79
|
|
|
79
|
-
const GridCell =
|
|
80
|
+
const GridCell = forwardRef(function GridCell(props, ref) {
|
|
80
81
|
const {
|
|
81
82
|
column,
|
|
82
83
|
rowId,
|
|
@@ -313,7 +314,6 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
313
314
|
onDragOver: publish('cellDragOver', onDragOver)
|
|
314
315
|
};
|
|
315
316
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
316
|
-
ref: handleRef,
|
|
317
317
|
className: clsx(classes.root, classNames, className),
|
|
318
318
|
role: "gridcell",
|
|
319
319
|
"data-field": field,
|
|
@@ -333,6 +333,7 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
333
333
|
onKeyUp: publish('cellKeyUp', onKeyUp)
|
|
334
334
|
}, draggableEventHandlers, other, {
|
|
335
335
|
onFocus: handleFocus,
|
|
336
|
+
ref: handleRef,
|
|
336
337
|
children: children
|
|
337
338
|
}));
|
|
338
339
|
});
|
|
@@ -11,6 +11,6 @@ export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<I
|
|
|
11
11
|
*/
|
|
12
12
|
onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: string) => Promise<void> | void;
|
|
13
13
|
}
|
|
14
|
-
declare const GridEditInputCell: React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
declare const GridEditInputCell: React.ForwardRefExoticComponent<GridEditInputCellProps> | React.ForwardRefExoticComponent<Omit<GridEditInputCellProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
15
15
|
export { GridEditInputCell };
|
|
16
16
|
export declare const renderEditInputCell: (params: GridEditInputCellProps) => React.JSX.Element;
|