@mui/x-data-grid 7.21.0 → 7.22.1
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 +142 -0
- package/components/GridRow.js +1 -1
- package/components/cell/GridBooleanCell.d.ts +3 -3
- package/components/cell/GridBooleanCell.js +13 -2
- package/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/components/containers/GridRootStyles.js +4 -2
- package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/components/toolbar/GridToolbar.js +2 -3
- package/components/toolbar/GridToolbarExport.js +1 -13
- package/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/components/virtualization/GridBottomContainer.js +0 -17
- package/components/virtualization/GridMainContainer.js +2 -1
- package/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/components/virtualization/GridVirtualScroller.js +2 -0
- package/constants/gridClasses.d.ts +5 -0
- package/constants/gridClasses.js +1 -1
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +4 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -2
- package/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/hooks/features/focus/useGridFocus.js +18 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -4
- package/hooks/features/listView/useGridListView.d.ts +1 -1
- package/hooks/features/listView/useGridListView.js +8 -2
- package/hooks/features/pagination/gridPaginationSelector.js +2 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/useGridRowSpanning.js +3 -1
- package/hooks/features/scroll/useGridScroll.js +3 -7
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -2
- package/index.js +1 -1
- package/internals/constants.d.ts +3 -0
- package/internals/constants.js +3 -0
- package/internals/index.d.ts +1 -0
- package/internals/index.js +2 -1
- package/internals/utils/gridRowGroupingUtils.d.ts +2 -0
- package/internals/utils/gridRowGroupingUtils.js +9 -0
- package/internals/utils/index.d.ts +1 -0
- package/internals/utils/index.js +2 -1
- package/joy/joySlots.js +45 -27
- package/locales/daDK.js +5 -6
- package/locales/itIT.js +27 -28
- package/locales/ptBR.js +4 -4
- package/material/index.js +4 -0
- package/models/gridExport.d.ts +1 -1
- package/models/gridSlotsComponent.d.ts +10 -0
- package/models/gridSlotsComponentsProps.d.ts +9 -0
- package/modern/components/GridRow.js +1 -1
- package/modern/components/cell/GridBooleanCell.js +13 -2
- package/modern/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/modern/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/modern/components/containers/GridRootStyles.js +4 -2
- package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/modern/components/toolbar/GridToolbar.js +2 -3
- package/modern/components/toolbar/GridToolbarExport.js +1 -13
- package/modern/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/modern/components/virtualization/GridBottomContainer.js +0 -17
- package/modern/components/virtualization/GridMainContainer.js +2 -1
- package/modern/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/modern/components/virtualization/GridVirtualScroller.js +2 -0
- package/modern/constants/gridClasses.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -2
- package/modern/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/modern/hooks/features/focus/useGridFocus.js +18 -3
- package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +3 -4
- package/modern/hooks/features/listView/useGridListView.js +8 -2
- package/modern/hooks/features/pagination/gridPaginationSelector.js +2 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/modern/hooks/features/rows/useGridRowSpanning.js +3 -1
- package/modern/hooks/features/scroll/useGridScroll.js +3 -7
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -2
- package/modern/index.js +1 -1
- package/modern/internals/constants.js +3 -0
- package/modern/internals/index.js +2 -1
- package/modern/internals/utils/gridRowGroupingUtils.js +9 -0
- package/modern/internals/utils/index.js +2 -1
- package/modern/joy/joySlots.js +45 -27
- package/modern/locales/daDK.js +5 -6
- package/modern/locales/itIT.js +27 -28
- package/modern/locales/ptBR.js +4 -4
- package/modern/material/index.js +4 -0
- package/node/components/GridRow.js +2 -2
- package/node/components/cell/GridBooleanCell.js +13 -2
- package/node/components/columnHeaders/GridColumnHeaderFilterIconButton.js +1 -2
- package/node/components/columnHeaders/GridColumnHeaderSortIcon.js +1 -2
- package/node/components/containers/GridRootStyles.js +4 -2
- package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/node/components/panel/filterPanel/GridFilterInputValue.js +2 -2
- package/node/components/toolbar/GridToolbar.js +2 -3
- package/node/components/toolbar/GridToolbarExport.js +1 -13
- package/node/components/toolbar/GridToolbarFilterButton.js +1 -2
- package/node/components/virtualization/GridBottomContainer.js +0 -17
- package/node/components/virtualization/GridMainContainer.js +2 -1
- package/node/components/virtualization/GridVirtualScrollbar.js +1 -1
- package/node/components/virtualization/GridVirtualScroller.js +2 -0
- package/node/constants/gridClasses.js +1 -1
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +1 -2
- package/node/hooks/features/columnMenu/useGridColumnMenuSlots.js +4 -3
- package/node/hooks/features/focus/useGridFocus.js +18 -3
- package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +4 -5
- package/node/hooks/features/listView/useGridListView.js +8 -2
- package/node/hooks/features/pagination/gridPaginationSelector.js +3 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -2
- package/node/hooks/features/rows/useGridRowSpanning.js +3 -1
- package/node/hooks/features/scroll/useGridScroll.js +3 -7
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -2
- package/node/index.js +1 -1
- package/node/internals/constants.js +9 -0
- package/node/internals/index.js +12 -0
- package/node/internals/utils/gridRowGroupingUtils.js +17 -0
- package/node/internals/utils/index.js +11 -0
- package/node/joy/joySlots.js +45 -27
- package/node/locales/daDK.js +5 -6
- package/node/locales/itIT.js +27 -28
- package/node/locales/ptBR.js +4 -4
- package/node/material/index.js +4 -0
- package/package.json +1 -1
- package/constants/gridDetailPanelToggleField.d.ts +0 -1
- package/constants/gridDetailPanelToggleField.js +0 -2
- package/modern/constants/gridDetailPanelToggleField.js +0 -2
- package/node/constants/gridDetailPanelToggleField.js +0 -8
package/modern/joy/joySlots.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["
|
|
4
|
-
_excluded2 = ["
|
|
5
|
-
_excluded3 = ["
|
|
6
|
-
_excluded4 = ["color", "size", "sx", "
|
|
7
|
-
_excluded5 = ["
|
|
8
|
-
_excluded6 = ["native"],
|
|
9
|
-
_excluded7 = ["
|
|
3
|
+
const _excluded = ["slotProps", "variant", "color", "sx"],
|
|
4
|
+
_excluded2 = ["touchRippleRef", "inputProps", "onChange", "color", "size", "checked", "sx", "value", "inputRef"],
|
|
5
|
+
_excluded3 = ["onChange", "label", "placeholder", "value", "inputRef", "type", "size", "variant"],
|
|
6
|
+
_excluded4 = ["startIcon", "color", "endIcon", "size", "sx", "variant"],
|
|
7
|
+
_excluded5 = ["color", "size", "sx", "touchRippleRef"],
|
|
8
|
+
_excluded6 = ["open", "onOpen", "value", "onChange", "size", "color", "variant", "inputProps", "MenuProps", "inputRef", "error", "native", "fullWidth", "labelId"],
|
|
9
|
+
_excluded7 = ["native"],
|
|
10
|
+
_excluded8 = ["shrink", "variant", "sx"];
|
|
10
11
|
import * as React from 'react';
|
|
12
|
+
import JoyBadge from '@mui/joy/Badge';
|
|
11
13
|
import JoyCheckbox from '@mui/joy/Checkbox';
|
|
14
|
+
import JoyDivider from '@mui/joy/Divider';
|
|
12
15
|
import JoyInput from '@mui/joy/Input';
|
|
13
16
|
import JoyFormControl from '@mui/joy/FormControl';
|
|
14
17
|
import JoyFormLabel from '@mui/joy/FormLabel';
|
|
@@ -58,14 +61,27 @@ function convertVariant(variant, defaultVariant = 'plain') {
|
|
|
58
61
|
filled: 'soft'
|
|
59
62
|
}[variant] || defaultVariant;
|
|
60
63
|
}
|
|
61
|
-
const
|
|
64
|
+
const Badge = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
65
|
+
let {
|
|
66
|
+
color,
|
|
67
|
+
sx
|
|
68
|
+
} = _ref,
|
|
69
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
70
|
+
return /*#__PURE__*/_jsx(JoyBadge, _extends({}, props, {
|
|
71
|
+
color: convertColor(color),
|
|
72
|
+
variant: "plain",
|
|
73
|
+
sx: sx,
|
|
74
|
+
ref: ref
|
|
75
|
+
}));
|
|
76
|
+
});
|
|
77
|
+
const Checkbox = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
62
78
|
let {
|
|
63
79
|
inputProps,
|
|
64
80
|
onChange,
|
|
65
81
|
checked,
|
|
66
82
|
inputRef
|
|
67
|
-
} =
|
|
68
|
-
props = _objectWithoutPropertiesLoose(
|
|
83
|
+
} = _ref2,
|
|
84
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
69
85
|
return /*#__PURE__*/_jsx(JoyCheckbox, _extends({}, props, {
|
|
70
86
|
slotProps: {
|
|
71
87
|
input: _extends({}, inputProps, {
|
|
@@ -77,7 +93,7 @@ const Checkbox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
77
93
|
onChange: onChange
|
|
78
94
|
}));
|
|
79
95
|
});
|
|
80
|
-
const TextField = /*#__PURE__*/React.forwardRef((
|
|
96
|
+
const TextField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
81
97
|
let {
|
|
82
98
|
onChange,
|
|
83
99
|
label,
|
|
@@ -87,8 +103,8 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
87
103
|
type,
|
|
88
104
|
size,
|
|
89
105
|
variant
|
|
90
|
-
} =
|
|
91
|
-
props = _objectWithoutPropertiesLoose(
|
|
106
|
+
} = _ref3,
|
|
107
|
+
props = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
92
108
|
const rootRef = useForkRef(ref, props.InputProps?.ref);
|
|
93
109
|
const inputForkRef = useForkRef(inputRef, props?.inputProps?.ref);
|
|
94
110
|
const {
|
|
@@ -116,7 +132,7 @@ const TextField = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
116
132
|
})]
|
|
117
133
|
});
|
|
118
134
|
});
|
|
119
|
-
const Button = /*#__PURE__*/React.forwardRef(function Button(
|
|
135
|
+
const Button = /*#__PURE__*/React.forwardRef(function Button(_ref4, ref) {
|
|
120
136
|
let {
|
|
121
137
|
startIcon,
|
|
122
138
|
color,
|
|
@@ -124,8 +140,8 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
124
140
|
size,
|
|
125
141
|
sx,
|
|
126
142
|
variant
|
|
127
|
-
} =
|
|
128
|
-
props = _objectWithoutPropertiesLoose(
|
|
143
|
+
} = _ref4,
|
|
144
|
+
props = _objectWithoutPropertiesLoose(_ref4, _excluded4);
|
|
129
145
|
return /*#__PURE__*/_jsx(JoyButton, _extends({}, props, {
|
|
130
146
|
size: convertSize(size),
|
|
131
147
|
color: convertColor(color),
|
|
@@ -136,13 +152,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(_ref3, ref) {
|
|
|
136
152
|
sx: sx
|
|
137
153
|
}));
|
|
138
154
|
});
|
|
139
|
-
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(
|
|
155
|
+
const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref5, ref) {
|
|
140
156
|
let {
|
|
141
157
|
color,
|
|
142
158
|
size,
|
|
143
159
|
sx
|
|
144
|
-
} =
|
|
145
|
-
props = _objectWithoutPropertiesLoose(
|
|
160
|
+
} = _ref5,
|
|
161
|
+
props = _objectWithoutPropertiesLoose(_ref5, _excluded5);
|
|
146
162
|
return /*#__PURE__*/_jsx(JoyIconButton, _extends({}, props, {
|
|
147
163
|
size: convertSize(size),
|
|
148
164
|
color: convertColor(color) ?? 'neutral',
|
|
@@ -151,7 +167,7 @@ const IconButton = /*#__PURE__*/React.forwardRef(function IconButton(_ref4, ref)
|
|
|
151
167
|
sx: sx
|
|
152
168
|
}));
|
|
153
169
|
});
|
|
154
|
-
const Select = /*#__PURE__*/React.forwardRef((
|
|
170
|
+
const Select = /*#__PURE__*/React.forwardRef((_ref6, ref) => {
|
|
155
171
|
let {
|
|
156
172
|
open,
|
|
157
173
|
onOpen,
|
|
@@ -163,8 +179,8 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
163
179
|
MenuProps,
|
|
164
180
|
inputRef,
|
|
165
181
|
labelId
|
|
166
|
-
} =
|
|
167
|
-
props = _objectWithoutPropertiesLoose(
|
|
182
|
+
} = _ref6,
|
|
183
|
+
props = _objectWithoutPropertiesLoose(_ref6, _excluded6);
|
|
168
184
|
const handleChange = (event, newValue) => {
|
|
169
185
|
if (event && onChange) {
|
|
170
186
|
// Same as in https://github.com/mui/material-ui/blob/e5558282a8f36856aef1299f3a36f3235e92e770/packages/mui-material/src/Select/SelectInput.js#L288-L300
|
|
@@ -215,17 +231,17 @@ const Select = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
215
231
|
}
|
|
216
232
|
}));
|
|
217
233
|
});
|
|
218
|
-
const Option = /*#__PURE__*/React.forwardRef((
|
|
219
|
-
let props = _objectWithoutPropertiesLoose(
|
|
234
|
+
const Option = /*#__PURE__*/React.forwardRef((_ref7, ref) => {
|
|
235
|
+
let props = _objectWithoutPropertiesLoose(_ref7, _excluded7);
|
|
220
236
|
return /*#__PURE__*/_jsx(JoyOption, _extends({}, props, {
|
|
221
237
|
ref: ref
|
|
222
238
|
}));
|
|
223
239
|
});
|
|
224
|
-
const InputLabel = /*#__PURE__*/React.forwardRef((
|
|
240
|
+
const InputLabel = /*#__PURE__*/React.forwardRef((_ref8, ref) => {
|
|
225
241
|
let {
|
|
226
242
|
sx
|
|
227
|
-
} =
|
|
228
|
-
props = _objectWithoutPropertiesLoose(
|
|
243
|
+
} = _ref8,
|
|
244
|
+
props = _objectWithoutPropertiesLoose(_ref8, _excluded8);
|
|
229
245
|
return /*#__PURE__*/_jsx(JoyFormLabel, _extends({}, props, {
|
|
230
246
|
ref: ref,
|
|
231
247
|
sx: sx
|
|
@@ -351,7 +367,9 @@ const LoadingOverlay = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
351
367
|
}));
|
|
352
368
|
});
|
|
353
369
|
const joySlots = _extends({}, joyIconSlots, {
|
|
370
|
+
baseBadge: Badge,
|
|
354
371
|
baseCheckbox: Checkbox,
|
|
372
|
+
baseDivider: JoyDivider,
|
|
355
373
|
baseTextField: TextField,
|
|
356
374
|
baseButton: Button,
|
|
357
375
|
baseIconButton: IconButton,
|
package/modern/locales/daDK.js
CHANGED
|
@@ -33,8 +33,7 @@ const daDKGrid = {
|
|
|
33
33
|
columnsManagementSearchTitle: 'Søg',
|
|
34
34
|
columnsManagementNoColumns: 'Ingen søjler',
|
|
35
35
|
columnsManagementShowHideAllText: 'Vis/Skjul Alle',
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
columnsManagementReset: 'Nulstil',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Tilføj filter',
|
|
40
39
|
filterPanelRemoveAll: 'Fjern alle',
|
|
@@ -48,9 +47,9 @@ const daDKGrid = {
|
|
|
48
47
|
filterPanelInputPlaceholder: 'Filterværdi',
|
|
49
48
|
// Filter operators text
|
|
50
49
|
filterOperatorContains: 'indeholder',
|
|
51
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'indeholder ikke',
|
|
52
51
|
filterOperatorEquals: 'lig med',
|
|
53
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'ikke lig med',
|
|
54
53
|
filterOperatorStartsWith: 'begynder med',
|
|
55
54
|
filterOperatorEndsWith: 'ender med',
|
|
56
55
|
filterOperatorIs: 'er lig med',
|
|
@@ -70,9 +69,9 @@ const daDKGrid = {
|
|
|
70
69
|
'filterOperator<=': '<=',
|
|
71
70
|
// Header filter operators text
|
|
72
71
|
headerFilterOperatorContains: 'Indeholder',
|
|
73
|
-
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Indeholder ikke',
|
|
74
73
|
headerFilterOperatorEquals: 'Lig med',
|
|
75
|
-
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Ikke lig med',
|
|
76
75
|
headerFilterOperatorStartsWith: 'Begynder med',
|
|
77
76
|
headerFilterOperatorEndsWith: 'Ender med',
|
|
78
77
|
headerFilterOperatorIs: 'Er lig med',
|
package/modern/locales/itIT.js
CHANGED
|
@@ -30,11 +30,10 @@ const itITGrid = {
|
|
|
30
30
|
toolbarExportPrint: 'Stampa',
|
|
31
31
|
toolbarExportExcel: 'Scarica come Excel',
|
|
32
32
|
// Columns management text
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
columnsManagementSearchTitle: 'Cerca',
|
|
34
|
+
columnsManagementNoColumns: 'Nessuna colonna',
|
|
35
|
+
columnsManagementShowHideAllText: 'Mostra/Nascondi Tutto',
|
|
36
|
+
columnsManagementReset: 'Resetta',
|
|
38
37
|
// Filter panel text
|
|
39
38
|
filterPanelAddFilter: 'Aggiungi un filtro',
|
|
40
39
|
filterPanelRemoveAll: 'Rimuovi filtri',
|
|
@@ -48,13 +47,13 @@ const itITGrid = {
|
|
|
48
47
|
filterPanelInputPlaceholder: 'Filtra il valore',
|
|
49
48
|
// Filter operators text
|
|
50
49
|
filterOperatorContains: 'contiene',
|
|
51
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'non contiene',
|
|
52
51
|
filterOperatorEquals: 'uguale a',
|
|
53
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'diverso da',
|
|
54
53
|
filterOperatorStartsWith: 'comincia per',
|
|
55
54
|
filterOperatorEndsWith: 'termina per',
|
|
56
55
|
filterOperatorIs: 'uguale a',
|
|
57
|
-
filterOperatorNot: '
|
|
56
|
+
filterOperatorNot: 'diverso da',
|
|
58
57
|
filterOperatorAfter: 'dopo il',
|
|
59
58
|
filterOperatorOnOrAfter: 'a partire dal',
|
|
60
59
|
filterOperatorBefore: 'prima del',
|
|
@@ -70,26 +69,26 @@ const itITGrid = {
|
|
|
70
69
|
'filterOperator<=': '<=',
|
|
71
70
|
// Header filter operators text
|
|
72
71
|
headerFilterOperatorContains: 'Contiene',
|
|
73
|
-
|
|
74
|
-
headerFilterOperatorEquals: '
|
|
75
|
-
|
|
76
|
-
headerFilterOperatorStartsWith: '
|
|
77
|
-
headerFilterOperatorEndsWith: '
|
|
78
|
-
headerFilterOperatorIs: '
|
|
79
|
-
headerFilterOperatorNot: '
|
|
80
|
-
headerFilterOperatorAfter: '
|
|
81
|
-
headerFilterOperatorOnOrAfter: '
|
|
82
|
-
headerFilterOperatorBefore: '
|
|
83
|
-
headerFilterOperatorOnOrBefore: '
|
|
84
|
-
headerFilterOperatorIsEmpty: '
|
|
85
|
-
headerFilterOperatorIsNotEmpty: '
|
|
86
|
-
headerFilterOperatorIsAnyOf: '
|
|
87
|
-
'headerFilterOperator=': '
|
|
88
|
-
'headerFilterOperator!=': '
|
|
89
|
-
'headerFilterOperator>': '
|
|
90
|
-
'headerFilterOperator>=': '
|
|
91
|
-
'headerFilterOperator<': '
|
|
92
|
-
'headerFilterOperator<=': '
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Non contiene',
|
|
73
|
+
headerFilterOperatorEquals: 'Uguale a',
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Diverso da',
|
|
75
|
+
headerFilterOperatorStartsWith: 'Comincia per',
|
|
76
|
+
headerFilterOperatorEndsWith: 'Termina per',
|
|
77
|
+
headerFilterOperatorIs: 'Uguale a',
|
|
78
|
+
headerFilterOperatorNot: 'Diverso da',
|
|
79
|
+
headerFilterOperatorAfter: 'Dopo il',
|
|
80
|
+
headerFilterOperatorOnOrAfter: 'A partire dal',
|
|
81
|
+
headerFilterOperatorBefore: 'Prima del',
|
|
82
|
+
headerFilterOperatorOnOrBefore: 'Fino al',
|
|
83
|
+
headerFilterOperatorIsEmpty: 'È vuoto',
|
|
84
|
+
headerFilterOperatorIsNotEmpty: 'Non è vuoto',
|
|
85
|
+
headerFilterOperatorIsAnyOf: 'È uno tra',
|
|
86
|
+
'headerFilterOperator=': 'Uguale a',
|
|
87
|
+
'headerFilterOperator!=': 'Diverso da',
|
|
88
|
+
'headerFilterOperator>': 'Maggiore di',
|
|
89
|
+
'headerFilterOperator>=': 'Maggiore o uguale a',
|
|
90
|
+
'headerFilterOperator<': 'Minore di',
|
|
91
|
+
'headerFilterOperator<=': 'Minore o uguale a',
|
|
93
92
|
// Filter values text
|
|
94
93
|
filterValueAny: 'qualunque',
|
|
95
94
|
filterValueTrue: 'vero',
|
package/modern/locales/ptBR.js
CHANGED
|
@@ -47,9 +47,9 @@ const ptBRGrid = {
|
|
|
47
47
|
filterPanelInputPlaceholder: 'Filtrar valor',
|
|
48
48
|
// Filter operators text
|
|
49
49
|
filterOperatorContains: 'contém',
|
|
50
|
-
|
|
50
|
+
filterOperatorDoesNotContain: 'não contém',
|
|
51
51
|
filterOperatorEquals: 'é igual a',
|
|
52
|
-
|
|
52
|
+
filterOperatorDoesNotEqual: 'não é igual a',
|
|
53
53
|
filterOperatorStartsWith: 'começa com',
|
|
54
54
|
filterOperatorEndsWith: 'termina com',
|
|
55
55
|
filterOperatorIs: 'é',
|
|
@@ -69,9 +69,9 @@ const ptBRGrid = {
|
|
|
69
69
|
'filterOperator<=': 'menor ou igual que',
|
|
70
70
|
// Header filter operators text
|
|
71
71
|
headerFilterOperatorContains: 'Contém',
|
|
72
|
-
|
|
72
|
+
headerFilterOperatorDoesNotContain: 'Não contém',
|
|
73
73
|
headerFilterOperatorEquals: 'Igual',
|
|
74
|
-
|
|
74
|
+
headerFilterOperatorDoesNotEqual: 'Não é igual a',
|
|
75
75
|
headerFilterOperatorStartsWith: 'Começa com',
|
|
76
76
|
headerFilterOperatorEndsWith: 'Termina com',
|
|
77
77
|
headerFilterOperatorIs: 'É',
|
package/modern/material/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import MUIBadge from '@mui/material/Badge';
|
|
2
3
|
import MUICheckbox from '@mui/material/Checkbox';
|
|
4
|
+
import MUIDivider from '@mui/material/Divider';
|
|
3
5
|
import MUITextField from '@mui/material/TextField';
|
|
4
6
|
import MUIFormControl from '@mui/material/FormControl';
|
|
5
7
|
import MUISelect from '@mui/material/Select';
|
|
@@ -51,7 +53,9 @@ const iconSlots = {
|
|
|
51
53
|
columnReorderIcon: GridDragIcon
|
|
52
54
|
};
|
|
53
55
|
const materialSlots = _extends({}, iconSlots, {
|
|
56
|
+
baseBadge: MUIBadge,
|
|
54
57
|
baseCheckbox: MUICheckbox,
|
|
58
|
+
baseDivider: MUIDivider,
|
|
55
59
|
baseTextField: MUITextField,
|
|
56
60
|
baseFormControl: MUIFormControl,
|
|
57
61
|
baseSelect: MUISelect,
|
|
@@ -23,7 +23,7 @@ var _useGridVisibleRows = require("../hooks/utils/useGridVisibleRows");
|
|
|
23
23
|
var _domUtils = require("../utils/domUtils");
|
|
24
24
|
var _gridCheckboxSelectionColDef = require("../colDef/gridCheckboxSelectionColDef");
|
|
25
25
|
var _gridActionsColDef = require("../colDef/gridActionsColDef");
|
|
26
|
-
var
|
|
26
|
+
var _constants = require("../internals/constants");
|
|
27
27
|
var _gridSortingSelector = require("../hooks/features/sorting/gridSortingSelector");
|
|
28
28
|
var _gridRowsSelector = require("../hooks/features/rows/gridRowsSelector");
|
|
29
29
|
var _gridEditingSelectors = require("../hooks/features/editing/gridEditingSelectors");
|
|
@@ -145,7 +145,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// User opened a detail panel
|
|
148
|
-
if (field ===
|
|
148
|
+
if (field === _constants.GRID_DETAIL_PANEL_TOGGLE_FIELD) {
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -11,10 +11,13 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
|
+
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
15
|
+
var _gridRowsSelector = require("../../hooks/features/rows/gridRowsSelector");
|
|
14
16
|
var _gridClasses = require("../../constants/gridClasses");
|
|
15
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
16
18
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
17
19
|
var _gridRowsUtils = require("../../hooks/features/rows/gridRowsUtils");
|
|
20
|
+
var _constants = require("../../internals/constants");
|
|
18
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
22
|
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "hasFocus", "tabIndex", "hideDescendantCount"];
|
|
20
23
|
const useUtilityClasses = ownerState => {
|
|
@@ -28,7 +31,8 @@ const useUtilityClasses = ownerState => {
|
|
|
28
31
|
};
|
|
29
32
|
function GridBooleanCellRaw(props) {
|
|
30
33
|
const {
|
|
31
|
-
value
|
|
34
|
+
value,
|
|
35
|
+
rowNode
|
|
32
36
|
} = props,
|
|
33
37
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
34
38
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
@@ -37,7 +41,14 @@ function GridBooleanCellRaw(props) {
|
|
|
37
41
|
classes: rootProps.classes
|
|
38
42
|
};
|
|
39
43
|
const classes = useUtilityClasses(ownerState);
|
|
44
|
+
const maxDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridRowMaximumTreeDepthSelector);
|
|
45
|
+
const isServerSideRowGroupingRow =
|
|
46
|
+
// @ts-expect-error - Access tree data prop
|
|
47
|
+
maxDepth > 0 && rowNode.type === 'group' && rootProps.treeData === false;
|
|
40
48
|
const Icon = React.useMemo(() => value ? rootProps.slots.booleanCellTrueIcon : rootProps.slots.booleanCellFalseIcon, [rootProps.slots.booleanCellFalseIcon, rootProps.slots.booleanCellTrueIcon, value]);
|
|
49
|
+
if (isServerSideRowGroupingRow && value === undefined) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
41
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, (0, _extends2.default)({
|
|
42
53
|
fontSize: "small",
|
|
43
54
|
className: classes.root,
|
|
@@ -113,7 +124,7 @@ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
|
|
|
113
124
|
} : void 0;
|
|
114
125
|
const GridBooleanCell = exports.GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
|
|
115
126
|
const renderBooleanCell = params => {
|
|
116
|
-
if (params.field !==
|
|
127
|
+
if (params.field !== _constants.GRID_ROW_GROUPING_SINGLE_GROUPING_FIELD && (0, _gridRowsUtils.isAutogeneratedRowNode)(params.rowNode)) {
|
|
117
128
|
return '';
|
|
118
129
|
}
|
|
119
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(GridBooleanCell, (0, _extends2.default)({}, params));
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _utils = require("@mui/utils");
|
|
13
|
-
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
14
13
|
var _hooks = require("../../hooks");
|
|
15
14
|
var _gridPreferencePanelSelector = require("../../hooks/features/preferencesPanel/gridPreferencePanelSelector");
|
|
16
15
|
var _gridPreferencePanelsValue = require("../../hooks/features/preferencesPanel/gridPreferencePanelsValue");
|
|
@@ -84,7 +83,7 @@ function GridColumnHeaderFilterIconButton(props) {
|
|
|
84
83
|
enterDelay: 1000
|
|
85
84
|
}, rootProps.slotProps?.baseTooltip, {
|
|
86
85
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridIconButtonContainer.GridIconButtonContainer, {
|
|
87
|
-
children: [counter > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
86
|
+
children: [counter > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseBadge, {
|
|
88
87
|
badgeContent: counter,
|
|
89
88
|
color: "default",
|
|
90
89
|
children: iconButton
|
|
@@ -11,7 +11,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
|
-
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
15
14
|
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
16
15
|
var _gridClasses = require("../../constants/gridClasses");
|
|
17
16
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -71,7 +70,7 @@ function GridColumnHeaderSortIconRaw(props) {
|
|
|
71
70
|
children: iconElement
|
|
72
71
|
}));
|
|
73
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_GridIconButtonContainer.GridIconButtonContainer, {
|
|
74
|
-
children: [index != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
73
|
+
children: [index != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseBadge, {
|
|
75
74
|
badgeContent: index,
|
|
76
75
|
color: "default",
|
|
77
76
|
overlap: "circular",
|
|
@@ -159,6 +159,8 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
159
159
|
[`& .${_gridClasses.gridClasses.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
|
|
160
160
|
}, {
|
|
161
161
|
[`& .${_gridClasses.gridClasses.treeDataGroupingCellLoadingContainer}`]: styles.treeDataGroupingCellLoadingContainer
|
|
162
|
+
}, {
|
|
163
|
+
[`& .${_gridClasses.gridClasses.groupingCriteriaCellLoadingContainer}`]: styles.groupingCriteriaCellLoadingContainer
|
|
162
164
|
}, {
|
|
163
165
|
[`& .${_gridClasses.gridClasses.detailPanelToggleCell}`]: styles.detailPanelToggleCell
|
|
164
166
|
}, {
|
|
@@ -692,7 +694,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
692
694
|
alignSelf: 'stretch',
|
|
693
695
|
marginRight: t.spacing(2)
|
|
694
696
|
},
|
|
695
|
-
[`& .${_gridClasses.gridClasses.treeDataGroupingCellLoadingContainer}`]: {
|
|
697
|
+
[`& .${_gridClasses.gridClasses.treeDataGroupingCellLoadingContainer}, .${_gridClasses.gridClasses.groupingCriteriaCellLoadingContainer}`]: {
|
|
696
698
|
display: 'flex',
|
|
697
699
|
alignItems: 'center',
|
|
698
700
|
justifyContent: 'center',
|
|
@@ -725,7 +727,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
725
727
|
}
|
|
726
728
|
},
|
|
727
729
|
[`& .${_gridClasses.gridClasses.filler}`]: {
|
|
728
|
-
flex: 1
|
|
730
|
+
flex: '1 0 auto'
|
|
729
731
|
},
|
|
730
732
|
[`& .${_gridClasses.gridClasses['filler--borderBottom']}`]: {
|
|
731
733
|
borderBottom: '1px solid var(--DataGrid-rowBorderColor)'
|
|
@@ -47,9 +47,9 @@ function GridFilterInputMultipleValue(props) {
|
|
|
47
47
|
const handleChange = React.useCallback((event, value) => {
|
|
48
48
|
setFilterValueState(value.map(String));
|
|
49
49
|
applyValue((0, _extends2.default)({}, item, {
|
|
50
|
-
value: [...value]
|
|
50
|
+
value: [...value.map(filterItemValue => type === 'number' ? Number(filterItemValue) : filterItemValue)]
|
|
51
51
|
}));
|
|
52
|
-
}, [applyValue, item]);
|
|
52
|
+
}, [applyValue, item, type]);
|
|
53
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
|
|
54
54
|
multiple: true,
|
|
55
55
|
freeSolo: true,
|
|
@@ -42,13 +42,13 @@ function GridFilterInputValue(props) {
|
|
|
42
42
|
setIsApplying(true);
|
|
43
43
|
filterTimeout.start(rootProps.filterDebounceMs, () => {
|
|
44
44
|
const newItem = (0, _extends2.default)({}, item, {
|
|
45
|
-
value,
|
|
45
|
+
value: type === 'number' ? Number(value) : value,
|
|
46
46
|
fromInput: id
|
|
47
47
|
});
|
|
48
48
|
applyValue(newItem);
|
|
49
49
|
setIsApplying(false);
|
|
50
50
|
});
|
|
51
|
-
}, [
|
|
51
|
+
}, [filterTimeout, rootProps.filterDebounceMs, item, type, id, applyValue]);
|
|
52
52
|
React.useEffect(() => {
|
|
53
53
|
const itemPlusTag = item;
|
|
54
54
|
if (itemPlusTag.fromInput !== id || item.value === undefined) {
|
|
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
14
13
|
var _GridToolbarContainer = require("../containers/GridToolbarContainer");
|
|
15
14
|
var _GridToolbarColumnsButton = require("./GridToolbarColumnsButton");
|
|
16
15
|
var _GridToolbarDensitySelector = require("./GridToolbarDensitySelector");
|
|
@@ -44,8 +43,8 @@ const GridToolbar = exports.GridToolbar = /*#__PURE__*/React.forwardRef(function
|
|
|
44
43
|
// TODO: remove the reference to excelOptions in community package
|
|
45
44
|
,
|
|
46
45
|
excelOptions: excelOptions
|
|
47
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
48
|
-
|
|
46
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
47
|
+
style: {
|
|
49
48
|
flex: 1
|
|
50
49
|
}
|
|
51
50
|
}), showQuickFilter && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridToolbarQuickFilter.GridToolbarQuickFilter, (0, _extends2.default)({}, quickFilterProps))]
|
|
@@ -88,19 +88,7 @@ process.env.NODE_ENV !== "production" ? GridPrintExportMenuItem.propTypes = {
|
|
|
88
88
|
hideFooter: _propTypes.default.bool,
|
|
89
89
|
hideToolbar: _propTypes.default.bool,
|
|
90
90
|
includeCheckboxes: _propTypes.default.bool,
|
|
91
|
-
pageStyle: _propTypes.default.oneOfType([_propTypes.default.
|
|
92
|
-
'__@hasInstance@646': _propTypes.default.func.isRequired,
|
|
93
|
-
'__@metadata@648': _propTypes.default.any,
|
|
94
|
-
apply: _propTypes.default.func.isRequired,
|
|
95
|
-
arguments: _propTypes.default.any.isRequired,
|
|
96
|
-
bind: _propTypes.default.func.isRequired,
|
|
97
|
-
call: _propTypes.default.func.isRequired,
|
|
98
|
-
caller: _propTypes.default.object.isRequired,
|
|
99
|
-
length: _propTypes.default.number.isRequired,
|
|
100
|
-
name: _propTypes.default.string.isRequired,
|
|
101
|
-
prototype: _propTypes.default.any.isRequired,
|
|
102
|
-
toString: _propTypes.default.func.isRequired
|
|
103
|
-
}), _propTypes.default.string])
|
|
91
|
+
pageStyle: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string])
|
|
104
92
|
})
|
|
105
93
|
} : void 0;
|
|
106
94
|
const GridToolbarExport = exports.GridToolbarExport = /*#__PURE__*/React.forwardRef(function GridToolbarExport(props, ref) {
|
|
@@ -11,7 +11,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
12
|
var _styles = require("@mui/material/styles");
|
|
13
13
|
var _utils = require("@mui/utils");
|
|
14
|
-
var _Badge = _interopRequireDefault(require("@mui/material/Badge"));
|
|
15
14
|
var _gridColumnsSelector = require("../../hooks/features/columns/gridColumnsSelector");
|
|
16
15
|
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
17
16
|
var _gridFilterSelector = require("../../hooks/features/filter/gridFilterSelector");
|
|
@@ -112,7 +111,7 @@ const GridToolbarFilterButton = exports.GridToolbarFilterButton = /*#__PURE__*/R
|
|
|
112
111
|
"aria-controls": isOpen ? filterPanelId : undefined,
|
|
113
112
|
"aria-expanded": isOpen,
|
|
114
113
|
"aria-haspopup": true,
|
|
115
|
-
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
114
|
+
startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseBadge, {
|
|
116
115
|
badgeContent: activeFilters.length,
|
|
117
116
|
color: "primary",
|
|
118
117
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.openFilterButtonIcon, {})
|
|
@@ -12,9 +12,6 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
12
12
|
var _system = require("@mui/system");
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _gridClasses = require("../../constants/gridClasses");
|
|
15
|
-
var _gridDimensionsSelectors = require("../../hooks/features/dimensions/gridDimensionsSelectors");
|
|
16
|
-
var _useGridApiContext = require("../../hooks/utils/useGridApiContext");
|
|
17
|
-
var _useGridSelector = require("../../hooks/utils/useGridSelector");
|
|
18
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
16
|
const useUtilityClasses = () => {
|
|
20
17
|
const slots = {
|
|
@@ -29,22 +26,8 @@ const Element = (0, _system.styled)('div')({
|
|
|
29
26
|
});
|
|
30
27
|
function GridBottomContainer(props) {
|
|
31
28
|
const classes = useUtilityClasses();
|
|
32
|
-
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
33
|
-
const {
|
|
34
|
-
viewportOuterSize,
|
|
35
|
-
minimumSize,
|
|
36
|
-
hasScrollX,
|
|
37
|
-
scrollbarSize
|
|
38
|
-
} = (0, _useGridSelector.useGridSelector)(apiRef, _gridDimensionsSelectors.gridDimensionsSelector);
|
|
39
|
-
const scrollHeight = hasScrollX ? scrollbarSize : 0;
|
|
40
|
-
const offset = Math.max(viewportOuterSize.height - minimumSize.height -
|
|
41
|
-
// Subtract scroll height twice to account for GridVirtualScrollerFiller and horizontal scrollbar
|
|
42
|
-
2 * scrollHeight, 0);
|
|
43
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Element, (0, _extends2.default)({}, props, {
|
|
44
30
|
className: (0, _clsx.default)(classes.root, _gridClasses.gridClasses['container--bottom']),
|
|
45
|
-
style: {
|
|
46
|
-
transform: `translateY(${offset}px)`
|
|
47
|
-
},
|
|
48
31
|
role: "presentation"
|
|
49
32
|
}));
|
|
50
33
|
}
|
|
@@ -15,7 +15,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
15
|
const GridPanelAnchor = (0, _system.styled)('div')({
|
|
16
16
|
position: 'absolute',
|
|
17
17
|
top: `var(--DataGrid-headersTotalHeight)`,
|
|
18
|
-
left: 0
|
|
18
|
+
left: 0,
|
|
19
|
+
width: 'calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))'
|
|
19
20
|
});
|
|
20
21
|
const Element = (0, _system.styled)('div', {
|
|
21
22
|
name: 'MuiDataGrid',
|
|
@@ -80,6 +80,7 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = /*#__PURE__*/React.f
|
|
|
80
80
|
if (scroller[propertyScroll] === lastPosition.current) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
+
lastPosition.current = scroller[propertyScroll];
|
|
83
84
|
if (isLocked.current) {
|
|
84
85
|
isLocked.current = false;
|
|
85
86
|
return;
|
|
@@ -87,7 +88,6 @@ const GridVirtualScrollbar = exports.GridVirtualScrollbar = /*#__PURE__*/React.f
|
|
|
87
88
|
isLocked.current = true;
|
|
88
89
|
const value = scroller[propertyScroll] / contentSize;
|
|
89
90
|
scrollbar[propertyScroll] = value * scrollbarInnerSize;
|
|
90
|
-
lastPosition.current = scroller[propertyScroll];
|
|
91
91
|
});
|
|
92
92
|
const onScrollbarScroll = (0, _utils.unstable_useEventCallback)(() => {
|
|
93
93
|
const scroller = apiRef.current.virtualScrollerRef.current;
|