@mui/x-data-grid-pro 5.17.10 → 5.17.11
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 +29 -0
- package/DataGridPro/DataGridPro.js +7 -0
- package/DataGridPro/useDataGridProProps.js +1 -0
- package/hooks/features/columnReorder/useGridColumnReorder.d.ts +1 -1
- package/hooks/features/columnReorder/useGridColumnReorder.js +3 -3
- package/index.js +1 -1
- package/legacy/DataGridPro/DataGridPro.js +7 -0
- package/legacy/DataGridPro/useDataGridProProps.js +1 -0
- package/legacy/hooks/features/columnReorder/useGridColumnReorder.js +3 -3
- package/legacy/index.js +1 -1
- package/legacy/utils/releaseInfo.js +1 -1
- package/models/dataGridProProps.d.ts +6 -0
- package/modern/DataGridPro/DataGridPro.js +7 -0
- package/modern/DataGridPro/useDataGridProProps.js +1 -0
- package/modern/hooks/features/columnReorder/useGridColumnReorder.js +3 -3
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/node/DataGridPro/DataGridPro.js +7 -0
- package/node/DataGridPro/useDataGridProProps.js +1 -0
- package/node/hooks/features/columnReorder/useGridColumnReorder.js +3 -3
- package/node/index.js +1 -1
- package/node/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
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
|
+
## 5.17.11
|
|
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
|
+
- 🐞 Bugfixes
|
|
13
|
+
|
|
14
|
+
### `@mui/x-data-grid@v5.17.11` / `@mui/x-data-grid-pro@v5.17.11` / `@mui/x-data-grid-premium@v5.17.11`
|
|
15
|
+
|
|
16
|
+
#### Changes
|
|
17
|
+
|
|
18
|
+
- [DataGrid] Fix for cell focus preventing scroll when virtualization enabled (#6622) @yaredtsy
|
|
19
|
+
- [DataGridPro] Opt-out for column jump back on re-order (#6697) @gavbrennan
|
|
20
|
+
|
|
21
|
+
### `@mui/x-date-pickers@v5.0.8` / `@mui/x-date-pickers-pro@v5.0.8`
|
|
22
|
+
|
|
23
|
+
#### Changes
|
|
24
|
+
|
|
25
|
+
- [pickers] Fix pickers toolbar styling (#6793) @LukasTy
|
|
26
|
+
|
|
27
|
+
### Docs
|
|
28
|
+
|
|
29
|
+
- [docs] Fix link to localization page (#6766) @alexfauquette
|
|
30
|
+
|
|
31
|
+
### Core
|
|
32
|
+
|
|
33
|
+
- [license] Add new license status 'Out of scope' (#6774) @oliviertassinari
|
|
34
|
+
|
|
6
35
|
## 5.17.10
|
|
7
36
|
|
|
8
37
|
_Nov 4, 2022_
|
|
@@ -449,6 +449,13 @@ DataGridProRaw.propTypes = {
|
|
|
449
449
|
*/
|
|
450
450
|
isRowSelectable: PropTypes.func,
|
|
451
451
|
|
|
452
|
+
/**
|
|
453
|
+
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
454
|
+
* in a column re-order action will not cause the column to jump back to its original position.
|
|
455
|
+
* @default false
|
|
456
|
+
*/
|
|
457
|
+
keepColumnPositionIfDraggedOutside: PropTypes.bool,
|
|
458
|
+
|
|
452
459
|
/**
|
|
453
460
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
454
461
|
* Useful when using server side pagination and row selections need to be retained
|
|
@@ -11,6 +11,7 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
|
|
|
11
11
|
treeData: false,
|
|
12
12
|
defaultGroupingExpansionDepth: 0,
|
|
13
13
|
disableColumnPinning: false,
|
|
14
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
14
15
|
disableChildrenFiltering: false,
|
|
15
16
|
disableChildrenSorting: false,
|
|
16
17
|
rowReordering: false,
|
|
@@ -6,4 +6,4 @@ export declare const columnReorderStateInitializer: GridStateInitializer;
|
|
|
6
6
|
/**
|
|
7
7
|
* @requires useGridColumns (method)
|
|
8
8
|
*/
|
|
9
|
-
export declare const useGridColumnReorder: (apiRef: React.MutableRefObject<GridApiPro>, props: Pick<DataGridProProcessedProps, 'disableColumnReorder' | 'classes'>) => void;
|
|
9
|
+
export declare const useGridColumnReorder: (apiRef: React.MutableRefObject<GridApiPro>, props: Pick<DataGridProProcessedProps, 'disableColumnReorder' | 'keepColumnPositionIfDraggedOutside' | 'classes'>) => void;
|
|
@@ -234,19 +234,19 @@ export const useGridColumnReorder = (apiRef, props) => {
|
|
|
234
234
|
clearTimeout(removeDnDStylesTimeout.current);
|
|
235
235
|
dragColNode.current = null; // Check if the column was dropped outside the grid.
|
|
236
236
|
|
|
237
|
-
if (event.dataTransfer.dropEffect === 'none') {
|
|
237
|
+
if (event.dataTransfer.dropEffect === 'none' && !props.keepColumnPositionIfDraggedOutside) {
|
|
238
238
|
// Accessing params.field may contain the wrong field as header elements are reused
|
|
239
239
|
apiRef.current.setColumnIndex(dragColField, originColumnIndex.current);
|
|
240
|
-
originColumnIndex.current = null;
|
|
241
240
|
}
|
|
242
241
|
|
|
242
|
+
originColumnIndex.current = null;
|
|
243
243
|
apiRef.current.setState(state => _extends({}, state, {
|
|
244
244
|
columnReorder: _extends({}, state.columnReorder, {
|
|
245
245
|
dragCol: ''
|
|
246
246
|
})
|
|
247
247
|
}));
|
|
248
248
|
apiRef.current.forceUpdate();
|
|
249
|
-
}, [props.disableColumnReorder, logger, apiRef]);
|
|
249
|
+
}, [props.disableColumnReorder, props.keepColumnPositionIfDraggedOutside, logger, apiRef]);
|
|
250
250
|
useGridApiEventHandler(apiRef, 'columnHeaderDragStart', handleDragStart);
|
|
251
251
|
useGridApiEventHandler(apiRef, 'columnHeaderDragEnter', handleDragEnter);
|
|
252
252
|
useGridApiEventHandler(apiRef, 'columnHeaderDragOver', handleDragOver);
|
package/index.js
CHANGED
|
@@ -449,6 +449,13 @@ DataGridProRaw.propTypes = {
|
|
|
449
449
|
*/
|
|
450
450
|
isRowSelectable: PropTypes.func,
|
|
451
451
|
|
|
452
|
+
/**
|
|
453
|
+
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
454
|
+
* in a column re-order action will not cause the column to jump back to its original position.
|
|
455
|
+
* @default false
|
|
456
|
+
*/
|
|
457
|
+
keepColumnPositionIfDraggedOutside: PropTypes.bool,
|
|
458
|
+
|
|
452
459
|
/**
|
|
453
460
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
454
461
|
* Useful when using server side pagination and row selections need to be retained
|
|
@@ -12,6 +12,7 @@ export var DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_DEF
|
|
|
12
12
|
treeData: false,
|
|
13
13
|
defaultGroupingExpansionDepth: 0,
|
|
14
14
|
disableColumnPinning: false,
|
|
15
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
15
16
|
disableChildrenFiltering: false,
|
|
16
17
|
disableChildrenSorting: false,
|
|
17
18
|
rowReordering: false,
|
|
@@ -242,12 +242,12 @@ export var useGridColumnReorder = function useGridColumnReorder(apiRef, props) {
|
|
|
242
242
|
clearTimeout(removeDnDStylesTimeout.current);
|
|
243
243
|
dragColNode.current = null; // Check if the column was dropped outside the grid.
|
|
244
244
|
|
|
245
|
-
if (event.dataTransfer.dropEffect === 'none') {
|
|
245
|
+
if (event.dataTransfer.dropEffect === 'none' && !props.keepColumnPositionIfDraggedOutside) {
|
|
246
246
|
// Accessing params.field may contain the wrong field as header elements are reused
|
|
247
247
|
apiRef.current.setColumnIndex(dragColField, originColumnIndex.current);
|
|
248
|
-
originColumnIndex.current = null;
|
|
249
248
|
}
|
|
250
249
|
|
|
250
|
+
originColumnIndex.current = null;
|
|
251
251
|
apiRef.current.setState(function (state) {
|
|
252
252
|
return _extends({}, state, {
|
|
253
253
|
columnReorder: _extends({}, state.columnReorder, {
|
|
@@ -256,7 +256,7 @@ export var useGridColumnReorder = function useGridColumnReorder(apiRef, props) {
|
|
|
256
256
|
});
|
|
257
257
|
});
|
|
258
258
|
apiRef.current.forceUpdate();
|
|
259
|
-
}, [props.disableColumnReorder, logger, apiRef]);
|
|
259
|
+
}, [props.disableColumnReorder, props.keepColumnPositionIfDraggedOutside, logger, apiRef]);
|
|
260
260
|
useGridApiEventHandler(apiRef, 'columnHeaderDragStart', handleDragStart);
|
|
261
261
|
useGridApiEventHandler(apiRef, 'columnHeaderDragEnter', handleDragEnter);
|
|
262
262
|
useGridApiEventHandler(apiRef, 'columnHeaderDragOver', handleDragOver);
|
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).
|
|
@@ -90,6 +90,12 @@ export interface DataGridProPropsWithDefaultValue extends DataGridPropsWithDefau
|
|
|
90
90
|
* * @default "client"
|
|
91
91
|
*/
|
|
92
92
|
rowsLoadingMode: GridFeatureMode;
|
|
93
|
+
/**
|
|
94
|
+
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
95
|
+
* in a column re-order action will not cause the column to jump back to its original position.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
keepColumnPositionIfDraggedOutside: boolean;
|
|
93
99
|
}
|
|
94
100
|
export interface DataGridProPropsWithoutDefaultValue<R extends GridValidRowModel = any> extends Omit<DataGridPropsWithoutDefaultValue<R>, 'initialState'> {
|
|
95
101
|
/**
|
|
@@ -449,6 +449,13 @@ DataGridProRaw.propTypes = {
|
|
|
449
449
|
*/
|
|
450
450
|
isRowSelectable: PropTypes.func,
|
|
451
451
|
|
|
452
|
+
/**
|
|
453
|
+
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
454
|
+
* in a column re-order action will not cause the column to jump back to its original position.
|
|
455
|
+
* @default false
|
|
456
|
+
*/
|
|
457
|
+
keepColumnPositionIfDraggedOutside: PropTypes.bool,
|
|
458
|
+
|
|
452
459
|
/**
|
|
453
460
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
454
461
|
* Useful when using server side pagination and row selections need to be retained
|
|
@@ -11,6 +11,7 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
|
|
|
11
11
|
treeData: false,
|
|
12
12
|
defaultGroupingExpansionDepth: 0,
|
|
13
13
|
disableColumnPinning: false,
|
|
14
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
14
15
|
disableChildrenFiltering: false,
|
|
15
16
|
disableChildrenSorting: false,
|
|
16
17
|
rowReordering: false,
|
|
@@ -222,19 +222,19 @@ export const useGridColumnReorder = (apiRef, props) => {
|
|
|
222
222
|
clearTimeout(removeDnDStylesTimeout.current);
|
|
223
223
|
dragColNode.current = null; // Check if the column was dropped outside the grid.
|
|
224
224
|
|
|
225
|
-
if (event.dataTransfer.dropEffect === 'none') {
|
|
225
|
+
if (event.dataTransfer.dropEffect === 'none' && !props.keepColumnPositionIfDraggedOutside) {
|
|
226
226
|
// Accessing params.field may contain the wrong field as header elements are reused
|
|
227
227
|
apiRef.current.setColumnIndex(dragColField, originColumnIndex.current);
|
|
228
|
-
originColumnIndex.current = null;
|
|
229
228
|
}
|
|
230
229
|
|
|
230
|
+
originColumnIndex.current = null;
|
|
231
231
|
apiRef.current.setState(state => _extends({}, state, {
|
|
232
232
|
columnReorder: _extends({}, state.columnReorder, {
|
|
233
233
|
dragCol: ''
|
|
234
234
|
})
|
|
235
235
|
}));
|
|
236
236
|
apiRef.current.forceUpdate();
|
|
237
|
-
}, [props.disableColumnReorder, logger, apiRef]);
|
|
237
|
+
}, [props.disableColumnReorder, props.keepColumnPositionIfDraggedOutside, logger, apiRef]);
|
|
238
238
|
useGridApiEventHandler(apiRef, 'columnHeaderDragStart', handleDragStart);
|
|
239
239
|
useGridApiEventHandler(apiRef, 'columnHeaderDragEnter', handleDragEnter);
|
|
240
240
|
useGridApiEventHandler(apiRef, 'columnHeaderDragOver', handleDragOver);
|
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).
|
|
@@ -473,6 +473,13 @@ DataGridProRaw.propTypes = {
|
|
|
473
473
|
*/
|
|
474
474
|
isRowSelectable: _propTypes.default.func,
|
|
475
475
|
|
|
476
|
+
/**
|
|
477
|
+
* If `true`, moving the mouse pointer outside the grid before releasing the mouse button
|
|
478
|
+
* in a column re-order action will not cause the column to jump back to its original position.
|
|
479
|
+
* @default false
|
|
480
|
+
*/
|
|
481
|
+
keepColumnPositionIfDraggedOutside: _propTypes.default.bool,
|
|
482
|
+
|
|
476
483
|
/**
|
|
477
484
|
* If `true`, the selection model will retain selected rows that do not exist.
|
|
478
485
|
* Useful when using server side pagination and row selections need to be retained
|
|
@@ -27,6 +27,7 @@ const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = (0, _extends2.default)({}, _xDataGrid
|
|
|
27
27
|
treeData: false,
|
|
28
28
|
defaultGroupingExpansionDepth: 0,
|
|
29
29
|
disableColumnPinning: false,
|
|
30
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
30
31
|
disableChildrenFiltering: false,
|
|
31
32
|
disableChildrenSorting: false,
|
|
32
33
|
rowReordering: false,
|
|
@@ -255,19 +255,19 @@ const useGridColumnReorder = (apiRef, props) => {
|
|
|
255
255
|
clearTimeout(removeDnDStylesTimeout.current);
|
|
256
256
|
dragColNode.current = null; // Check if the column was dropped outside the grid.
|
|
257
257
|
|
|
258
|
-
if (event.dataTransfer.dropEffect === 'none') {
|
|
258
|
+
if (event.dataTransfer.dropEffect === 'none' && !props.keepColumnPositionIfDraggedOutside) {
|
|
259
259
|
// Accessing params.field may contain the wrong field as header elements are reused
|
|
260
260
|
apiRef.current.setColumnIndex(dragColField, originColumnIndex.current);
|
|
261
|
-
originColumnIndex.current = null;
|
|
262
261
|
}
|
|
263
262
|
|
|
263
|
+
originColumnIndex.current = null;
|
|
264
264
|
apiRef.current.setState(state => (0, _extends2.default)({}, state, {
|
|
265
265
|
columnReorder: (0, _extends2.default)({}, state.columnReorder, {
|
|
266
266
|
dragCol: ''
|
|
267
267
|
})
|
|
268
268
|
}));
|
|
269
269
|
apiRef.current.forceUpdate();
|
|
270
|
-
}, [props.disableColumnReorder, logger, apiRef]);
|
|
270
|
+
}, [props.disableColumnReorder, props.keepColumnPositionIfDraggedOutside, logger, apiRef]);
|
|
271
271
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'columnHeaderDragStart', handleDragStart);
|
|
272
272
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'columnHeaderDragEnter', handleDragEnter);
|
|
273
273
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'columnHeaderDragOver', handleDragOver);
|
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": "5.17.
|
|
3
|
+
"version": "5.17.11",
|
|
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,8 +33,8 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.18.9",
|
|
35
35
|
"@mui/utils": "^5.10.3",
|
|
36
|
-
"@mui/x-data-grid": "5.17.
|
|
37
|
-
"@mui/x-license-pro": "5.17.
|
|
36
|
+
"@mui/x-data-grid": "5.17.11",
|
|
37
|
+
"@mui/x-license-pro": "5.17.11",
|
|
38
38
|
"@types/format-util": "^1.0.2",
|
|
39
39
|
"clsx": "^1.2.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
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).
|