@mui/x-data-grid 7.0.0-alpha.2 → 7.0.0-alpha.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 +364 -0
- package/DataGrid/DataGrid.d.ts +0 -10
- package/DataGrid/DataGrid.js +11 -23
- package/DataGrid/useDataGridProps.js +1 -1
- package/README.md +0 -1
- package/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/colDef/gridDefaultColumnTypes.d.ts +2 -2
- package/colDef/gridDefaultColumnTypes.js +2 -2
- package/components/GridHeader.js +3 -2
- package/components/GridRow.js +9 -6
- package/components/base/GridOverlays.js +0 -2
- package/components/cell/GridActionsCell.js +0 -1
- package/components/cell/GridCell.js +3 -5
- package/components/cell/GridEditDateCell.js +1 -20
- package/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/components/panel/index.d.ts +0 -1
- package/components/panel/index.js +0 -1
- package/components/virtualization/GridVirtualScroller.js +0 -1
- package/constants/defaultGridSlotsComponents.js +1 -2
- package/hooks/features/clipboard/useGridClipboard.d.ts +1 -1
- package/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/hooks/features/editing/useGridCellEditing.js +8 -23
- package/hooks/features/editing/useGridRowEditing.js +7 -22
- package/hooks/features/export/useGridCsvExport.d.ts +1 -1
- package/hooks/features/export/useGridCsvExport.js +1 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +1 -0
- package/hooks/features/filter/gridFilterUtils.js +7 -4
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/focus/gridFocusStateSelector.d.ts +2 -2
- package/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +3 -3
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -6
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/hooks/features/sorting/useGridSorting.js +6 -5
- package/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -2
- package/internals/index.js +2 -2
- package/legacy/DataGrid/DataGrid.js +11 -23
- package/legacy/DataGrid/useDataGridProps.js +1 -1
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/legacy/colDef/gridDefaultColumnTypes.js +2 -2
- package/legacy/components/GridHeader.js +3 -2
- package/legacy/components/GridRow.js +9 -6
- package/legacy/components/base/GridOverlays.js +0 -2
- package/legacy/components/cell/GridActionsCell.js +0 -1
- package/legacy/components/cell/GridCell.js +3 -5
- package/legacy/components/cell/GridEditDateCell.js +1 -20
- package/legacy/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/legacy/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/legacy/components/panel/index.js +0 -1
- package/legacy/components/virtualization/GridVirtualScroller.js +0 -1
- package/legacy/constants/defaultGridSlotsComponents.js +1 -2
- package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/legacy/hooks/features/editing/useGridCellEditing.js +8 -23
- package/legacy/hooks/features/editing/useGridRowEditing.js +7 -24
- package/legacy/hooks/features/export/useGridCsvExport.js +1 -1
- package/legacy/hooks/features/filter/gridFilterUtils.js +7 -4
- package/legacy/hooks/features/filter/useGridFilter.js +2 -2
- package/legacy/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/legacy/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -6
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/legacy/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/legacy/hooks/features/sorting/useGridSorting.js +6 -5
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +2 -2
- package/legacy/locales/bgBG.js +33 -37
- package/legacy/locales/coreLocales.js +1 -0
- package/legacy/locales/daDK.js +37 -39
- package/legacy/locales/plPL.js +0 -1
- package/legacy/models/params/gridEditCellParams.js +1 -0
- package/legacy/utils/domUtils.js +10 -1
- package/legacy/utils/utils.js +0 -1
- package/locales/bgBG.js +33 -37
- package/locales/coreLocales.js +1 -0
- package/locales/daDK.js +37 -39
- package/locales/plPL.js +0 -1
- package/models/api/gridEditingApi.d.ts +2 -4
- package/models/api/gridSortApi.d.ts +2 -2
- package/models/colDef/gridColType.d.ts +2 -4
- package/models/gridFilterModel.d.ts +2 -2
- package/models/gridSlotsComponent.d.ts +0 -5
- package/models/gridSlotsComponentsProps.d.ts +0 -3
- package/models/params/gridEditCellParams.d.ts +3 -1
- package/models/params/gridEditCellParams.js +1 -0
- package/models/params/gridRowParams.d.ts +1 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +11 -23
- package/modern/DataGrid/useDataGridProps.js +1 -1
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/modern/colDef/gridDefaultColumnTypes.js +2 -2
- package/modern/components/GridHeader.js +2 -1
- package/modern/components/GridRow.js +9 -6
- package/modern/components/base/GridOverlays.js +0 -2
- package/modern/components/cell/GridActionsCell.js +0 -1
- package/modern/components/cell/GridCell.js +2 -4
- package/modern/components/cell/GridEditDateCell.js +1 -20
- package/modern/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/modern/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/modern/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/modern/components/panel/index.js +0 -1
- package/modern/components/virtualization/GridVirtualScroller.js +0 -1
- package/modern/constants/defaultGridSlotsComponents.js +1 -2
- package/modern/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/modern/hooks/features/editing/useGridCellEditing.js +8 -23
- package/modern/hooks/features/editing/useGridRowEditing.js +7 -22
- package/modern/hooks/features/export/useGridCsvExport.js +1 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +4 -2
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/focus/gridFocusStateSelector.js +2 -6
- package/modern/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +3 -4
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +9 -6
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/modern/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/modern/hooks/features/sorting/useGridSorting.js +6 -5
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +2 -2
- package/modern/locales/bgBG.js +33 -37
- package/modern/locales/coreLocales.js +1 -0
- package/modern/locales/daDK.js +37 -39
- package/modern/locales/plPL.js +0 -1
- package/modern/models/params/gridEditCellParams.js +1 -0
- package/modern/utils/domUtils.js +10 -1
- package/modern/utils/utils.js +0 -1
- package/node/DataGrid/DataGrid.js +11 -23
- package/node/DataGrid/useDataGridProps.js +1 -1
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -1
- package/node/colDef/gridDefaultColumnTypes.js +2 -2
- package/node/components/GridHeader.js +2 -1
- package/node/components/GridRow.js +8 -5
- package/node/components/base/GridOverlays.js +0 -2
- package/node/components/cell/GridActionsCell.js +0 -1
- package/node/components/cell/GridCell.js +2 -4
- package/node/components/cell/GridEditDateCell.js +1 -20
- package/node/components/columnHeaders/GridColumnGroupHeader.js +2 -1
- package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -1
- package/node/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +1 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -1
- package/node/components/panel/index.js +0 -11
- package/node/components/virtualization/GridVirtualScroller.js +0 -1
- package/node/constants/defaultGridSlotsComponents.js +0 -1
- package/node/hooks/features/clipboard/useGridClipboard.js +1 -1
- package/node/hooks/features/editing/useGridCellEditing.js +7 -22
- package/node/hooks/features/editing/useGridRowEditing.js +6 -21
- package/node/hooks/features/export/useGridCsvExport.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +6 -3
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/focus/gridFocusStateSelector.js +3 -7
- package/node/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +5 -7
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +8 -5
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -1
- package/node/hooks/features/rows/useGridRowsMeta.js +0 -1
- package/node/hooks/features/sorting/useGridSorting.js +6 -5
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +0 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +21 -14
- package/node/locales/bgBG.js +33 -37
- package/node/locales/daDK.js +37 -39
- package/node/locales/plPL.js +0 -1
- package/node/models/params/gridEditCellParams.js +1 -0
- package/node/utils/domUtils.js +11 -1
- package/node/utils/utils.js +0 -1
- package/package.json +4 -4
- package/utils/domUtils.d.ts +2 -0
- package/utils/domUtils.js +10 -1
- package/utils/utils.js +0 -1
package/node/locales/bgBG.js
CHANGED
|
@@ -66,34 +66,32 @@ const bgBGGrid = {
|
|
|
66
66
|
filterOperatorIsEmpty: 'е празен',
|
|
67
67
|
filterOperatorIsNotEmpty: 'не е празен',
|
|
68
68
|
filterOperatorIsAnyOf: 'е някой от',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: 'Съдържа',
|
|
77
|
+
headerFilterOperatorEquals: 'Равнo',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Започва с',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Завършва с',
|
|
80
|
+
headerFilterOperatorIs: 'Равно е на',
|
|
81
|
+
headerFilterOperatorNot: 'Не се равнява на',
|
|
82
|
+
headerFilterOperatorAfter: 'След',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'След (включително)',
|
|
84
|
+
headerFilterOperatorBefore: 'Преди',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'Преди (включително)',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Празен',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'Не е празен',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Всичко от',
|
|
89
|
+
'headerFilterOperator=': 'Равно',
|
|
90
|
+
'headerFilterOperator!=': 'Различно',
|
|
91
|
+
'headerFilterOperator>': 'По-голямо от',
|
|
92
|
+
'headerFilterOperator>=': 'По-голямо или равно на',
|
|
93
|
+
'headerFilterOperator<': 'По-малко от',
|
|
94
|
+
'headerFilterOperator<=': 'По-малко или равно на',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: 'всякакви',
|
|
99
97
|
filterValueTrue: 'вярно',
|
|
@@ -141,19 +139,17 @@ const bgBGGrid = {
|
|
|
141
139
|
groupColumn: name => `Групирай по ${name}`,
|
|
142
140
|
unGroupColumn: name => `Спри групиране по ${name}`,
|
|
143
141
|
// Master/detail
|
|
144
|
-
|
|
142
|
+
detailPanelToggle: 'Превключване на панела с детайли',
|
|
145
143
|
expandDetailPanel: 'Разгъване',
|
|
146
144
|
collapseDetailPanel: 'Свиване',
|
|
147
145
|
// Row reordering text
|
|
148
|
-
rowReorderingHeaderName: 'Подредба на редове'
|
|
149
|
-
|
|
146
|
+
rowReorderingHeaderName: 'Подредба на редове',
|
|
150
147
|
// Aggregation
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
148
|
+
aggregationMenuItemHeader: 'Агрегиране',
|
|
149
|
+
aggregationFunctionLabelSum: 'сума',
|
|
150
|
+
aggregationFunctionLabelAvg: 'срст',
|
|
151
|
+
aggregationFunctionLabelMin: 'мин',
|
|
152
|
+
aggregationFunctionLabelMax: 'макс',
|
|
153
|
+
aggregationFunctionLabelSize: 'размер'
|
|
157
154
|
};
|
|
158
|
-
|
|
159
155
|
const bgBG = exports.bgBG = (0, _getGridLocalization.getGridLocalization)(bgBGGrid, _locale.bgBG);
|
package/node/locales/daDK.js
CHANGED
|
@@ -53,47 +53,45 @@ const daDKGrid = {
|
|
|
53
53
|
filterPanelInputLabel: 'Værdi',
|
|
54
54
|
filterPanelInputPlaceholder: 'Filter værdi',
|
|
55
55
|
// Filter operators text
|
|
56
|
-
filterOperatorContains: '
|
|
57
|
-
filterOperatorEquals: '
|
|
58
|
-
filterOperatorStartsWith: '
|
|
59
|
-
filterOperatorEndsWith: '
|
|
60
|
-
filterOperatorIs: '
|
|
61
|
-
filterOperatorNot: '
|
|
62
|
-
filterOperatorAfter: '
|
|
63
|
-
filterOperatorOnOrAfter: '
|
|
64
|
-
filterOperatorBefore: '
|
|
65
|
-
filterOperatorOnOrBefore: '
|
|
66
|
-
filterOperatorIsEmpty: '
|
|
67
|
-
filterOperatorIsNotEmpty: '
|
|
56
|
+
filterOperatorContains: 'indeholder',
|
|
57
|
+
filterOperatorEquals: 'lig med',
|
|
58
|
+
filterOperatorStartsWith: 'begynder med',
|
|
59
|
+
filterOperatorEndsWith: 'ender med',
|
|
60
|
+
filterOperatorIs: 'er lig med',
|
|
61
|
+
filterOperatorNot: 'er ikke lig med',
|
|
62
|
+
filterOperatorAfter: 'efter',
|
|
63
|
+
filterOperatorOnOrAfter: 'på eller efter',
|
|
64
|
+
filterOperatorBefore: 'før',
|
|
65
|
+
filterOperatorOnOrBefore: 'på eller før',
|
|
66
|
+
filterOperatorIsEmpty: 'indeholder ikke data',
|
|
67
|
+
filterOperatorIsNotEmpty: 'indeholder data',
|
|
68
68
|
filterOperatorIsAnyOf: 'indeholder en af',
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
'filterOperator=': '=',
|
|
70
|
+
'filterOperator!=': '!=',
|
|
71
|
+
'filterOperator>': '>',
|
|
72
|
+
'filterOperator>=': '>=',
|
|
73
|
+
'filterOperator<': '<',
|
|
74
|
+
'filterOperator<=': '<=',
|
|
76
75
|
// Header filter operators text
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
headerFilterOperatorContains: 'Indeholder',
|
|
77
|
+
headerFilterOperatorEquals: 'Lig med',
|
|
78
|
+
headerFilterOperatorStartsWith: 'Begynder med',
|
|
79
|
+
headerFilterOperatorEndsWith: 'Ender med',
|
|
80
|
+
headerFilterOperatorIs: 'Er lig med',
|
|
81
|
+
headerFilterOperatorNot: 'Er ikke lig med',
|
|
82
|
+
headerFilterOperatorAfter: 'Efter',
|
|
83
|
+
headerFilterOperatorOnOrAfter: 'På eller efter',
|
|
84
|
+
headerFilterOperatorBefore: 'Før',
|
|
85
|
+
headerFilterOperatorOnOrBefore: 'På eller før',
|
|
86
|
+
headerFilterOperatorIsEmpty: 'Indeholder ikke data',
|
|
87
|
+
headerFilterOperatorIsNotEmpty: 'Indeholder data',
|
|
88
|
+
headerFilterOperatorIsAnyOf: 'Indeholder en af',
|
|
89
|
+
'headerFilterOperator=': 'Lig med',
|
|
90
|
+
'headerFilterOperator!=': 'Ikke lig med',
|
|
91
|
+
'headerFilterOperator>': 'Større end',
|
|
92
|
+
'headerFilterOperator>=': 'Større end eller lig med',
|
|
93
|
+
'headerFilterOperator<': 'Mindre end',
|
|
94
|
+
'headerFilterOperator<=': 'Mindre end eller lig med',
|
|
97
95
|
// Filter values text
|
|
98
96
|
filterValueAny: 'hvilken som helst',
|
|
99
97
|
filterValueTrue: 'positiv',
|
package/node/locales/plPL.js
CHANGED
|
@@ -12,6 +12,7 @@ var GridCellEditStartReasons = exports.GridCellEditStartReasons = /*#__PURE__*/f
|
|
|
12
12
|
GridCellEditStartReasons["cellDoubleClick"] = "cellDoubleClick";
|
|
13
13
|
GridCellEditStartReasons["printableKeyDown"] = "printableKeyDown";
|
|
14
14
|
GridCellEditStartReasons["deleteKeyDown"] = "deleteKeyDown";
|
|
15
|
+
GridCellEditStartReasons["pasteKeyDown"] = "pasteKeyDown";
|
|
15
16
|
return GridCellEditStartReasons;
|
|
16
17
|
}(GridCellEditStartReasons || {});
|
|
17
18
|
/**
|
package/node/utils/domUtils.js
CHANGED
|
@@ -8,6 +8,7 @@ exports.getActiveElement = void 0;
|
|
|
8
8
|
exports.getGridCellElement = getGridCellElement;
|
|
9
9
|
exports.getGridColumnHeaderElement = getGridColumnHeaderElement;
|
|
10
10
|
exports.getGridRowElement = getGridRowElement;
|
|
11
|
+
exports.isEventTargetInPortal = isEventTargetInPortal;
|
|
11
12
|
exports.isOverflown = isOverflown;
|
|
12
13
|
var _gridClasses = require("../constants/gridClasses");
|
|
13
14
|
function isOverflown(element) {
|
|
@@ -49,4 +50,13 @@ const getActiveElement = (root = document) => {
|
|
|
49
50
|
}
|
|
50
51
|
return activeEl;
|
|
51
52
|
};
|
|
52
|
-
exports.getActiveElement = getActiveElement;
|
|
53
|
+
exports.getActiveElement = getActiveElement;
|
|
54
|
+
function isEventTargetInPortal(event) {
|
|
55
|
+
if (
|
|
56
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
57
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
58
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}
|
package/node/utils/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.4",
|
|
4
4
|
"description": "The community edition of the data grid component (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -36,15 +36,15 @@
|
|
|
36
36
|
"directory": "packages/grid/x-data-grid"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@babel/runtime": "^7.23.
|
|
40
|
-
"@mui/
|
|
39
|
+
"@babel/runtime": "^7.23.5",
|
|
40
|
+
"@mui/system": "^5.14.20",
|
|
41
|
+
"@mui/utils": "^5.14.20",
|
|
41
42
|
"clsx": "^2.0.0",
|
|
42
43
|
"prop-types": "^15.8.1",
|
|
43
44
|
"reselect": "^4.1.8"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"@mui/material": "^5.4.1",
|
|
47
|
-
"@mui/system": "^5.4.1",
|
|
48
48
|
"react": "^17.0.0 || ^18.0.0",
|
|
49
49
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
50
50
|
},
|
package/utils/domUtils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { GridRowId } from '../models/gridRows';
|
|
2
3
|
export declare function isOverflown(element: Element): boolean;
|
|
3
4
|
export declare function findParentElementFromClassName(elem: Element, className: string): Element | null;
|
|
@@ -8,3 +9,4 @@ export declare function getGridCellElement(root: Element, { id, field }: {
|
|
|
8
9
|
field: string;
|
|
9
10
|
}): HTMLDivElement | null;
|
|
10
11
|
export declare const getActiveElement: (root?: Document | ShadowRoot) => Element | null;
|
|
12
|
+
export declare function isEventTargetInPortal(event: React.SyntheticEvent): boolean;
|
package/utils/domUtils.js
CHANGED
|
@@ -37,4 +37,13 @@ export const getActiveElement = (root = document) => {
|
|
|
37
37
|
return getActiveElement(activeEl.shadowRoot);
|
|
38
38
|
}
|
|
39
39
|
return activeEl;
|
|
40
|
-
};
|
|
40
|
+
};
|
|
41
|
+
export function isEventTargetInPortal(event) {
|
|
42
|
+
if (
|
|
43
|
+
// The target is not an element when triggered by a Select inside the cell
|
|
44
|
+
// See https://github.com/mui/material-ui/issues/10534
|
|
45
|
+
event.target.nodeType === 1 && !event.currentTarget.contains(event.target)) {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
return false;
|
|
49
|
+
}
|