@mui/x-data-grid-pro 7.23.5 → 7.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +159 -0
- package/DataGridPro/DataGridPro.js +5 -7
- package/DataGridPro/useDataGridProComponent.d.ts +1 -1
- package/DataGridPro/useDataGridProComponent.js +1 -1
- package/components/headerFiltering/GridHeaderFilterCell.d.ts +7 -7
- package/components/headerFiltering/GridHeaderFilterCell.js +15 -15
- package/components/headerFiltering/GridHeaderFilterMenuContainer.d.ts +1 -1
- package/esm/DataGridPro/DataGridPro.js +7 -9
- package/esm/DataGridPro/useDataGridProComponent.js +1 -1
- package/esm/components/headerFiltering/GridHeaderFilterCell.js +16 -16
- package/esm/hooks/features/columnHeaders/useGridColumnHeaders.js +16 -15
- package/esm/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/esm/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/esm/hooks/features/infiniteLoader/useGridInfiniteLoader.js +1 -1
- package/esm/hooks/features/rowReorder/useGridRowReorder.js +1 -1
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +14 -13
- package/hooks/features/columnPinning/useGridColumnPinning.d.ts +1 -1
- package/hooks/features/columnPinning/useGridColumnPinningPreProcessors.d.ts +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.d.ts +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/hooks/features/dataSource/useGridDataSource.d.ts +1 -1
- package/hooks/features/dataSource/utils.d.ts +1 -1
- package/hooks/features/detailPanel/useGridDetailPanel.d.ts +1 -1
- package/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/hooks/features/detailPanel/useGridDetailPanelPreProcessors.d.ts +1 -1
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.d.ts +1 -1
- package/hooks/features/infiniteLoader/useGridInfiniteLoader.js +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoader.d.ts +1 -1
- package/hooks/features/lazyLoader/useGridLazyLoaderPreProcessors.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinning.d.ts +1 -1
- package/hooks/features/rowPinning/useGridRowPinningPreProcessors.d.ts +2 -2
- package/hooks/features/rowReorder/useGridRowReorder.d.ts +1 -1
- package/hooks/features/rowReorder/useGridRowReorder.js +1 -1
- package/hooks/features/rowReorder/useGridRowReorderPreProcessors.d.ts +1 -1
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.d.ts +1 -1
- package/hooks/features/treeData/gridTreeDataUtils.d.ts +1 -1
- package/hooks/features/treeData/useGridTreeData.d.ts +1 -1
- package/hooks/features/treeData/useGridTreeDataPreProcessors.d.ts +1 -1
- package/hooks/utils/useGridApiContext.d.ts +1 -1
- package/hooks/utils/useGridApiRef.d.ts +1 -1
- package/hooks/utils/useGridPrivateApiContext.d.ts +1 -1
- package/index.js +1 -1
- package/models/dataGridProProps.d.ts +1 -1
- package/modern/DataGridPro/DataGridPro.js +7 -9
- package/modern/DataGridPro/useDataGridProComponent.js +1 -1
- package/modern/components/headerFiltering/GridHeaderFilterCell.js +16 -16
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +16 -15
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +1 -1
- package/modern/hooks/features/detailPanel/useGridDetailPanel.js +2 -2
- package/modern/hooks/features/infiniteLoader/useGridInfiniteLoader.js +1 -1
- package/modern/hooks/features/rowReorder/useGridRowReorder.js +1 -1
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +4 -4
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,165 @@
|
|
|
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
|
+
## 7.24.0
|
|
7
|
+
|
|
8
|
+
_Jan 17, 2025_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🔄 Data Grid [Scroll restoration](https://next.mui.com/x/react-data-grid/scrolling/#scroll-restoration)
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
|
|
15
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
16
|
+
@lauri865, @AxharKhan.
|
|
17
|
+
Following are all team members who have contributed to this release:
|
|
18
|
+
@KenanYusuf, @arminmeh, @cherniavskii, @michelengelen, @samuelsycamore, @LukasTy.
|
|
19
|
+
|
|
20
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
21
|
+
|
|
22
|
+
### Data Grid
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid@7.24.0`
|
|
25
|
+
|
|
26
|
+
- [DataGrid] Fix resizing right pinned column (#16193) @KenanYusuf
|
|
27
|
+
- [DataGrid] Improve scrollbar deadzone with overlay scrollbars (#16212) @lauri865
|
|
28
|
+
- [DataGrid] Scroll restoration (#16208) @lauri865
|
|
29
|
+
- [DataGrid] Fix row, cell and header memoizations (#16195) @lauri865
|
|
30
|
+
- [l10n] Improve Urdu (ur-PK) locale (#16081) @AxharKhan
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@7.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@7.24.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Add test for column pinning with disabled column virtualization (#16196) @cherniavskii
|
|
37
|
+
- [DataGridPro] Fix width of right-pinned column group during resize (#16207) @cherniavskii
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@7.24.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@7.24.0`.
|
|
42
|
+
|
|
43
|
+
### Date and Time Pickers
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers@7.24.0`
|
|
46
|
+
|
|
47
|
+
Internal changes.
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers-pro@7.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-date-pickers@7.24.0`.
|
|
52
|
+
|
|
53
|
+
### Charts
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts@7.24.0`
|
|
56
|
+
|
|
57
|
+
Internal changes.
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts-pro@7.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
60
|
+
|
|
61
|
+
Same changes as in `@mui/x-charts@7.24.0`.
|
|
62
|
+
|
|
63
|
+
### Tree View
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-tree-view@7.24.0`
|
|
66
|
+
|
|
67
|
+
Internal changes.
|
|
68
|
+
|
|
69
|
+
#### `@mui/x-tree-view-pro@7.24.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
|
+
|
|
71
|
+
Same changes as in `@mui/x-tree-view@7.24.0`.
|
|
72
|
+
|
|
73
|
+
### Docs
|
|
74
|
+
|
|
75
|
+
- [docs] Copyedit the Data Grid cell selection page (#16213) @samuelsycamore
|
|
76
|
+
- [docs] Fix demo rendering issue on Codesandbox (#16129) @arminmeh
|
|
77
|
+
|
|
78
|
+
### Core
|
|
79
|
+
|
|
80
|
+
- [core] Type all references as `RefObject` (#16125) @arminmeh
|
|
81
|
+
- [code-infra] Refactor `react` and `react-dom` definitions to simplify dep resolving (#16214) @LukasTy
|
|
82
|
+
- [infra] Improve cherry-pick action target list (#16188) @michelengelen
|
|
83
|
+
- [test] Fix flaky column pinning unit test (#16209) @cherniavskii
|
|
84
|
+
|
|
85
|
+
## 7.23.6
|
|
86
|
+
|
|
87
|
+
_Jan 9, 2025_
|
|
88
|
+
|
|
89
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
90
|
+
|
|
91
|
+
- 🌍 Add Chinese (Taiwan) (zh-TW) locale on the Date and Time Pickers
|
|
92
|
+
- 🌍 Improve Norwegian (nb-NO) locale on the Date and Time Pickers
|
|
93
|
+
- 🌍 Improve Dutch (nl-NL) locale on the Data Grid
|
|
94
|
+
- 🐞 Bugfixes
|
|
95
|
+
|
|
96
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
97
|
+
@josteinjhauge, @derek-0000, @nusr, @k-rajat19, @tomashauser.
|
|
98
|
+
Following are all team members who have contributed to this release:
|
|
99
|
+
@flaviendelangle, @LukasTy, @MBilalShafi, @arminmeh, @oliviertassinari, @cherniavskii.
|
|
100
|
+
|
|
101
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
102
|
+
|
|
103
|
+
### Data Grid
|
|
104
|
+
|
|
105
|
+
#### `@mui/x-data-grid@7.23.6`
|
|
106
|
+
|
|
107
|
+
- [DataGrid] Improve React 19 support (#16048) @LukasTy
|
|
108
|
+
- [DataGrid] Add `name` attribute to selection checkboxes (#16041) @derek-0000
|
|
109
|
+
- [DataGrid] Fix number filter field formatting values while typing (#16068) @arminmeh
|
|
110
|
+
- [DataGrid] Fix select all checkbox state reset with server side data (#16039) @MBilalShafi
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-data-grid-pro@7.23.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-data-grid@7.23.6`.
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-data-grid-premium@7.23.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-data-grid-pro@7.23.6`.
|
|
119
|
+
|
|
120
|
+
### Date and Time Pickers
|
|
121
|
+
|
|
122
|
+
#### `@mui/x-date-pickers@7.23.6`
|
|
123
|
+
|
|
124
|
+
- [pickers] Improve React 19 support (#16048) @LukasTy
|
|
125
|
+
- [l10n] Add Chinese (Taiwan) (zh-TW) locale (#16057) @nusr
|
|
126
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#16083) @josteinjhauge
|
|
127
|
+
- [pickers] Support `date-fns-jalali` v4 (#16013) @LukasTy
|
|
128
|
+
|
|
129
|
+
#### `@mui/x-date-pickers-pro@7.23.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
130
|
+
|
|
131
|
+
Same changes as in `@mui/x-date-pickers@7.23.6`.
|
|
132
|
+
|
|
133
|
+
### Charts
|
|
134
|
+
|
|
135
|
+
#### `@mui/x-charts@7.23.6`
|
|
136
|
+
|
|
137
|
+
- [charts] Improve React 19 support (#16048) @LukasTy
|
|
138
|
+
- [charts] Fix 301 redirection in the API documentation @oliviertassinari
|
|
139
|
+
|
|
140
|
+
#### `@mui/x-charts-pro@7.23.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
141
|
+
|
|
142
|
+
Same changes as in `@mui/x-charts@7.23.6`.
|
|
143
|
+
|
|
144
|
+
### Tree View
|
|
145
|
+
|
|
146
|
+
#### `@mui/x-tree-view@7.23.6`
|
|
147
|
+
|
|
148
|
+
- [TreeView] Improve React 19 support (#16048) @LukasTy
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-tree-view-pro@7.23.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-tree-view@7.23.6`.
|
|
153
|
+
|
|
154
|
+
### Docs
|
|
155
|
+
|
|
156
|
+
- [docs] Fix `EditingWithDatePickers` demo (#16047) @k-rajat19
|
|
157
|
+
- [docs] Fix doc warning for automatic children selection on tree view (#16037) @flaviendelangle
|
|
158
|
+
- [docs] Fix non-existing "adapter" property of `LocalizationProvider` (#16088) @tomashauser
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- [core] Clarify the release strategy (#16012) @MBilalShafi
|
|
163
|
+
- [core] Update the `release:version` docs (#16040) @cherniavskii
|
|
164
|
+
|
|
6
165
|
## 7.23.5
|
|
7
166
|
|
|
8
167
|
_Dec 27, 2024_
|
|
@@ -39,18 +39,16 @@ const DataGridProRaw = (0, _forwardRef.forwardRef)(function DataGridPro(inProps,
|
|
|
39
39
|
privateApiRef: privateApiRef,
|
|
40
40
|
configuration: configuration,
|
|
41
41
|
props: props,
|
|
42
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridRoot, (0, _extends2.default)({
|
|
43
43
|
className: props.className,
|
|
44
44
|
style: props.style,
|
|
45
45
|
sx: props.sx
|
|
46
46
|
}, props.forwardedProps, props.slotProps?.root, {
|
|
47
47
|
ref: ref,
|
|
48
|
-
children:
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})
|
|
53
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridFooterPlaceholder, {})]
|
|
48
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
49
|
+
packageName: "x-data-grid-pro",
|
|
50
|
+
releaseInfo: releaseInfo
|
|
51
|
+
})
|
|
54
52
|
}))
|
|
55
53
|
});
|
|
56
54
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridApiPro, GridPrivateApiPro } from '../models/gridApiPro';
|
|
3
3
|
import { DataGridProProcessedProps } from '../models/dataGridProProps';
|
|
4
|
-
export declare const useDataGridProComponent: (inputApiRef: React.
|
|
4
|
+
export declare const useDataGridProComponent: (inputApiRef: React.RefObject<GridApiPro> | undefined, props: DataGridProProcessedProps) => React.RefObject<GridPrivateApiPro>;
|
|
@@ -51,6 +51,7 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
51
51
|
(0, _internals.useGridInitializeState)(_useGridColumnPinning.columnPinningStateInitializer, apiRef, props);
|
|
52
52
|
(0, _internals.useGridInitializeState)(_internals.columnsStateInitializer, apiRef, props);
|
|
53
53
|
(0, _internals.useGridInitializeState)(_useGridRowPinning.rowPinningStateInitializer, apiRef, props);
|
|
54
|
+
(0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
|
|
54
55
|
(0, _internals.useGridInitializeState)(_internals.rowsStateInitializer, apiRef, props);
|
|
55
56
|
(0, _internals.useGridInitializeState)(_internals.editingStateInitializer, apiRef, props);
|
|
56
57
|
(0, _internals.useGridInitializeState)(_internals.focusStateInitializer, apiRef, props);
|
|
@@ -61,7 +62,6 @@ const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
61
62
|
(0, _internals.useGridInitializeState)(_internals.densityStateInitializer, apiRef, props);
|
|
62
63
|
(0, _internals.useGridInitializeState)(_useGridColumnReorder.columnReorderStateInitializer, apiRef, props);
|
|
63
64
|
(0, _internals.useGridInitializeState)(_internals.columnResizeStateInitializer, apiRef, props);
|
|
64
|
-
(0, _internals.useGridInitializeState)(_internals.paginationStateInitializer, apiRef, props);
|
|
65
65
|
(0, _internals.useGridInitializeState)(_internals.rowsMetaStateInitializer, apiRef, props);
|
|
66
66
|
(0, _internals.useGridInitializeState)(_internals.columnMenuStateInitializer, apiRef, props);
|
|
67
67
|
(0, _internals.useGridInitializeState)(_internals.columnGroupsStateInitializer, apiRef, props);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { GridFilterItem, GridFilterOperator, GridColDef
|
|
3
|
-
import { GridStateColDef } from '@mui/x-data-grid/internals';
|
|
2
|
+
import { GridFilterItem, GridFilterOperator, GridColDef } from '@mui/x-data-grid';
|
|
3
|
+
import { PinnedColumnPosition, GridStateColDef } from '@mui/x-data-grid/internals';
|
|
4
4
|
export interface GridRenderHeaderFilterProps extends GridHeaderFilterCellProps {
|
|
5
5
|
inputRef: React.RefObject<unknown>;
|
|
6
6
|
}
|
|
@@ -12,15 +12,15 @@ export interface GridHeaderFilterCellProps extends Pick<GridStateColDef, 'header
|
|
|
12
12
|
tabIndex: 0 | -1;
|
|
13
13
|
width: number;
|
|
14
14
|
colDef: GridColDef;
|
|
15
|
-
headerFilterMenuRef: React.
|
|
15
|
+
headerFilterMenuRef: React.RefObject<HTMLButtonElement | null>;
|
|
16
16
|
item: GridFilterItem;
|
|
17
17
|
showClearIcon?: boolean;
|
|
18
18
|
InputComponentProps: GridFilterOperator['InputComponentProps'];
|
|
19
|
-
pinnedPosition?:
|
|
19
|
+
pinnedPosition?: PinnedColumnPosition;
|
|
20
|
+
pinnedOffset?: number;
|
|
20
21
|
style?: React.CSSProperties;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
gridHasFiller: boolean;
|
|
22
|
+
showLeftBorder: boolean;
|
|
23
|
+
showRightBorder: boolean;
|
|
24
24
|
}
|
|
25
25
|
declare const Memoized: React.ForwardRefExoticComponent<GridHeaderFilterCellProps> | React.ForwardRefExoticComponent<GridHeaderFilterCellProps & React.RefAttributes<HTMLDivElement>>;
|
|
26
26
|
export { Memoized as GridHeaderFilterCell };
|
|
@@ -15,12 +15,13 @@ var _utils = require("@mui/utils");
|
|
|
15
15
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
16
16
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
17
17
|
var _internals = require("@mui/x-data-grid/internals");
|
|
18
|
+
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
19
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
19
20
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
20
21
|
var _GridHeaderFilterMenuContainer = require("./GridHeaderFilterMenuContainer");
|
|
21
22
|
var _GridHeaderFilterClearButton = require("./GridHeaderFilterClearButton");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "
|
|
24
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "pinnedOffset", "style", "showLeftBorder", "showRightBorder"];
|
|
24
25
|
const useUtilityClasses = ownerState => {
|
|
25
26
|
const {
|
|
26
27
|
colDef,
|
|
@@ -30,11 +31,11 @@ const useUtilityClasses = ownerState => {
|
|
|
30
31
|
pinnedPosition
|
|
31
32
|
} = ownerState;
|
|
32
33
|
const slots = {
|
|
33
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition ===
|
|
34
|
+
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === _internals.PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === _internals.PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight']
|
|
34
35
|
};
|
|
35
36
|
return (0, _utils.unstable_composeClasses)(slots, _xDataGrid.getDataGridUtilityClass, classes);
|
|
36
37
|
};
|
|
37
|
-
const
|
|
38
|
+
const emptyFieldSx = {
|
|
38
39
|
[`& input[value=""]:not(:focus)`]: {
|
|
39
40
|
color: 'transparent'
|
|
40
41
|
}
|
|
@@ -62,13 +63,14 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
62
63
|
InputComponentProps,
|
|
63
64
|
showClearIcon = true,
|
|
64
65
|
pinnedPosition,
|
|
66
|
+
pinnedOffset,
|
|
65
67
|
style: styleProp,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
gridHasFiller
|
|
68
|
+
showLeftBorder,
|
|
69
|
+
showRightBorder
|
|
69
70
|
} = props,
|
|
70
71
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
71
72
|
const apiRef = (0, _internals.useGridPrivateApiContext)();
|
|
73
|
+
const isRtl = (0, _RtlProvider.useRtl)();
|
|
72
74
|
const columnFields = (0, _xDataGrid.useGridSelector)(apiRef, _xDataGrid.gridVisibleColumnFieldsSelector);
|
|
73
75
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
74
76
|
const cellRef = React.useRef(null);
|
|
@@ -183,8 +185,6 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
183
185
|
onMouseDown: publish('headerFilterMouseDown', onMouseDown),
|
|
184
186
|
onBlur: publish('headerFilterBlur')
|
|
185
187
|
}), [onMouseDown, onKeyDown, publish]);
|
|
186
|
-
const showLeftBorder = (0, _internals.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
187
|
-
const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
188
188
|
const ownerState = (0, _extends2.default)({}, rootProps, {
|
|
189
189
|
pinnedPosition,
|
|
190
190
|
colDef,
|
|
@@ -198,10 +198,10 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
198
198
|
const isFilterActive = isApplied || hasFocus;
|
|
199
199
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
200
200
|
className: (0, _clsx.default)(classes.root, headerClassName),
|
|
201
|
-
style: (0, _extends2.default)({
|
|
201
|
+
style: (0, _internals.attachPinnedStyle)((0, _extends2.default)({
|
|
202
202
|
height,
|
|
203
203
|
width
|
|
204
|
-
}, styleProp),
|
|
204
|
+
}, styleProp), isRtl, pinnedPosition, pinnedOffset),
|
|
205
205
|
role: "columnheader",
|
|
206
206
|
"aria-colindex": colIndex + 1,
|
|
207
207
|
"aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
|
|
@@ -238,7 +238,7 @@ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
|
|
|
238
238
|
disabled: isFilterReadOnly || isNoInputOperator,
|
|
239
239
|
tabIndex: -1,
|
|
240
240
|
InputLabelProps: null,
|
|
241
|
-
sx: colDef.type === 'date' || colDef.type === 'dateTime' ?
|
|
241
|
+
sx: colDef.type === 'date' || colDef.type === 'dateTime' || colDef.type === 'number' ? emptyFieldSx : undefined
|
|
242
242
|
}, isNoInputOperator ? {
|
|
243
243
|
value: ''
|
|
244
244
|
} : {}, currentOperator?.InputComponentProps, InputComponentProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridHeaderFilterMenuContainer.GridHeaderFilterMenuContainer, {
|
|
@@ -260,7 +260,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
260
260
|
// ----------------------------------------------------------------------
|
|
261
261
|
colDef: _propTypes.default.object.isRequired,
|
|
262
262
|
colIndex: _propTypes.default.number.isRequired,
|
|
263
|
-
gridHasFiller: _propTypes.default.bool.isRequired,
|
|
264
263
|
hasFocus: _propTypes.default.bool,
|
|
265
264
|
/**
|
|
266
265
|
* Class name added to the column header cell.
|
|
@@ -270,7 +269,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
270
269
|
current: _propTypes.default.object
|
|
271
270
|
}).isRequired,
|
|
272
271
|
height: _propTypes.default.number.isRequired,
|
|
273
|
-
indexInSection: _propTypes.default.number.isRequired,
|
|
274
272
|
InputComponentProps: _propTypes.default.object,
|
|
275
273
|
item: _propTypes.default.shape({
|
|
276
274
|
field: _propTypes.default.string.isRequired,
|
|
@@ -278,9 +276,11 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
278
276
|
operator: _propTypes.default.string.isRequired,
|
|
279
277
|
value: _propTypes.default.any
|
|
280
278
|
}).isRequired,
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
pinnedOffset: _propTypes.default.number,
|
|
280
|
+
pinnedPosition: _propTypes.default.oneOf([0, 1, 2, 3]),
|
|
283
281
|
showClearIcon: _propTypes.default.bool,
|
|
282
|
+
showLeftBorder: _propTypes.default.bool.isRequired,
|
|
283
|
+
showRightBorder: _propTypes.default.bool.isRequired,
|
|
284
284
|
sortIndex: _propTypes.default.number,
|
|
285
285
|
style: _propTypes.default.object,
|
|
286
286
|
tabIndex: _propTypes.default.oneOf([-1, 0]).isRequired,
|
|
@@ -5,7 +5,7 @@ declare function GridHeaderFilterMenuContainer(props: {
|
|
|
5
5
|
field: GridColDef['field'];
|
|
6
6
|
item: GridFilterItem;
|
|
7
7
|
applyFilterChanges: (item: GridFilterItem) => void;
|
|
8
|
-
headerFilterMenuRef: React.
|
|
8
|
+
headerFilterMenuRef: React.RefObject<HTMLButtonElement | null>;
|
|
9
9
|
buttonRef: React.Ref<HTMLButtonElement>;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}): React.JSX.Element | null;
|
|
@@ -4,7 +4,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { useLicenseVerifier, Watermark } from '@mui/x-license';
|
|
7
|
-
import {
|
|
7
|
+
import { GridRoot, GridContextProvider } from '@mui/x-data-grid';
|
|
8
8
|
import { validateProps } from '@mui/x-data-grid/internals';
|
|
9
9
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
10
10
|
import { useDataGridProComponent } from "./useDataGridProComponent.js";
|
|
@@ -13,7 +13,7 @@ import { getReleaseInfo } from "../utils/releaseInfo.js";
|
|
|
13
13
|
import { propValidatorsDataGridPro } from "../internals/propValidation.js";
|
|
14
14
|
import { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
15
15
|
import { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
16
|
-
import { jsx as _jsx
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
const configuration = {
|
|
18
18
|
hooks: {
|
|
19
19
|
useGridAriaAttributes,
|
|
@@ -32,18 +32,16 @@ const DataGridProRaw = forwardRef(function DataGridPro(inProps, ref) {
|
|
|
32
32
|
privateApiRef: privateApiRef,
|
|
33
33
|
configuration: configuration,
|
|
34
34
|
props: props,
|
|
35
|
-
children: /*#__PURE__*/
|
|
35
|
+
children: /*#__PURE__*/_jsx(GridRoot, _extends({
|
|
36
36
|
className: props.className,
|
|
37
37
|
style: props.style,
|
|
38
38
|
sx: props.sx
|
|
39
39
|
}, props.forwardedProps, props.slotProps?.root, {
|
|
40
40
|
ref: ref,
|
|
41
|
-
children:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
})
|
|
46
|
-
}), /*#__PURE__*/_jsx(GridFooterPlaceholder, {})]
|
|
41
|
+
children: /*#__PURE__*/_jsx(Watermark, {
|
|
42
|
+
packageName: "x-data-grid-pro",
|
|
43
|
+
releaseInfo: releaseInfo
|
|
44
|
+
})
|
|
47
45
|
}))
|
|
48
46
|
});
|
|
49
47
|
});
|
|
@@ -44,6 +44,7 @@ export const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
44
44
|
useGridInitializeState(columnPinningStateInitializer, apiRef, props);
|
|
45
45
|
useGridInitializeState(columnsStateInitializer, apiRef, props);
|
|
46
46
|
useGridInitializeState(rowPinningStateInitializer, apiRef, props);
|
|
47
|
+
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
47
48
|
useGridInitializeState(rowsStateInitializer, apiRef, props);
|
|
48
49
|
useGridInitializeState(editingStateInitializer, apiRef, props);
|
|
49
50
|
useGridInitializeState(focusStateInitializer, apiRef, props);
|
|
@@ -54,7 +55,6 @@ export const useDataGridProComponent = (inputApiRef, props) => {
|
|
|
54
55
|
useGridInitializeState(densityStateInitializer, apiRef, props);
|
|
55
56
|
useGridInitializeState(columnReorderStateInitializer, apiRef, props);
|
|
56
57
|
useGridInitializeState(columnResizeStateInitializer, apiRef, props);
|
|
57
|
-
useGridInitializeState(paginationStateInitializer, apiRef, props);
|
|
58
58
|
useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
|
|
59
59
|
useGridInitializeState(columnMenuStateInitializer, apiRef, props);
|
|
60
60
|
useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "
|
|
3
|
+
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "pinnedOffset", "style", "showLeftBorder", "showRightBorder"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_capitalize as capitalize } from '@mui/utils';
|
|
8
8
|
import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
9
9
|
import { gridVisibleColumnFieldsSelector, getDataGridUtilityClass, useGridSelector, GridFilterInputValue, GridFilterInputDate, GridFilterInputBoolean, GridFilterInputSingleSelect, gridFilterModelSelector, gridFilterableColumnLookupSelector } from '@mui/x-data-grid';
|
|
10
|
-
import { useGridPrivateApiContext, gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector, isNavigationKey,
|
|
10
|
+
import { PinnedColumnPosition, useGridPrivateApiContext, gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector, isNavigationKey, attachPinnedStyle } from '@mui/x-data-grid/internals';
|
|
11
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
11
12
|
import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
12
13
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
13
14
|
import { GridHeaderFilterMenuContainer } from "./GridHeaderFilterMenuContainer.js";
|
|
@@ -22,11 +23,11 @@ const useUtilityClasses = ownerState => {
|
|
|
22
23
|
pinnedPosition
|
|
23
24
|
} = ownerState;
|
|
24
25
|
const slots = {
|
|
25
|
-
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition ===
|
|
26
|
+
root: ['columnHeader', colDef.headerAlign === 'left' && 'columnHeader--alignLeft', colDef.headerAlign === 'center' && 'columnHeader--alignCenter', colDef.headerAlign === 'right' && 'columnHeader--alignRight', 'withBorderColor', showRightBorder && 'columnHeader--withRightBorder', showLeftBorder && 'columnHeader--withLeftBorder', pinnedPosition === PinnedColumnPosition.LEFT && 'columnHeader--pinnedLeft', pinnedPosition === PinnedColumnPosition.RIGHT && 'columnHeader--pinnedRight']
|
|
26
27
|
};
|
|
27
28
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
28
29
|
};
|
|
29
|
-
const
|
|
30
|
+
const emptyFieldSx = {
|
|
30
31
|
[`& input[value=""]:not(:focus)`]: {
|
|
31
32
|
color: 'transparent'
|
|
32
33
|
}
|
|
@@ -54,13 +55,14 @@ const GridHeaderFilterCell = forwardRef((props, ref) => {
|
|
|
54
55
|
InputComponentProps,
|
|
55
56
|
showClearIcon = true,
|
|
56
57
|
pinnedPosition,
|
|
58
|
+
pinnedOffset,
|
|
57
59
|
style: styleProp,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
gridHasFiller
|
|
60
|
+
showLeftBorder,
|
|
61
|
+
showRightBorder
|
|
61
62
|
} = props,
|
|
62
63
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
63
64
|
const apiRef = useGridPrivateApiContext();
|
|
65
|
+
const isRtl = useRtl();
|
|
64
66
|
const columnFields = useGridSelector(apiRef, gridVisibleColumnFieldsSelector);
|
|
65
67
|
const rootProps = useGridRootProps();
|
|
66
68
|
const cellRef = React.useRef(null);
|
|
@@ -175,8 +177,6 @@ const GridHeaderFilterCell = forwardRef((props, ref) => {
|
|
|
175
177
|
onMouseDown: publish('headerFilterMouseDown', onMouseDown),
|
|
176
178
|
onBlur: publish('headerFilterBlur')
|
|
177
179
|
}), [onMouseDown, onKeyDown, publish]);
|
|
178
|
-
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
179
|
-
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
180
180
|
const ownerState = _extends({}, rootProps, {
|
|
181
181
|
pinnedPosition,
|
|
182
182
|
colDef,
|
|
@@ -190,10 +190,10 @@ const GridHeaderFilterCell = forwardRef((props, ref) => {
|
|
|
190
190
|
const isFilterActive = isApplied || hasFocus;
|
|
191
191
|
return /*#__PURE__*/_jsxs("div", _extends({
|
|
192
192
|
className: clsx(classes.root, headerClassName),
|
|
193
|
-
style: _extends({
|
|
193
|
+
style: attachPinnedStyle(_extends({
|
|
194
194
|
height,
|
|
195
195
|
width
|
|
196
|
-
}, styleProp),
|
|
196
|
+
}, styleProp), isRtl, pinnedPosition, pinnedOffset),
|
|
197
197
|
role: "columnheader",
|
|
198
198
|
"aria-colindex": colIndex + 1,
|
|
199
199
|
"aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
|
|
@@ -230,7 +230,7 @@ const GridHeaderFilterCell = forwardRef((props, ref) => {
|
|
|
230
230
|
disabled: isFilterReadOnly || isNoInputOperator,
|
|
231
231
|
tabIndex: -1,
|
|
232
232
|
InputLabelProps: null,
|
|
233
|
-
sx: colDef.type === 'date' || colDef.type === 'dateTime' ?
|
|
233
|
+
sx: colDef.type === 'date' || colDef.type === 'dateTime' || colDef.type === 'number' ? emptyFieldSx : undefined
|
|
234
234
|
}, isNoInputOperator ? {
|
|
235
235
|
value: ''
|
|
236
236
|
} : {}, currentOperator?.InputComponentProps, InputComponentProps)), /*#__PURE__*/_jsx(GridHeaderFilterMenuContainer, {
|
|
@@ -252,7 +252,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
252
252
|
// ----------------------------------------------------------------------
|
|
253
253
|
colDef: PropTypes.object.isRequired,
|
|
254
254
|
colIndex: PropTypes.number.isRequired,
|
|
255
|
-
gridHasFiller: PropTypes.bool.isRequired,
|
|
256
255
|
hasFocus: PropTypes.bool,
|
|
257
256
|
/**
|
|
258
257
|
* Class name added to the column header cell.
|
|
@@ -262,7 +261,6 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
262
261
|
current: PropTypes.object
|
|
263
262
|
}).isRequired,
|
|
264
263
|
height: PropTypes.number.isRequired,
|
|
265
|
-
indexInSection: PropTypes.number.isRequired,
|
|
266
264
|
InputComponentProps: PropTypes.object,
|
|
267
265
|
item: PropTypes.shape({
|
|
268
266
|
field: PropTypes.string.isRequired,
|
|
@@ -270,9 +268,11 @@ process.env.NODE_ENV !== "production" ? GridHeaderFilterCell.propTypes = {
|
|
|
270
268
|
operator: PropTypes.string.isRequired,
|
|
271
269
|
value: PropTypes.any
|
|
272
270
|
}).isRequired,
|
|
273
|
-
|
|
274
|
-
|
|
271
|
+
pinnedOffset: PropTypes.number,
|
|
272
|
+
pinnedPosition: PropTypes.oneOf([0, 1, 2, 3]),
|
|
275
273
|
showClearIcon: PropTypes.bool,
|
|
274
|
+
showLeftBorder: PropTypes.bool.isRequired,
|
|
275
|
+
showRightBorder: PropTypes.bool.isRequired,
|
|
276
276
|
sortIndex: PropTypes.number,
|
|
277
277
|
style: PropTypes.object,
|
|
278
278
|
tabIndex: PropTypes.oneOf([-1, 0]).isRequired,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["getColumnsToRender", "renderContext", "leftRenderContext", "rightRenderContext", "pinnedColumns", "visibleColumns", "
|
|
3
|
+
const _excluded = ["getColumnsToRender", "getPinnedCellOffset", "renderContext", "leftRenderContext", "rightRenderContext", "pinnedColumns", "visibleColumns", "columnPositions"];
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass,
|
|
6
|
-
import { useGridColumnHeaders as useGridColumnHeadersCommunity, useGridPrivateApiContext, getGridFilter, GridColumnHeaderRow } from '@mui/x-data-grid/internals';
|
|
5
|
+
import { gridFocusColumnHeaderFilterSelector, useGridSelector, gridFilterModelSelector, gridTabIndexColumnHeaderFilterSelector, getDataGridUtilityClass, gridDimensionsSelector } from '@mui/x-data-grid';
|
|
6
|
+
import { useGridColumnHeaders as useGridColumnHeadersCommunity, useGridPrivateApiContext, getGridFilter, GridColumnHeaderRow, shouldCellShowLeftBorder, shouldCellShowRightBorder, PinnedColumnPosition } from '@mui/x-data-grid/internals';
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import { useGridRootProps } from "../../utils/useGridRootProps.js";
|
|
9
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -31,12 +31,13 @@ export const useGridColumnHeaders = props => {
|
|
|
31
31
|
})),
|
|
32
32
|
{
|
|
33
33
|
getColumnsToRender,
|
|
34
|
+
getPinnedCellOffset,
|
|
34
35
|
renderContext,
|
|
35
36
|
leftRenderContext,
|
|
36
37
|
rightRenderContext,
|
|
37
38
|
pinnedColumns,
|
|
38
39
|
visibleColumns,
|
|
39
|
-
|
|
40
|
+
columnPositions
|
|
40
41
|
} = _useGridColumnHeaders,
|
|
41
42
|
otherProps = _objectWithoutPropertiesLoose(_useGridColumnHeaders, _excluded);
|
|
42
43
|
const headerFiltersRef = React.useRef(null);
|
|
@@ -86,11 +87,12 @@ export const useGridColumnHeaders = props => {
|
|
|
86
87
|
}) : colDef.headerClassName;
|
|
87
88
|
const item = getFilterItem(colDef);
|
|
88
89
|
const pinnedPosition = params?.position;
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
const scrollbarWidth = dimensions.hasScrollY ? dimensions.scrollbarSize : 0;
|
|
91
|
+
const pinnedOffset = getPinnedCellOffset(pinnedPosition, colDef.computedWidth, columnIndex, columnPositions, dimensions.columnsTotalWidth, scrollbarWidth);
|
|
92
|
+
const indexInSection = i;
|
|
93
|
+
const sectionLength = renderedColumns.length;
|
|
94
|
+
const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
|
|
95
|
+
const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showCellVerticalBorder, gridHasFiller);
|
|
94
96
|
filters.push(/*#__PURE__*/_jsx(rootProps.slots.headerFilterCell, _extends({
|
|
95
97
|
colIndex: columnIndex,
|
|
96
98
|
height: dimensions.headerFilterHeight,
|
|
@@ -103,10 +105,9 @@ export const useGridColumnHeaders = props => {
|
|
|
103
105
|
"data-field": colDef.field,
|
|
104
106
|
item: item,
|
|
105
107
|
pinnedPosition: pinnedPosition,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
gridHasFiller: gridHasFiller
|
|
108
|
+
pinnedOffset: pinnedOffset,
|
|
109
|
+
showLeftBorder: showLeftBorder,
|
|
110
|
+
showRightBorder: showRightBorder
|
|
110
111
|
}, rootProps.slotProps?.headerFilterCell), `${colDef.field}-filter`));
|
|
111
112
|
}
|
|
112
113
|
return otherProps.getFillers(params, filters, 0, true);
|
|
@@ -122,14 +123,14 @@ export const useGridColumnHeaders = props => {
|
|
|
122
123
|
"aria-rowindex": headerGroupingMaxDepth + 2,
|
|
123
124
|
ownerState: rootProps,
|
|
124
125
|
children: [leftRenderContext && getColumnFilters({
|
|
125
|
-
position:
|
|
126
|
+
position: PinnedColumnPosition.LEFT,
|
|
126
127
|
renderContext: leftRenderContext,
|
|
127
128
|
maxLastColumn: leftRenderContext.lastColumnIndex
|
|
128
129
|
}), getColumnFilters({
|
|
129
130
|
renderContext,
|
|
130
131
|
maxLastColumn: visibleColumns.length - pinnedColumns.right.length
|
|
131
132
|
}), rightRenderContext && getColumnFilters({
|
|
132
|
-
position:
|
|
133
|
+
position: PinnedColumnPosition.RIGHT,
|
|
133
134
|
renderContext: rightRenderContext,
|
|
134
135
|
maxLastColumn: rightRenderContext.lastColumnIndex
|
|
135
136
|
})]
|
|
@@ -37,7 +37,7 @@ export const useGridColumnReorder = (apiRef, props) => {
|
|
|
37
37
|
});
|
|
38
38
|
const originColumnIndex = React.useRef(null);
|
|
39
39
|
const forbiddenIndexes = React.useRef({});
|
|
40
|
-
const removeDnDStylesTimeout = React.useRef();
|
|
40
|
+
const removeDnDStylesTimeout = React.useRef(undefined);
|
|
41
41
|
const ownerState = {
|
|
42
42
|
classes: props.classes
|
|
43
43
|
};
|
|
@@ -156,8 +156,8 @@ export const useGridDetailPanel = (apiRef, props) => {
|
|
|
156
156
|
apiRef.current.forceUpdate();
|
|
157
157
|
}, [apiRef, props.getDetailPanelContent, props.getDetailPanelHeight]);
|
|
158
158
|
useGridApiEventHandler(apiRef, 'sortedRowsSet', updateCachesAndForceUpdate);
|
|
159
|
-
const previousGetDetailPanelContentProp = React.useRef();
|
|
160
|
-
const previousGetDetailPanelHeightProp = React.useRef();
|
|
159
|
+
const previousGetDetailPanelContentProp = React.useRef(null);
|
|
160
|
+
const previousGetDetailPanelHeightProp = React.useRef(null);
|
|
161
161
|
const updateCachesIfNeeded = React.useCallback(() => {
|
|
162
162
|
if (props.getDetailPanelContent === previousGetDetailPanelContentProp.current && props.getDetailPanelHeight === previousGetDetailPanelHeightProp.current) {
|
|
163
163
|
return;
|
|
@@ -19,7 +19,7 @@ const InfiniteLoadingTriggerElement = styled('div')({
|
|
|
19
19
|
export const useGridInfiniteLoader = (apiRef, props) => {
|
|
20
20
|
const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
|
|
21
21
|
const currentPage = useGridVisibleRows(apiRef, props);
|
|
22
|
-
const observer = React.useRef();
|
|
22
|
+
const observer = React.useRef(null);
|
|
23
23
|
const updateTargetTimeout = useTimeout();
|
|
24
24
|
const triggerElement = React.useRef(null);
|
|
25
25
|
const isEnabled = props.rowsLoadingMode === 'client' && !!props.onRowsScrollEnd;
|