@mui/x-data-grid-pro 6.0.0-alpha.6 → 6.0.0-alpha.7
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 +42 -0
- package/components/GridDetailPanelToggleCell.js +1 -11
- package/components/GridTreeDataGroupingCell.js +1 -11
- package/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/hooks/features/rowReorder/useGridRowReorder.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/legacy/components/GridDetailPanelToggleCell.js +1 -11
- package/legacy/components/GridTreeDataGroupingCell.js +1 -11
- package/legacy/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/legacy/hooks/features/rowReorder/useGridRowReorder.js +3 -3
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/modern/components/GridDetailPanelToggleCell.js +1 -11
- package/modern/components/GridTreeDataGroupingCell.js +1 -11
- package/modern/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/modern/hooks/features/rowReorder/useGridRowReorder.js +3 -3
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/components/GridDetailPanelToggleCell.js +1 -11
- package/node/components/GridTreeDataGroupingCell.js +1 -11
- package/node/hooks/features/columnResize/useGridColumnResize.js +2 -2
- package/node/hooks/features/rowReorder/useGridRowReorder.js +3 -3
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/typeOverloads/reexports.d.ts +0 -5
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
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
|
+
## 6.0.0-alpha.7
|
|
7
|
+
|
|
8
|
+
_Nov 10, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- ⚙️ Removed everything marked as `@deprecated`
|
|
13
|
+
- 📚 Documentation improvements
|
|
14
|
+
- 🐞 Bugfixes
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v6.0.0-alpha.7` / `@mui/x-data-grid-pro@v6.0.0-alpha.7` / `@mui/x-data-grid-premium@v6.0.0-alpha.7`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Fix cell focus causing scroll jump when virtualization enabled (#6785) @yaredtsy
|
|
21
|
+
- [DataGrid] Remove items marked as `@deprecated` (#6505) @DanailH
|
|
22
|
+
|
|
23
|
+
### `@mui/x-date-pickers@v6.0.0-alpha.7` / `@mui/x-date-pickers-pro@v6.0.0-alpha.7`
|
|
24
|
+
|
|
25
|
+
#### Changes
|
|
26
|
+
|
|
27
|
+
- [fields] Rename section names to match the picker view nomenclature (#6779) @flaviendelangle
|
|
28
|
+
- [pickers] Fix pickers toolbar styling (#6793) @LukasTy
|
|
29
|
+
- [pickers] Improve validation JSDoc descriptions (#6777) @flaviendelangle
|
|
30
|
+
- [pickers] New `MobileDateTimePicker`, `DesktopDateTimePicker`, `DateTimePicker` and `StaticDateTimePicker` based on `DateTimeField` (#6767) @flaviendelangle
|
|
31
|
+
- [pickers] New `MobileTimePicker`, `DesktopTimePicker`, `TimePicker` and `StaticTimePicker` based on `TimeField` (#6728) @flaviendelangle
|
|
32
|
+
- [pickers] Support the `onError` prop and add context on the `onChange` prop (#6731) @flaviendelangle
|
|
33
|
+
|
|
34
|
+
### Docs
|
|
35
|
+
|
|
36
|
+
- [docs] Add missing Pro header suffix (#6775) @oliviertassinari
|
|
37
|
+
- [docs] Upgrade to Next.js 13 (#6790) @cherniavskii
|
|
38
|
+
|
|
39
|
+
### Core
|
|
40
|
+
|
|
41
|
+
- [core] Add OSSF Scorecard action (#6760) @oliviertassinari
|
|
42
|
+
- [core] Fix Pinned-Dependencies @oliviertassinari
|
|
43
|
+
- [core] Fix Scorecard fail Action @oliviertassinari
|
|
44
|
+
- [core] Pin GitHub Action dependencies (#6739) @renovate[bot]
|
|
45
|
+
- [core] Remove default access to GitHub action scopes @oliviertassinari
|
|
46
|
+
- [test] Fix test case name: Pro-> Premium @oliviertassinari
|
|
47
|
+
|
|
6
48
|
## 6.0.0-alpha.6
|
|
7
49
|
|
|
8
50
|
_Nov 4, 2022_
|
|
@@ -54,9 +54,8 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* GridApi that let you manipulate the grid.
|
|
57
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
58
57
|
*/
|
|
59
|
-
api: PropTypes.
|
|
58
|
+
api: PropTypes.object.isRequired,
|
|
60
59
|
|
|
61
60
|
/**
|
|
62
61
|
* The mode of the cell.
|
|
@@ -89,15 +88,6 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
89
88
|
*/
|
|
90
89
|
formattedValue: PropTypes.any,
|
|
91
90
|
|
|
92
|
-
/**
|
|
93
|
-
* Get the cell value of a row and field.
|
|
94
|
-
* @param {GridRowId} id The row id.
|
|
95
|
-
* @param {string} field The field.
|
|
96
|
-
* @returns {any} The cell value.
|
|
97
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
98
|
-
*/
|
|
99
|
-
getValue: PropTypes.func.isRequired,
|
|
100
|
-
|
|
101
91
|
/**
|
|
102
92
|
* If true, the cell is the active element.
|
|
103
93
|
*/
|
|
@@ -88,9 +88,8 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
90
|
* GridApi that let you manipulate the grid.
|
|
91
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
92
91
|
*/
|
|
93
|
-
api: PropTypes.
|
|
92
|
+
api: PropTypes.object.isRequired,
|
|
94
93
|
|
|
95
94
|
/**
|
|
96
95
|
* The mode of the cell.
|
|
@@ -123,15 +122,6 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
123
122
|
*/
|
|
124
123
|
formattedValue: PropTypes.any,
|
|
125
124
|
|
|
126
|
-
/**
|
|
127
|
-
* Get the cell value of a row and field.
|
|
128
|
-
* @param {GridRowId} id The row id.
|
|
129
|
-
* @param {string} field The field.
|
|
130
|
-
* @returns {any} The cell value.
|
|
131
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
132
|
-
*/
|
|
133
|
-
getValue: PropTypes.func.isRequired,
|
|
134
|
-
|
|
135
125
|
/**
|
|
136
126
|
* If true, the cell is the active element.
|
|
137
127
|
*/
|
|
@@ -146,7 +146,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
146
146
|
const handleResizeMouseUp = useEventCallback(nativeEvent => {
|
|
147
147
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
148
148
|
stopListening();
|
|
149
|
-
apiRef.current.
|
|
149
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
150
150
|
clearTimeout(stopResizeEventTimeout.current);
|
|
151
151
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
152
152
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -221,7 +221,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
stopListening();
|
|
224
|
-
apiRef.current.
|
|
224
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
225
225
|
clearTimeout(stopResizeEventTimeout.current);
|
|
226
226
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
227
227
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -57,7 +57,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
57
57
|
removeDnDStylesTimeout.current = setTimeout(() => {
|
|
58
58
|
dragRowNode.current.classList.remove(classes.rowDragging);
|
|
59
59
|
});
|
|
60
|
-
originRowIndex.current = apiRef.current.
|
|
60
|
+
originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
61
61
|
}, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
|
|
62
62
|
const handleDragOver = React.useCallback((params, event) => {
|
|
63
63
|
if (dragRowId === '') {
|
|
@@ -77,7 +77,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
77
77
|
event.stopPropagation();
|
|
78
78
|
|
|
79
79
|
if (params.id !== dragRowId) {
|
|
80
|
-
const targetRowIndex = apiRef.current.
|
|
80
|
+
const targetRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
81
81
|
apiRef.current.setRowIndex(dragRowId, targetRowIndex);
|
|
82
82
|
}
|
|
83
83
|
}, [apiRef, logger, dragRowId]);
|
|
@@ -105,7 +105,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
105
105
|
// Emit the rowOrderChange event only once when the reordering stops.
|
|
106
106
|
const rowOrderChangeParams = {
|
|
107
107
|
row: apiRef.current.getRow(dragRowId),
|
|
108
|
-
targetIndex: apiRef.current.
|
|
108
|
+
targetIndex: apiRef.current.getRowIndexRelativeToVisibleRows(params.id),
|
|
109
109
|
oldIndex: originRowIndex.current
|
|
110
110
|
};
|
|
111
111
|
apiRef.current.publishEvent('rowOrderChange', rowOrderChangeParams);
|
package/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export * from './components';
|
|
|
16
16
|
export * from './utils';
|
|
17
17
|
export type { DataGridProProps, GridExperimentalProFeatures } from './models/dataGridProProps';
|
|
18
18
|
export { useGridApiContext, useGridApiRef, useGridRootProps } from './typeOverloads/reexports';
|
|
19
|
-
export type {
|
|
19
|
+
export type { GridApi, GridInitialState, GridState } from './typeOverloads/reexports';
|
package/index.js
CHANGED
|
@@ -50,9 +50,8 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* GridApi that let you manipulate the grid.
|
|
53
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
54
53
|
*/
|
|
55
|
-
api: PropTypes.
|
|
54
|
+
api: PropTypes.object.isRequired,
|
|
56
55
|
|
|
57
56
|
/**
|
|
58
57
|
* The mode of the cell.
|
|
@@ -85,15 +84,6 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
85
84
|
*/
|
|
86
85
|
formattedValue: PropTypes.any,
|
|
87
86
|
|
|
88
|
-
/**
|
|
89
|
-
* Get the cell value of a row and field.
|
|
90
|
-
* @param {GridRowId} id The row id.
|
|
91
|
-
* @param {string} field The field.
|
|
92
|
-
* @returns {any} The cell value.
|
|
93
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
94
|
-
*/
|
|
95
|
-
getValue: PropTypes.func.isRequired,
|
|
96
|
-
|
|
97
87
|
/**
|
|
98
88
|
* If true, the cell is the active element.
|
|
99
89
|
*/
|
|
@@ -84,9 +84,8 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* GridApi that let you manipulate the grid.
|
|
87
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
88
87
|
*/
|
|
89
|
-
api: PropTypes.
|
|
88
|
+
api: PropTypes.object.isRequired,
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* The mode of the cell.
|
|
@@ -119,15 +118,6 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
119
118
|
*/
|
|
120
119
|
formattedValue: PropTypes.any,
|
|
121
120
|
|
|
122
|
-
/**
|
|
123
|
-
* Get the cell value of a row and field.
|
|
124
|
-
* @param {GridRowId} id The row id.
|
|
125
|
-
* @param {string} field The field.
|
|
126
|
-
* @returns {any} The cell value.
|
|
127
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
128
|
-
*/
|
|
129
|
-
getValue: PropTypes.func.isRequired,
|
|
130
|
-
|
|
131
121
|
/**
|
|
132
122
|
* If true, the cell is the active element.
|
|
133
123
|
*/
|
|
@@ -149,7 +149,7 @@ export var useGridColumnResize = function useGridColumnResize(apiRef, props) {
|
|
|
149
149
|
var handleResizeMouseUp = useEventCallback(function (nativeEvent) {
|
|
150
150
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
151
151
|
stopListening();
|
|
152
|
-
apiRef.current.
|
|
152
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
153
153
|
clearTimeout(stopResizeEventTimeout.current);
|
|
154
154
|
stopResizeEventTimeout.current = setTimeout(function () {
|
|
155
155
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -224,7 +224,7 @@ export var useGridColumnResize = function useGridColumnResize(apiRef, props) {
|
|
|
224
224
|
|
|
225
225
|
|
|
226
226
|
stopListening();
|
|
227
|
-
apiRef.current.
|
|
227
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
228
228
|
clearTimeout(stopResizeEventTimeout.current);
|
|
229
229
|
stopResizeEventTimeout.current = setTimeout(function () {
|
|
230
230
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -61,7 +61,7 @@ export var useGridRowReorder = function useGridRowReorder(apiRef, props) {
|
|
|
61
61
|
removeDnDStylesTimeout.current = setTimeout(function () {
|
|
62
62
|
dragRowNode.current.classList.remove(classes.rowDragging);
|
|
63
63
|
});
|
|
64
|
-
originRowIndex.current = apiRef.current.
|
|
64
|
+
originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
65
65
|
}, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
|
|
66
66
|
var handleDragOver = React.useCallback(function (params, event) {
|
|
67
67
|
if (dragRowId === '') {
|
|
@@ -81,7 +81,7 @@ export var useGridRowReorder = function useGridRowReorder(apiRef, props) {
|
|
|
81
81
|
event.stopPropagation();
|
|
82
82
|
|
|
83
83
|
if (params.id !== dragRowId) {
|
|
84
|
-
var targetRowIndex = apiRef.current.
|
|
84
|
+
var targetRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
85
85
|
apiRef.current.setRowIndex(dragRowId, targetRowIndex);
|
|
86
86
|
}
|
|
87
87
|
}, [apiRef, logger, dragRowId]);
|
|
@@ -109,7 +109,7 @@ export var useGridRowReorder = function useGridRowReorder(apiRef, props) {
|
|
|
109
109
|
// Emit the rowOrderChange event only once when the reordering stops.
|
|
110
110
|
var rowOrderChangeParams = {
|
|
111
111
|
row: apiRef.current.getRow(dragRowId),
|
|
112
|
-
targetIndex: apiRef.current.
|
|
112
|
+
targetIndex: apiRef.current.getRowIndexRelativeToVisibleRows(params.id),
|
|
113
113
|
oldIndex: originRowIndex.current
|
|
114
114
|
};
|
|
115
115
|
apiRef.current.publishEvent('rowOrderChange', rowOrderChangeParams);
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export var getReleaseInfo = function getReleaseInfo() {
|
|
3
|
-
var releaseInfo = "
|
|
3
|
+
var releaseInfo = "MTY2ODAyMDQwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -54,9 +54,8 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* GridApi that let you manipulate the grid.
|
|
57
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
58
57
|
*/
|
|
59
|
-
api: PropTypes.
|
|
58
|
+
api: PropTypes.object.isRequired,
|
|
60
59
|
|
|
61
60
|
/**
|
|
62
61
|
* The mode of the cell.
|
|
@@ -89,15 +88,6 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
89
88
|
*/
|
|
90
89
|
formattedValue: PropTypes.any,
|
|
91
90
|
|
|
92
|
-
/**
|
|
93
|
-
* Get the cell value of a row and field.
|
|
94
|
-
* @param {GridRowId} id The row id.
|
|
95
|
-
* @param {string} field The field.
|
|
96
|
-
* @returns {any} The cell value.
|
|
97
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
98
|
-
*/
|
|
99
|
-
getValue: PropTypes.func.isRequired,
|
|
100
|
-
|
|
101
91
|
/**
|
|
102
92
|
* If true, the cell is the active element.
|
|
103
93
|
*/
|
|
@@ -86,9 +86,8 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
86
86
|
|
|
87
87
|
/**
|
|
88
88
|
* GridApi that let you manipulate the grid.
|
|
89
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
90
89
|
*/
|
|
91
|
-
api: PropTypes.
|
|
90
|
+
api: PropTypes.object.isRequired,
|
|
92
91
|
|
|
93
92
|
/**
|
|
94
93
|
* The mode of the cell.
|
|
@@ -121,15 +120,6 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
121
120
|
*/
|
|
122
121
|
formattedValue: PropTypes.any,
|
|
123
122
|
|
|
124
|
-
/**
|
|
125
|
-
* Get the cell value of a row and field.
|
|
126
|
-
* @param {GridRowId} id The row id.
|
|
127
|
-
* @param {string} field The field.
|
|
128
|
-
* @returns {any} The cell value.
|
|
129
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
130
|
-
*/
|
|
131
|
-
getValue: PropTypes.func.isRequired,
|
|
132
|
-
|
|
133
123
|
/**
|
|
134
124
|
* If true, the cell is the active element.
|
|
135
125
|
*/
|
|
@@ -146,7 +146,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
146
146
|
const handleResizeMouseUp = useEventCallback(nativeEvent => {
|
|
147
147
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
148
148
|
stopListening();
|
|
149
|
-
apiRef.current.
|
|
149
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
150
150
|
clearTimeout(stopResizeEventTimeout.current);
|
|
151
151
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
152
152
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -217,7 +217,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
stopListening();
|
|
220
|
-
apiRef.current.
|
|
220
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
221
221
|
clearTimeout(stopResizeEventTimeout.current);
|
|
222
222
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
223
223
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -57,7 +57,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
57
57
|
removeDnDStylesTimeout.current = setTimeout(() => {
|
|
58
58
|
dragRowNode.current.classList.remove(classes.rowDragging);
|
|
59
59
|
});
|
|
60
|
-
originRowIndex.current = apiRef.current.
|
|
60
|
+
originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
61
61
|
}, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
|
|
62
62
|
const handleDragOver = React.useCallback((params, event) => {
|
|
63
63
|
if (dragRowId === '') {
|
|
@@ -77,7 +77,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
77
77
|
event.stopPropagation();
|
|
78
78
|
|
|
79
79
|
if (params.id !== dragRowId) {
|
|
80
|
-
const targetRowIndex = apiRef.current.
|
|
80
|
+
const targetRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
81
81
|
apiRef.current.setRowIndex(dragRowId, targetRowIndex);
|
|
82
82
|
}
|
|
83
83
|
}, [apiRef, logger, dragRowId]);
|
|
@@ -105,7 +105,7 @@ export const useGridRowReorder = (apiRef, props) => {
|
|
|
105
105
|
// Emit the rowOrderChange event only once when the reordering stops.
|
|
106
106
|
const rowOrderChangeParams = {
|
|
107
107
|
row: apiRef.current.getRow(dragRowId),
|
|
108
|
-
targetIndex: apiRef.current.
|
|
108
|
+
targetIndex: apiRef.current.getRowIndexRelativeToVisibleRows(params.id),
|
|
109
109
|
oldIndex: originRowIndex.current
|
|
110
110
|
};
|
|
111
111
|
apiRef.current.publishEvent('rowOrderChange', rowOrderChangeParams);
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|
|
@@ -75,9 +75,8 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* GridApi that let you manipulate the grid.
|
|
78
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
79
78
|
*/
|
|
80
|
-
api: _propTypes.default.
|
|
79
|
+
api: _propTypes.default.object.isRequired,
|
|
81
80
|
|
|
82
81
|
/**
|
|
83
82
|
* The mode of the cell.
|
|
@@ -110,15 +109,6 @@ process.env.NODE_ENV !== "production" ? GridDetailPanelToggleCell.propTypes = {
|
|
|
110
109
|
*/
|
|
111
110
|
formattedValue: _propTypes.default.any,
|
|
112
111
|
|
|
113
|
-
/**
|
|
114
|
-
* Get the cell value of a row and field.
|
|
115
|
-
* @param {GridRowId} id The row id.
|
|
116
|
-
* @param {string} field The field.
|
|
117
|
-
* @returns {any} The cell value.
|
|
118
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
119
|
-
*/
|
|
120
|
-
getValue: _propTypes.default.func.isRequired,
|
|
121
|
-
|
|
122
112
|
/**
|
|
123
113
|
* If true, the cell is the active element.
|
|
124
114
|
*/
|
|
@@ -109,9 +109,8 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* GridApi that let you manipulate the grid.
|
|
112
|
-
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
113
112
|
*/
|
|
114
|
-
api: _propTypes.default.
|
|
113
|
+
api: _propTypes.default.object.isRequired,
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* The mode of the cell.
|
|
@@ -144,15 +143,6 @@ process.env.NODE_ENV !== "production" ? GridTreeDataGroupingCell.propTypes = {
|
|
|
144
143
|
*/
|
|
145
144
|
formattedValue: _propTypes.default.any,
|
|
146
145
|
|
|
147
|
-
/**
|
|
148
|
-
* Get the cell value of a row and field.
|
|
149
|
-
* @param {GridRowId} id The row id.
|
|
150
|
-
* @param {string} field The field.
|
|
151
|
-
* @returns {any} The cell value.
|
|
152
|
-
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
153
|
-
*/
|
|
154
|
-
getValue: _propTypes.default.func.isRequired,
|
|
155
|
-
|
|
156
146
|
/**
|
|
157
147
|
* If true, the cell is the active element.
|
|
158
148
|
*/
|
|
@@ -169,7 +169,7 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
169
169
|
const handleResizeMouseUp = (0, _utils.useEventCallback)(nativeEvent => {
|
|
170
170
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
171
171
|
stopListening();
|
|
172
|
-
apiRef.current.
|
|
172
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
173
173
|
clearTimeout(stopResizeEventTimeout.current);
|
|
174
174
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
175
175
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -244,7 +244,7 @@ const useGridColumnResize = (apiRef, props) => {
|
|
|
244
244
|
|
|
245
245
|
|
|
246
246
|
stopListening();
|
|
247
|
-
apiRef.current.
|
|
247
|
+
apiRef.current.updateColumns([colDefRef.current]);
|
|
248
248
|
clearTimeout(stopResizeEventTimeout.current);
|
|
249
249
|
stopResizeEventTimeout.current = setTimeout(() => {
|
|
250
250
|
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
@@ -70,7 +70,7 @@ const useGridRowReorder = (apiRef, props) => {
|
|
|
70
70
|
removeDnDStylesTimeout.current = setTimeout(() => {
|
|
71
71
|
dragRowNode.current.classList.remove(classes.rowDragging);
|
|
72
72
|
});
|
|
73
|
-
originRowIndex.current = apiRef.current.
|
|
73
|
+
originRowIndex.current = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
74
74
|
}, [isRowReorderDisabled, classes.rowDragging, logger, apiRef]);
|
|
75
75
|
const handleDragOver = React.useCallback((params, event) => {
|
|
76
76
|
if (dragRowId === '') {
|
|
@@ -90,7 +90,7 @@ const useGridRowReorder = (apiRef, props) => {
|
|
|
90
90
|
event.stopPropagation();
|
|
91
91
|
|
|
92
92
|
if (params.id !== dragRowId) {
|
|
93
|
-
const targetRowIndex = apiRef.current.
|
|
93
|
+
const targetRowIndex = apiRef.current.getRowIndexRelativeToVisibleRows(params.id);
|
|
94
94
|
apiRef.current.setRowIndex(dragRowId, targetRowIndex);
|
|
95
95
|
}
|
|
96
96
|
}, [apiRef, logger, dragRowId]);
|
|
@@ -118,7 +118,7 @@ const useGridRowReorder = (apiRef, props) => {
|
|
|
118
118
|
// Emit the rowOrderChange event only once when the reordering stops.
|
|
119
119
|
const rowOrderChangeParams = {
|
|
120
120
|
row: apiRef.current.getRow(dragRowId),
|
|
121
|
-
targetIndex: apiRef.current.
|
|
121
|
+
targetIndex: apiRef.current.getRowIndexRelativeToVisibleRows(params.id),
|
|
122
122
|
oldIndex: originRowIndex.current
|
|
123
123
|
};
|
|
124
124
|
apiRef.current.publishEvent('rowOrderChange', rowOrderChangeParams);
|
package/node/index.js
CHANGED
|
@@ -8,7 +8,7 @@ exports.getReleaseInfo = void 0;
|
|
|
8
8
|
var _utils = require("@mui/utils");
|
|
9
9
|
|
|
10
10
|
const getReleaseInfo = () => {
|
|
11
|
-
const releaseInfo = "
|
|
11
|
+
const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
|
|
12
12
|
|
|
13
13
|
if (process.env.NODE_ENV !== 'production') {
|
|
14
14
|
// A simple hack to set the value in the test environment (has no build step).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.7",
|
|
4
4
|
"description": "The Pro plan edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.19.0",
|
|
35
35
|
"@mui/utils": "^5.10.9",
|
|
36
|
-
"@mui/x-data-grid": "6.0.0-alpha.
|
|
36
|
+
"@mui/x-data-grid": "6.0.0-alpha.7",
|
|
37
37
|
"@mui/x-license-pro": "6.0.0-alpha.5",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
|
-
"reselect": "^4.1.
|
|
41
|
+
"reselect": "^4.1.7"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@mui/material": "^5.4.1",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import type { GridApiPro } from '../models/gridApiPro';
|
|
3
2
|
import type { GridInitialStatePro, GridStatePro } from '../models/gridStatePro';
|
|
4
3
|
export { useGridApiContext } from '../hooks/utils/useGridApiContext';
|
|
@@ -8,10 +7,6 @@ export { useGridRootProps } from '../hooks/utils/useGridRootProps';
|
|
|
8
7
|
* The full grid API.
|
|
9
8
|
*/
|
|
10
9
|
export declare type GridApi = GridApiPro;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use `React.MutableRefObject<GridApi>` instead
|
|
13
|
-
*/
|
|
14
|
-
export declare type GridApiRef = React.MutableRefObject<GridApiPro>;
|
|
15
10
|
/**
|
|
16
11
|
* The state of `DataGridPro`.
|
|
17
12
|
*/
|
package/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTY2ODAyMDQwMDAwMA==";
|
|
4
4
|
|
|
5
5
|
if (process.env.NODE_ENV !== 'production') {
|
|
6
6
|
// A simple hack to set the value in the test environment (has no build step).
|