@mui/x-data-grid 8.3.0 β 8.3.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 +96 -10
- package/components/columnSelection/GridCellCheckboxRenderer.js +4 -2
- package/esm/components/columnSelection/GridCellCheckboxRenderer.js +6 -4
- package/esm/hooks/features/columns/gridColumnsUtils.js +15 -7
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +6 -6
- package/esm/hooks/features/rowSelection/utils.d.ts +4 -1
- package/esm/hooks/features/rowSelection/utils.js +33 -32
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
- package/esm/index.d.ts +1 -0
- package/esm/index.js +2 -1
- package/esm/locales/koKR.js +68 -76
- package/esm/locales/nbNO.js +22 -24
- package/esm/models/api/gridRowSelectionApi.d.ts +4 -2
- package/esm/models/events/gridEventLookup.d.ts +1 -0
- package/hooks/features/columns/gridColumnsUtils.js +15 -7
- package/hooks/features/rowSelection/useGridRowSelection.js +6 -6
- package/hooks/features/rowSelection/utils.d.ts +4 -1
- package/hooks/features/rowSelection/utils.js +34 -34
- package/hooks/features/virtualization/useGridVirtualScroller.js +7 -6
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/locales/koKR.js +68 -76
- package/locales/nbNO.js +22 -24
- package/models/api/gridRowSelectionApi.d.ts +4 -2
- package/models/events/gridEventLookup.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,96 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.3.1
|
|
9
|
+
|
|
10
|
+
_May 14, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights β¨:
|
|
13
|
+
|
|
14
|
+
- π Improve Norwegian BokmΓ₯l (nb-NO) locale on the Data Grid
|
|
15
|
+
- π Improve Korean (ko-KR) locale on the Data Grid and Pickers
|
|
16
|
+
- π Documentation improvements
|
|
17
|
+
- π Bugfixes
|
|
18
|
+
|
|
19
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
20
|
+
@100pearlcent, @htollefsen, @JanPretzel, @sai6855.
|
|
21
|
+
Following are all team members who have contributed to this release:
|
|
22
|
+
@bernardobelchior, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @MBilalShafi, @oliviertassinari, @prakhargupta1.
|
|
23
|
+
|
|
24
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@8.3.1`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Add `reason` param for `onRowSelectionModelChange` callback (#17545) @sai6855
|
|
31
|
+
- [DataGrid] Fix `renderContext` calculation loop (#17779) @cherniavskii
|
|
32
|
+
- [DataGrid] Fix column spanning jump on scroll (#17759) @cherniavskii
|
|
33
|
+
- [DataGrid] Fix material augmentation not working (#17761) @cherniavskii
|
|
34
|
+
- [DataGrid] Use arguments selector for checkbox props (#17683) @MBilalShafi
|
|
35
|
+
- [l10n] Improve Norwegian BokmΓ₯l (nb-NO) locale (#17766) @htollefsen
|
|
36
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid@8.3.1`.
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.3.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.3.1`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPremium] Fix aggregation label not being used in pivot panel (#17760) @cherniavskii
|
|
47
|
+
|
|
48
|
+
### Date and Time Pickers
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-date-pickers@8.3.1`
|
|
51
|
+
|
|
52
|
+
- [fields] Add notch to the field outlined when the label is manually shrank (#17620) @flaviendelangle
|
|
53
|
+
- [l10n] Improve Korean (ko-KR) locale (#17484) @100pearlcent
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-date-pickers-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-date-pickers@8.3.1`.
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@8.3.1`
|
|
62
|
+
|
|
63
|
+
- [charts] Fix infinite tick number when zoom range is zero (#17750) @bernardobelchior
|
|
64
|
+
- [charts] Improve tick rendering performance (#17755) @bernardobelchior
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@8.3.1`, plus:
|
|
69
|
+
|
|
70
|
+
- [charts-pro] Fix ESM build issue with Vite (#17774) @bernardobelchior
|
|
71
|
+
- [charts-pro] Add benchmark for zoomed in scatter chart (#17756) @bernardobelchior
|
|
72
|
+
|
|
73
|
+
### Tree View
|
|
74
|
+
|
|
75
|
+
#### `@mui/x-tree-view@8.3.1`
|
|
76
|
+
|
|
77
|
+
Internal changes.
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-tree-view-pro@8.3.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-tree-view@8.3.1`.
|
|
82
|
+
|
|
83
|
+
### Docs
|
|
84
|
+
|
|
85
|
+
- [docs] Fix 301 to Next.js docs for license @oliviertassinari
|
|
86
|
+
- [docs] Fix AI assistant API URL (#17745) @oliviertassinari
|
|
87
|
+
- [docs] Fix heading structure in README @oliviertassinari
|
|
88
|
+
- [docs] Fix translation keys documentation (#17811) @JanPretzel
|
|
89
|
+
- [docs] Improve CHANGELOG format @oliviertassinari
|
|
90
|
+
|
|
91
|
+
### Core
|
|
92
|
+
|
|
93
|
+
- [core] Apply YAML convention, blank line only at top level @oliviertassinari
|
|
94
|
+
- [code-infra] Fix dynamic import missing extensions (#17767) @Janpot
|
|
95
|
+
- [code-infra] Replace `mocha` with `vitest` for browser & jsdom tests (#14508) @JCQuintas
|
|
96
|
+
- [scheduler] Create the package and setup a private doc page (#17239) @flaviendelangle
|
|
97
|
+
|
|
8
98
|
## 8.3.0
|
|
9
99
|
|
|
10
100
|
_May 8, 2025_
|
|
@@ -15,10 +105,8 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
15
105
|
- π Documentation improvements
|
|
16
106
|
- π Bugfixes
|
|
17
107
|
|
|
18
|
-
Special thanks go out to this community member for a valuable contribution:
|
|
19
|
-
@
|
|
20
|
-
Team members who have contributed to this release:
|
|
21
|
-
@alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
|
|
108
|
+
Special thanks go out to this community member for a valuable contribution: @ptuukkan.
|
|
109
|
+
Team members who have contributed to this release: @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @MBilalShafi, @rita-codes, @romgrk.
|
|
22
110
|
|
|
23
111
|
### Data Grid
|
|
24
112
|
|
|
@@ -531,8 +619,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
531
619
|
- π Documentation improvements
|
|
532
620
|
- π Bugfixes
|
|
533
621
|
|
|
534
|
-
Team members who have contributed to this release:
|
|
535
|
-
@bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
622
|
+
Team members who have contributed to this release: @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @oliviertassinari, @noraleonte, @romgrk, @alexfauquette.
|
|
536
623
|
|
|
537
624
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
538
625
|
|
|
@@ -845,7 +932,7 @@ We'd like to offer a big thanks to the 21 contributors who made this release pos
|
|
|
845
932
|
- π Improve Chinese (zh-CN), (zh-HK), (zh-TW), Czech (cs-CZ), Korean (ko-KR) and Slovak (sk-Sk) locales on the Data Grid
|
|
846
933
|
- π Improve Chinese (zh-CN), (zh-HK) and (zh-TW) locales on the Pickers
|
|
847
934
|
|
|
848
|
-
|
|
935
|
+
### Breaking changes
|
|
849
936
|
|
|
850
937
|
- βΉοΈ The peer dependency on `@mui/material` has been updated to accept only v7.
|
|
851
938
|
This has been done to increase the adoption rate of ESM.
|
|
@@ -858,7 +945,7 @@ Following are all team members who have contributed to this release:
|
|
|
858
945
|
|
|
859
946
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
860
947
|
|
|
861
|
-
|
|
948
|
+
### Alpha release highlights
|
|
862
949
|
|
|
863
950
|
Below are the highlights of the alpha releases leading up to this beta release:
|
|
864
951
|
|
|
@@ -3152,8 +3239,7 @@ We'd like to offer a big thanks to the 4 contributors who made this release poss
|
|
|
3152
3239
|
|
|
3153
3240
|
- π Bugfixes
|
|
3154
3241
|
|
|
3155
|
-
Team members who have contributed to this release:
|
|
3156
|
-
@arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3242
|
+
Team members who have contributed to this release: @arminmeh, @cherniavskii, @LukasTy, @michelengelen.
|
|
3157
3243
|
|
|
3158
3244
|
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
3159
3245
|
|
|
@@ -65,11 +65,13 @@ const GridCellCheckboxForwardRef = exports.GridCellCheckboxForwardRef = (0, _for
|
|
|
65
65
|
}
|
|
66
66
|
}, []);
|
|
67
67
|
const isSelectable = apiRef.current.isRowSelectable(id);
|
|
68
|
-
const checkboxPropsSelector = (0, _utils2.getCheckboxPropsSelector)(id, rootProps.rowSelectionPropagation?.parents ?? false);
|
|
69
68
|
const {
|
|
70
69
|
isIndeterminate,
|
|
71
70
|
isChecked
|
|
72
|
-
} = (0, _useGridSelector.useGridSelector)(apiRef, checkboxPropsSelector,
|
|
71
|
+
} = (0, _useGridSelector.useGridSelector)(apiRef, _utils2.checkboxPropsSelector, {
|
|
72
|
+
groupId: id,
|
|
73
|
+
autoSelectParents: rootProps.rowSelectionPropagation?.parents ?? false
|
|
74
|
+
});
|
|
73
75
|
if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
|
|
74
76
|
return null;
|
|
75
77
|
}
|
|
@@ -8,8 +8,8 @@ import { forwardRef } from '@mui/x-internals/forwardRef';
|
|
|
8
8
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
9
9
|
import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
|
|
10
10
|
import { getDataGridUtilityClass } from "../../constants/gridClasses.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
11
|
+
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
12
|
+
import { checkboxPropsSelector } from "../../hooks/features/rowSelection/utils.js";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
const useUtilityClasses = ownerState => {
|
|
15
15
|
const {
|
|
@@ -57,11 +57,13 @@ const GridCellCheckboxForwardRef = forwardRef(function GridCellCheckboxRenderer(
|
|
|
57
57
|
}
|
|
58
58
|
}, []);
|
|
59
59
|
const isSelectable = apiRef.current.isRowSelectable(id);
|
|
60
|
-
const checkboxPropsSelector = getCheckboxPropsSelector(id, rootProps.rowSelectionPropagation?.parents ?? false);
|
|
61
60
|
const {
|
|
62
61
|
isIndeterminate,
|
|
63
62
|
isChecked
|
|
64
|
-
} = useGridSelector(apiRef, checkboxPropsSelector,
|
|
63
|
+
} = useGridSelector(apiRef, checkboxPropsSelector, {
|
|
64
|
+
groupId: id,
|
|
65
|
+
autoSelectParents: rootProps.rowSelectionPropagation?.parents ?? false
|
|
66
|
+
});
|
|
65
67
|
if (rowNode.type === 'footer' || rowNode.type === 'pinnedRow') {
|
|
66
68
|
return null;
|
|
67
69
|
}
|
|
@@ -302,13 +302,21 @@ export function getFirstNonSpannedColumnToRender({
|
|
|
302
302
|
visibleRows
|
|
303
303
|
}) {
|
|
304
304
|
let firstNonSpannedColumnToRender = firstColumnToRender;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
let foundStableColumn = false;
|
|
306
|
+
|
|
307
|
+
// Keep checking columns until we find one that's not spanned in any visible row
|
|
308
|
+
while (!foundStableColumn && firstNonSpannedColumnToRender >= 0) {
|
|
309
|
+
foundStableColumn = true;
|
|
310
|
+
for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
|
|
311
|
+
const row = visibleRows[i];
|
|
312
|
+
if (row) {
|
|
313
|
+
const rowId = visibleRows[i].id;
|
|
314
|
+
const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);
|
|
315
|
+
if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {
|
|
316
|
+
firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
|
|
317
|
+
foundStableColumn = false;
|
|
318
|
+
break; // Check the new column index against the visible rows, because it might be spanned
|
|
319
|
+
}
|
|
312
320
|
}
|
|
313
321
|
}
|
|
314
322
|
}
|
|
@@ -92,7 +92,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
92
92
|
/*
|
|
93
93
|
* API METHODS
|
|
94
94
|
*/
|
|
95
|
-
const setRowSelectionModel = React.useCallback(model => {
|
|
95
|
+
const setRowSelectionModel = React.useCallback((model, reason) => {
|
|
96
96
|
if (props.signature === GridSignature.DataGrid && !canHaveMultipleSelection && (model.type !== 'include' || model.ids.size > 1)) {
|
|
97
97
|
throw new Error(['MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
|
|
98
98
|
}
|
|
@@ -101,7 +101,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
101
101
|
logger.debug(`Setting selection model`);
|
|
102
102
|
apiRef.current.setState(state => _extends({}, state, {
|
|
103
103
|
rowSelection: props.rowSelection ? model : emptyModel
|
|
104
|
-
}));
|
|
104
|
+
}), reason);
|
|
105
105
|
}
|
|
106
106
|
}, [apiRef, logger, props.rowSelection, props.signature, canHaveMultipleSelection]);
|
|
107
107
|
const isRowSelected = React.useCallback(id => {
|
|
@@ -142,7 +142,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
142
142
|
findRowsToSelect(apiRef, tree, id, props.rowSelectionPropagation?.descendants ?? false, props.rowSelectionPropagation?.parents ?? false, addRow);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
|
-
apiRef.current.setRowSelectionModel(newSelectionModel);
|
|
145
|
+
apiRef.current.setRowSelectionModel(newSelectionModel, 'singleRowSelection');
|
|
146
146
|
} else {
|
|
147
147
|
logger.debug(`Toggling selection for row ${id}`);
|
|
148
148
|
const selectionModel = gridRowSelectionStateSelector(apiRef);
|
|
@@ -168,7 +168,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
168
168
|
}
|
|
169
169
|
const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
|
|
170
170
|
if (isSelectionValid) {
|
|
171
|
-
apiRef.current.setRowSelectionModel(newSelectionModel);
|
|
171
|
+
apiRef.current.setRowSelectionModel(newSelectionModel, 'singleRowSelection');
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}, [apiRef, logger, applyAutoSelection, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, canHaveMultipleSelection]);
|
|
@@ -235,7 +235,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
235
235
|
}
|
|
236
236
|
const isSelectionValid = newSelectionModel.type === 'include' && newSelectionModel.ids.size < 2 || canHaveMultipleSelection;
|
|
237
237
|
if (isSelectionValid) {
|
|
238
|
-
apiRef.current.setRowSelectionModel(newSelectionModel);
|
|
238
|
+
apiRef.current.setRowSelectionModel(newSelectionModel, 'multipleRowsSelection');
|
|
239
239
|
}
|
|
240
240
|
}, [logger, applyAutoSelection, canHaveMultipleSelection, apiRef, tree, props.rowSelectionPropagation?.descendants, props.rowSelectionPropagation?.parents, props.rowSelection]);
|
|
241
241
|
const getPropagatedRowSelectionModel = React.useCallback(inputSelectionModel => {
|
|
@@ -360,7 +360,7 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
360
360
|
apiRef.current.selectRows(Array.from(newSelectionModel.ids), true, true);
|
|
361
361
|
}
|
|
362
362
|
} else {
|
|
363
|
-
apiRef.current.setRowSelectionModel(newSelectionModel);
|
|
363
|
+
apiRef.current.setRowSelectionModel(newSelectionModel, 'multipleRowsSelection');
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
}, [apiRef, isNestedData, props.rowSelectionPropagation?.parents, props.keepNonExistentRowsSelected, props.filterMode, tree, getRowsToBeSelected]);
|
|
@@ -5,7 +5,10 @@ import type { GridPrivateApiCommunity } from "../../../models/api/gridApiCommuni
|
|
|
5
5
|
import { type GridRowSelectionPropagation } from "../../../models/gridRowSelectionModel.js";
|
|
6
6
|
import { type RowSelectionManager } from "../../../models/gridRowSelectionManager.js";
|
|
7
7
|
export declare const ROW_SELECTION_PROPAGATION_DEFAULT: GridRowSelectionPropagation;
|
|
8
|
-
export declare
|
|
8
|
+
export declare const checkboxPropsSelector: import("@mui/x-data-grid").OutputSelector<import("../../../models/gridStateCommunity.js").GridStateCommunity, {
|
|
9
|
+
groupId: GridRowId;
|
|
10
|
+
autoSelectParents: boolean;
|
|
11
|
+
}, {
|
|
9
12
|
isIndeterminate: boolean;
|
|
10
13
|
isChecked: boolean;
|
|
11
14
|
}>;
|
|
@@ -27,41 +27,42 @@ function getGridRowGroupSelectableDescendants(apiRef, groupId) {
|
|
|
27
27
|
}
|
|
28
28
|
return descendants;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
export const checkboxPropsSelector = createSelector(gridRowTreeSelector, gridFilteredRowsLookupSelector, gridRowSelectionManagerSelector, (rowTree, filteredRowsLookup, rowSelectionManager, {
|
|
31
|
+
groupId,
|
|
32
|
+
autoSelectParents
|
|
33
|
+
}) => {
|
|
34
|
+
const groupNode = rowTree[groupId];
|
|
35
|
+
if (!groupNode || groupNode.type !== 'group' || rowSelectionManager.has(groupId)) {
|
|
36
|
+
return {
|
|
37
|
+
isIndeterminate: false,
|
|
38
|
+
isChecked: rowSelectionManager.has(groupId)
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
let hasSelectedDescendant = false;
|
|
42
|
+
let hasUnSelectedDescendant = false;
|
|
43
|
+
const traverseDescendants = itemToTraverseId => {
|
|
44
|
+
if (filteredRowsLookup[itemToTraverseId] === false ||
|
|
45
|
+
// Perf: Skip checking the rest of the descendants if we already
|
|
46
|
+
// know that there is a selected and an unselected descendant
|
|
47
|
+
hasSelectedDescendant && hasUnSelectedDescendant) {
|
|
48
|
+
return;
|
|
40
49
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
isChecked: true
|
|
45
|
-
};
|
|
50
|
+
const node = rowTree[itemToTraverseId];
|
|
51
|
+
if (node?.type === 'group') {
|
|
52
|
+
node.children.forEach(traverseDescendants);
|
|
46
53
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const id = sortedRowIds[index];
|
|
52
|
-
if (filteredRowsLookup[id] !== false) {
|
|
53
|
-
selectableDescendantsCount += 1;
|
|
54
|
-
if (rowSelectionManager.has(id)) {
|
|
55
|
-
selectedDescendantsCount += 1;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
54
|
+
if (rowSelectionManager.has(itemToTraverseId)) {
|
|
55
|
+
hasSelectedDescendant = true;
|
|
56
|
+
} else {
|
|
57
|
+
hasUnSelectedDescendant = true;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
59
|
+
};
|
|
60
|
+
traverseDescendants(groupId);
|
|
61
|
+
return {
|
|
62
|
+
isIndeterminate: hasSelectedDescendant && hasUnSelectedDescendant,
|
|
63
|
+
isChecked: autoSelectParents ? hasSelectedDescendant && !hasUnSelectedDescendant : false
|
|
64
|
+
};
|
|
65
|
+
});
|
|
65
66
|
export function isMultipleRowSelectionEnabled(props) {
|
|
66
67
|
if (props.signature === GridSignature.DataGrid) {
|
|
67
68
|
// DataGrid Community has multiple row selection enabled only if checkbox selection is enabled.
|
|
@@ -218,12 +218,13 @@ export const useGridVirtualScroller = () => {
|
|
|
218
218
|
scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
|
|
219
219
|
const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
|
|
220
220
|
const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
221
|
+
if (!areRenderContextsEqual(nextRenderContext, renderContext)) {
|
|
222
|
+
// Prevents batching render context changes
|
|
223
|
+
ReactDOM.flushSync(() => {
|
|
224
|
+
updateRenderContext(nextRenderContext);
|
|
225
|
+
});
|
|
226
|
+
scrollTimeout.start(1000, triggerUpdateRenderContext);
|
|
227
|
+
}
|
|
227
228
|
return nextRenderContext;
|
|
228
229
|
});
|
|
229
230
|
const forceUpdateRenderContext = () => {
|
package/esm/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GridApiCommunity } from "./models/api/gridApiCommunity.js";
|
|
2
2
|
import { GridInitialStateCommunity, GridStateCommunity } from "./models/gridStateCommunity.js";
|
|
3
|
+
import "./material/index.js";
|
|
3
4
|
export { useGridApiContext } from "./hooks/utils/useGridApiContext.js";
|
|
4
5
|
export { useGridApiRef } from "./hooks/utils/useGridApiRef.js";
|
|
5
6
|
export { useGridRootProps } from "./hooks/utils/useGridRootProps.js";
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/x-data-grid v8.3.
|
|
2
|
+
* @mui/x-data-grid v8.3.1
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
6
6
|
* LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
+
import "./material/index.js";
|
|
8
9
|
export { useGridApiContext } from "./hooks/utils/useGridApiContext.js";
|
|
9
10
|
export { useGridApiRef } from "./hooks/utils/useGridApiRef.js";
|
|
10
11
|
export { useGridRootProps } from "./hooks/utils/useGridRootProps.js";
|
package/esm/locales/koKR.js
CHANGED
|
@@ -3,10 +3,9 @@ const koKRGrid = {
|
|
|
3
3
|
// Root
|
|
4
4
|
noRowsLabel: 'νμ΄ μμ΅λλ€.',
|
|
5
5
|
noResultsOverlayLabel: 'κ²°κ³Όκ°μ΄ μμ΅λλ€.',
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
noColumnsOverlayLabel: 'μ΄μ΄ μμ΅λλ€',
|
|
7
|
+
noColumnsOverlayManageColumns: 'μ΄ κ΄λ¦¬νκΈ°',
|
|
8
|
+
emptyPivotOverlayLabel: 'ν, μ΄, κ°μ μΆκ°νμ¬ νΌλ² ν
μ΄λΈμ λ§λλλ€.',
|
|
10
9
|
// Density selector toolbar button text
|
|
11
10
|
toolbarDensity: 'ν κ°κ²©',
|
|
12
11
|
toolbarDensityLabel: 'ν κ°κ²©',
|
|
@@ -33,11 +32,9 @@ const koKRGrid = {
|
|
|
33
32
|
toolbarExportPrint: 'νλ¦°νΈ',
|
|
34
33
|
toolbarExportExcel: 'Excelλ‘ λ΄λ³΄λ΄κΈ°',
|
|
35
34
|
// Toolbar pivot button
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
toolbarPivot: 'νΌλ²',
|
|
38
36
|
// Toolbar AI Assistant button
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
toolbarAssistant: 'AI μ΄μμ€ν΄νΈ',
|
|
41
38
|
// Columns management text
|
|
42
39
|
columnsManagementSearchTitle: 'κ²μ',
|
|
43
40
|
columnsManagementNoColumns: 'μ΄μ΄ μμ΅λλ€.',
|
|
@@ -99,15 +96,14 @@ const koKRGrid = {
|
|
|
99
96
|
'headerFilterOperator>=': 'κ°κ±°λ λ ν°',
|
|
100
97
|
'headerFilterOperator<': 'λ μμ',
|
|
101
98
|
'headerFilterOperator<=': 'κ°κ±°λ λ μμ',
|
|
102
|
-
|
|
103
|
-
|
|
99
|
+
headerFilterClear: 'νν° μ΄κΈ°ν',
|
|
104
100
|
// Filter values text
|
|
105
101
|
filterValueAny: 'μ무κ°',
|
|
106
102
|
filterValueTrue: 'μ°Έ',
|
|
107
103
|
filterValueFalse: 'κ±°μ§',
|
|
108
104
|
// Column menu text
|
|
109
105
|
columnMenuLabel: 'λ©λ΄',
|
|
110
|
-
|
|
106
|
+
columnMenuAriaLabel: columnName => `${columnName} μ΄ λ©λ΄`,
|
|
111
107
|
columnMenuShowColumns: 'μ΄ νμ',
|
|
112
108
|
columnMenuManageColumns: 'μ΄ κ΄λ¦¬',
|
|
113
109
|
columnMenuFilter: 'νν°',
|
|
@@ -156,18 +152,18 @@ const koKRGrid = {
|
|
|
156
152
|
collapseDetailPanel: 'μ κΈ°',
|
|
157
153
|
// Pagination
|
|
158
154
|
paginationRowsPerPage: 'νμ΄μ§ λΉ ν:',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
paginationDisplayedRows: ({
|
|
156
|
+
from,
|
|
157
|
+
to,
|
|
158
|
+
count,
|
|
159
|
+
estimated
|
|
160
|
+
}) => {
|
|
161
|
+
if (!estimated) {
|
|
162
|
+
return `${from}β${to} of ${count !== -1 ? count : `${to} μ΄μ`}`;
|
|
163
|
+
}
|
|
164
|
+
const estimatedLabel = estimated && estimated > to ? `μ½ ${estimated}` : `${to} μ΄μ`;
|
|
165
|
+
return `${from}β${to} of ${count !== -1 ? count : estimatedLabel}`;
|
|
166
|
+
},
|
|
171
167
|
paginationItemAriaLabel: type => {
|
|
172
168
|
if (type === 'first') {
|
|
173
169
|
return '첫 λ²μ§Έ νμ΄μ§λ‘ μ΄λ';
|
|
@@ -191,61 +187,57 @@ const koKRGrid = {
|
|
|
191
187
|
aggregationFunctionLabelMax: 'μ΅λκ°',
|
|
192
188
|
aggregationFunctionLabelSize: 'ν¬κΈ°',
|
|
193
189
|
// Pivot panel
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
190
|
+
pivotToggleLabel: 'νΌλ²',
|
|
191
|
+
pivotRows: 'ν',
|
|
192
|
+
pivotColumns: 'μ΄',
|
|
193
|
+
pivotValues: 'κ°',
|
|
194
|
+
pivotCloseButton: 'νΌλ² μ€μ λ«κΈ°',
|
|
195
|
+
pivotSearchButton: 'νλ κ²μ',
|
|
196
|
+
pivotSearchControlPlaceholder: 'νλ κ²μ',
|
|
197
|
+
pivotSearchControlLabel: 'νλ κ²μ',
|
|
198
|
+
pivotSearchControlClear: 'κ²μ μ΄κΈ°ν',
|
|
199
|
+
pivotNoFields: 'νλκ° μμ΅λλ€.',
|
|
200
|
+
pivotMenuMoveUp: 'μλ‘ μ΄λ',
|
|
201
|
+
pivotMenuMoveDown: 'μλλ‘ μ΄λ',
|
|
202
|
+
pivotMenuMoveToTop: 'μλ‘ μ΄λ',
|
|
203
|
+
pivotMenuMoveToBottom: 'μλλ‘ μ΄λ',
|
|
204
|
+
pivotMenuRows: 'ν',
|
|
205
|
+
pivotMenuColumns: 'μ΄',
|
|
206
|
+
pivotMenuValues: 'κ°',
|
|
207
|
+
pivotMenuOptions: 'νλ μ΅μ
',
|
|
208
|
+
pivotMenuAddToRows: 'νμ μΆκ°',
|
|
209
|
+
pivotMenuAddToColumns: 'μ΄μ μΆκ°',
|
|
210
|
+
pivotMenuAddToValues: 'κ°μ μΆκ°',
|
|
211
|
+
pivotMenuRemove: 'μ κ±°',
|
|
212
|
+
pivotDragToRows: 'ν μμ±',
|
|
213
|
+
pivotDragToColumns: 'μ΄ μμ±',
|
|
214
|
+
pivotDragToValues: 'κ° μμ±',
|
|
215
|
+
pivotYearColumnHeaderName: '(λ
)',
|
|
216
|
+
pivotQuarterColumnHeaderName: '(λΆκΈ°)',
|
|
222
217
|
// AI Assistant panel
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
218
|
+
aiAssistantPanelTitle: 'AI μ΄μμ€ν΄νΈ',
|
|
219
|
+
aiAssistantPanelClose: 'AI μ΄μμ€ν΄νΈ λ«κΈ°',
|
|
220
|
+
aiAssistantPanelNewConversation: 'μ λν',
|
|
221
|
+
aiAssistantPanelConversationHistory: 'λν κΈ°λ‘',
|
|
222
|
+
aiAssistantPanelEmptyConversation: 'ν둬ννΈ λ΄μμ΄ μμ΅λλ€.',
|
|
223
|
+
aiAssistantSuggestions: 'μ μ',
|
|
230
224
|
// Prompt field
|
|
231
225
|
promptFieldLabel: 'ν둬ννΈ μ
λ ₯',
|
|
232
226
|
promptFieldPlaceholder: 'ν둬ννΈ μ
λ ₯β¦',
|
|
233
227
|
promptFieldPlaceholderWithRecording: 'ν둬ννΈ μ
λ ₯ λλ λ
Ήμβ¦',
|
|
234
228
|
promptFieldPlaceholderListening: 'λ
Ήμ μ€β¦',
|
|
235
|
-
|
|
229
|
+
promptFieldSpeechRecognitionNotSupported: 'μ΄ λΈλΌμ°μ μμ μμ± μΈμμ μ§μνμ§ μμ΅λλ€.',
|
|
236
230
|
promptFieldSend: 'μ μ‘',
|
|
237
231
|
promptFieldRecord: 'λ
Ήμ',
|
|
238
|
-
promptFieldStopRecording: 'λ
Ήμ μ μ§'
|
|
239
|
-
|
|
232
|
+
promptFieldStopRecording: 'λ
Ήμ μ μ§',
|
|
240
233
|
// Prompt
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
234
|
+
promptRerun: 'λ€μ μ€ν',
|
|
235
|
+
promptProcessing: 'μ²λ¦¬ μ€β¦',
|
|
236
|
+
promptAppliedChanges: 'λ³κ²½μ¬ν μ μ©νκΈ°',
|
|
245
237
|
// Prompt changes
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
promptChangeGroupDescription: column => `${column} κ°μΌλ‘ κ·Έλ£Ή μμ±`,
|
|
239
|
+
promptChangeAggregationLabel: (column, aggregation) => `${column} (${aggregation})`,
|
|
240
|
+
promptChangeAggregationDescription: (column, aggregation) => `${column} (${aggregation}) μ§κ³`,
|
|
249
241
|
// promptChangeFilterLabel: (column: string, operator: string, value: string) => {
|
|
250
242
|
// if (operator === 'is any of') {
|
|
251
243
|
// return `${column} is any of: ${value}`;
|
|
@@ -258,13 +250,13 @@ const koKRGrid = {
|
|
|
258
250
|
// }
|
|
259
251
|
// return `Filter where ${column} ${operator} ${value}`;
|
|
260
252
|
// },
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
253
|
+
promptChangeSortDescription: (column, direction) => `${column} (${direction}) κΈ°μ€μΌλ‘ μ λ ¬`,
|
|
254
|
+
promptChangePivotEnableLabel: 'νΌλ²',
|
|
255
|
+
promptChangePivotEnableDescription: 'νΌλ² νμ±ν',
|
|
256
|
+
promptChangePivotColumnsLabel: count => `(${count}) κ°μ μ΄`,
|
|
257
|
+
promptChangePivotColumnsDescription: (column, direction) => `${column}${direction ? ` (${direction})` : ''}`,
|
|
258
|
+
promptChangePivotRowsLabel: count => `(${count}) κ°μ ν`,
|
|
259
|
+
promptChangePivotValuesLabel: count => `(${count}) κ°μ κ°`,
|
|
260
|
+
promptChangePivotValuesDescription: (column, aggregation) => `${column} (${aggregation})`
|
|
269
261
|
};
|
|
270
262
|
export const koKR = getGridLocalization(koKRGrid);
|