@mui/x-data-grid 6.9.0 → 6.9.2
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 +136 -8
- package/DataGrid/DataGrid.js +4 -1
- package/DataGrid/useDataGridComponent.js +1 -1
- package/README.md +1 -1
- package/colDef/gridActionsColDef.js +2 -1
- package/colDef/gridBooleanColDef.js +1 -0
- package/colDef/gridBooleanOperators.js +5 -6
- package/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/colDef/gridDateColDef.js +2 -0
- package/colDef/gridDateOperators.js +14 -19
- package/colDef/gridNumericColDef.js +3 -1
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridNumericOperators.js +24 -43
- package/colDef/gridSingleSelectOperators.js +9 -14
- package/colDef/gridStringColDef.js +3 -1
- package/colDef/gridStringOperators.d.ts +2 -2
- package/colDef/gridStringOperators.js +22 -36
- package/colDef/utils.d.ts +21 -0
- package/colDef/utils.js +51 -0
- package/components/GridPagination.js +16 -3
- package/components/cell/GridCell.js +1 -1
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.js +3 -3
- package/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/hooks/features/editing/useGridEditing.js +2 -1
- package/hooks/features/editing/useGridRowEditing.js +2 -2
- package/hooks/features/filter/gridFilterState.d.ts +6 -5
- package/hooks/features/filter/gridFilterUtils.d.ts +8 -6
- package/hooks/features/filter/gridFilterUtils.js +115 -57
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +34 -25
- package/hooks/features/pagination/gridPaginationSelector.js +10 -5
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -0
- package/hooks/features/rows/gridRowsUtils.js +1 -0
- package/hooks/features/rows/useGridParamsApi.d.ts +2 -1
- package/hooks/features/rows/useGridParamsApi.js +31 -1
- package/hooks/features/rows/useGridRows.js +4 -3
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +1 -0
- package/joy/joySlots.js +29 -8
- package/legacy/DataGrid/DataGrid.js +4 -1
- package/legacy/DataGrid/useDataGridComponent.js +1 -1
- package/legacy/colDef/gridActionsColDef.js +2 -1
- package/legacy/colDef/gridBooleanColDef.js +1 -0
- package/legacy/colDef/gridBooleanOperators.js +5 -5
- package/legacy/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/legacy/colDef/gridDateColDef.js +2 -0
- package/legacy/colDef/gridDateOperators.js +14 -16
- package/legacy/colDef/gridNumericColDef.js +3 -1
- package/legacy/colDef/gridNumericOperators.js +24 -33
- package/legacy/colDef/gridSingleSelectOperators.js +9 -11
- package/legacy/colDef/gridStringColDef.js +3 -1
- package/legacy/colDef/gridStringOperators.js +22 -28
- package/legacy/colDef/utils.js +51 -0
- package/legacy/components/GridPagination.js +16 -3
- package/legacy/components/cell/GridCell.js +2 -1
- package/legacy/components/cell/GridEditDateCell.js +1 -1
- package/legacy/components/cell/GridEditInputCell.js +3 -3
- package/legacy/hooks/features/columns/gridColumnsUtils.js +4 -1
- package/legacy/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/legacy/hooks/features/editing/useGridEditing.js +2 -1
- package/legacy/hooks/features/editing/useGridRowEditing.js +2 -2
- package/legacy/hooks/features/filter/gridFilterUtils.js +115 -65
- package/legacy/hooks/features/filter/useGridFilter.js +32 -24
- package/legacy/hooks/features/pagination/gridPaginationSelector.js +10 -5
- package/legacy/hooks/features/rows/gridRowsUtils.js +1 -0
- package/legacy/hooks/features/rows/useGridParamsApi.js +29 -1
- package/legacy/hooks/features/rows/useGridRows.js +15 -16
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -0
- package/legacy/joy/joySlots.js +29 -8
- package/legacy/locales/esES.js +3 -3
- package/legacy/locales/huHU.js +23 -25
- package/legacy/locales/roRO.js +34 -38
- package/locales/esES.js +3 -3
- package/locales/huHU.js +23 -25
- package/locales/roRO.js +34 -38
- package/models/api/gridEditingApi.d.ts +1 -1
- package/models/api/gridParamsApi.d.ts +22 -1
- package/models/colDef/gridColDef.d.ts +13 -1
- package/models/gridFilterOperator.d.ts +17 -2
- package/models/gridRows.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +4 -1
- package/modern/DataGrid/DataGrid.js +4 -1
- package/modern/DataGrid/useDataGridComponent.js +1 -1
- package/modern/colDef/gridActionsColDef.js +2 -1
- package/modern/colDef/gridBooleanColDef.js +1 -0
- package/modern/colDef/gridBooleanOperators.js +5 -6
- package/modern/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/modern/colDef/gridDateColDef.js +2 -0
- package/modern/colDef/gridDateOperators.js +14 -19
- package/modern/colDef/gridNumericColDef.js +3 -1
- package/modern/colDef/gridNumericOperators.js +24 -43
- package/modern/colDef/gridSingleSelectOperators.js +9 -14
- package/modern/colDef/gridStringColDef.js +3 -1
- package/modern/colDef/gridStringOperators.js +22 -36
- package/modern/colDef/utils.js +51 -0
- package/modern/components/GridPagination.js +16 -2
- package/modern/components/cell/GridCell.js +1 -1
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +3 -3
- package/modern/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/modern/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/modern/hooks/features/editing/useGridEditing.js +1 -1
- package/modern/hooks/features/editing/useGridRowEditing.js +2 -2
- package/modern/hooks/features/filter/gridFilterUtils.js +110 -54
- package/modern/hooks/features/filter/useGridFilter.js +34 -25
- package/modern/hooks/features/pagination/gridPaginationSelector.js +9 -5
- package/modern/hooks/features/rows/gridRowsUtils.js +1 -0
- package/modern/hooks/features/rows/useGridParamsApi.js +29 -1
- package/modern/hooks/features/rows/useGridRows.js +4 -3
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/joy/joySlots.js +29 -7
- package/modern/locales/esES.js +3 -3
- package/modern/locales/huHU.js +23 -25
- package/modern/locales/roRO.js +34 -38
- package/node/DataGrid/DataGrid.js +4 -1
- package/node/DataGrid/useDataGridComponent.js +1 -1
- package/node/colDef/gridActionsColDef.js +2 -1
- package/node/colDef/gridBooleanColDef.js +1 -0
- package/node/colDef/gridBooleanOperators.js +5 -6
- package/node/colDef/gridCheckboxSelectionColDef.js +1 -0
- package/node/colDef/gridDateColDef.js +2 -0
- package/node/colDef/gridDateOperators.js +14 -19
- package/node/colDef/gridNumericColDef.js +3 -1
- package/node/colDef/gridNumericOperators.js +24 -43
- package/node/colDef/gridSingleSelectOperators.js +9 -14
- package/node/colDef/gridStringColDef.js +3 -1
- package/node/colDef/gridStringOperators.js +22 -36
- package/node/colDef/utils.js +64 -0
- package/node/components/GridPagination.js +16 -2
- package/node/components/cell/GridCell.js +1 -1
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +3 -3
- package/node/hooks/features/columns/gridColumnsUtils.js +2 -1
- package/node/hooks/features/dimensions/useGridDimensions.js +2 -2
- package/node/hooks/features/editing/useGridEditing.js +1 -1
- package/node/hooks/features/editing/useGridRowEditing.js +1 -1
- package/node/hooks/features/filter/gridFilterUtils.js +110 -54
- package/node/hooks/features/filter/useGridFilter.js +33 -24
- package/node/hooks/features/pagination/gridPaginationSelector.js +9 -5
- package/node/hooks/features/rows/gridRowsUtils.js +3 -1
- package/node/hooks/features/rows/useGridParamsApi.js +29 -1
- package/node/hooks/features/rows/useGridRows.js +3 -2
- package/node/index.js +1 -1
- package/node/internals/index.js +13 -1
- package/node/joy/joySlots.js +29 -7
- package/node/locales/esES.js +3 -3
- package/node/locales/huHU.js +23 -25
- package/node/locales/roRO.js +34 -38
- package/package.json +2 -2
|
@@ -100,12 +100,12 @@ var GridEditInputCell = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
100
100
|
return _ref2.apply(this, arguments);
|
|
101
101
|
};
|
|
102
102
|
}(), [apiRef, debounceMs, field, id, onValueChange]);
|
|
103
|
-
var meta = apiRef.current.unstable_getEditCellMeta
|
|
103
|
+
var meta = apiRef.current.unstable_getEditCellMeta(id, field);
|
|
104
104
|
React.useEffect(function () {
|
|
105
|
-
if (meta.changeReason !== 'debouncedSetEditCellValue') {
|
|
105
|
+
if ((meta == null ? void 0 : meta.changeReason) !== 'debouncedSetEditCellValue') {
|
|
106
106
|
setValueState(value);
|
|
107
107
|
}
|
|
108
|
-
}, [meta
|
|
108
|
+
}, [meta, value]);
|
|
109
109
|
useEnhancedEffect(function () {
|
|
110
110
|
if (hasFocus) {
|
|
111
111
|
inputRef.current.focus();
|
|
@@ -17,6 +17,9 @@ export function computeFlexColumnsWidth(_ref) {
|
|
|
17
17
|
var initialFreeSpace = _ref.initialFreeSpace,
|
|
18
18
|
totalFlexUnits = _ref.totalFlexUnits,
|
|
19
19
|
flexColumns = _ref.flexColumns;
|
|
20
|
+
var uniqueFlexColumns = new Set(flexColumns.map(function (col) {
|
|
21
|
+
return col.field;
|
|
22
|
+
}));
|
|
20
23
|
var flexColumnsLookup = {
|
|
21
24
|
all: {},
|
|
22
25
|
frozenFields: [],
|
|
@@ -32,7 +35,7 @@ export function computeFlexColumnsWidth(_ref) {
|
|
|
32
35
|
// Step 5 of https://drafts.csswg.org/css-flexbox-1/#resolve-flexible-lengths
|
|
33
36
|
function loopOverFlexItems() {
|
|
34
37
|
// 5a: If all the flex items on the line are frozen, free space has been distributed.
|
|
35
|
-
if (flexColumnsLookup.frozenFields.length ===
|
|
38
|
+
if (flexColumnsLookup.frozenFields.length === uniqueFlexColumns.size) {
|
|
36
39
|
return;
|
|
37
40
|
}
|
|
38
41
|
var violationsLookup = {
|
|
@@ -73,7 +73,7 @@ export function useGridDimensions(apiRef, props) {
|
|
|
73
73
|
var hasScrollY;
|
|
74
74
|
if (props.autoHeight) {
|
|
75
75
|
hasScrollY = false;
|
|
76
|
-
hasScrollX = Math.round(columnsTotalWidth) > rootDimensionsRef.current.width;
|
|
76
|
+
hasScrollX = Math.round(columnsTotalWidth) > Math.round(rootDimensionsRef.current.width);
|
|
77
77
|
viewportOuterSize = {
|
|
78
78
|
width: rootDimensionsRef.current.width,
|
|
79
79
|
height: rowsMeta.currentPageTotalHeight + (hasScrollX ? scrollBarSize : 0)
|
|
@@ -89,7 +89,7 @@ export function useGridDimensions(apiRef, props) {
|
|
|
89
89
|
height: rowsMeta.currentPageTotalHeight
|
|
90
90
|
},
|
|
91
91
|
container: {
|
|
92
|
-
width: viewportOuterSize.width,
|
|
92
|
+
width: Math.round(viewportOuterSize.width),
|
|
93
93
|
height: viewportOuterSize.height - pinnedRowsHeight.top - pinnedRowsHeight.bottom
|
|
94
94
|
},
|
|
95
95
|
scrollBarSize: scrollBarSize
|
|
@@ -127,8 +127,9 @@ export var useGridEditing = function useGridEditing(apiRef, props) {
|
|
|
127
127
|
return props.editMode === GridEditModes.Cell ? apiRef.current.getRowWithUpdatedValuesFromCellEditing(id, field) : apiRef.current.getRowWithUpdatedValuesFromRowEditing(id);
|
|
128
128
|
}, [apiRef, props.editMode]);
|
|
129
129
|
var getEditCellMeta = React.useCallback(function (id, field) {
|
|
130
|
+
var _editingState$id$fiel, _editingState$id;
|
|
130
131
|
var editingState = gridEditRowsStateSelector(apiRef.current.state);
|
|
131
|
-
return editingState[id][field];
|
|
132
|
+
return (_editingState$id$fiel = (_editingState$id = editingState[id]) == null ? void 0 : _editingState$id[field]) != null ? _editingState$id$fiel : null;
|
|
132
133
|
}, [apiRef]);
|
|
133
134
|
var editingSharedApi = {
|
|
134
135
|
isCellEditable: isCellEditable,
|
|
@@ -12,7 +12,7 @@ import { GridEditModes, GridRowModes } from '../../../models/gridEditRowModel';
|
|
|
12
12
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
13
13
|
import { gridEditRowsStateSelector } from './gridEditingSelectors';
|
|
14
14
|
import { isPrintableKey } from '../../../utils/keyboardUtils';
|
|
15
|
-
import { gridColumnFieldsSelector } from '../columns/gridColumnsSelector';
|
|
15
|
+
import { gridColumnFieldsSelector, gridVisibleColumnFieldsSelector } from '../columns/gridColumnsSelector';
|
|
16
16
|
import { buildWarning } from '../../../utils/warning';
|
|
17
17
|
import { gridRowsDataRowIdToIdLookupSelector } from '../rows/gridRowsSelector';
|
|
18
18
|
import { deepClone } from '../../../utils/utils';
|
|
@@ -120,7 +120,7 @@ export var useGridRowEditing = function useGridRowEditing(apiRef, props) {
|
|
|
120
120
|
} else if (event.key === 'Enter') {
|
|
121
121
|
reason = GridRowEditStopReasons.enterKeyDown;
|
|
122
122
|
} else if (event.key === 'Tab') {
|
|
123
|
-
var columnFields =
|
|
123
|
+
var columnFields = gridVisibleColumnFieldsSelector(apiRef).filter(function (field) {
|
|
124
124
|
var column = apiRef.current.getColumn(field);
|
|
125
125
|
if (column.type === GRID_ACTIONS_COLUMN_TYPE) {
|
|
126
126
|
return true;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GridLogicOperator } from '../../../models';
|
|
3
|
+
import { GLOBAL_API_REF, isInternalFilter } from '../../../colDef/utils';
|
|
3
4
|
import { getDefaultGridFilterModel } from './gridFilterState';
|
|
4
5
|
import { buildWarning } from '../../../utils/warning';
|
|
5
6
|
import { gridColumnFieldsSelector, gridColumnLookupSelector } from '../columns';
|
|
@@ -99,27 +100,47 @@ var getFilterCallbackFromItem = function getFilterCallbackFromItem(filterItem, a
|
|
|
99
100
|
if (!filterOperator) {
|
|
100
101
|
throw new Error("MUI: No filter operator found for column '".concat(column.field, "' and operator value '").concat(newFilterItem.operator, "'."));
|
|
101
102
|
}
|
|
103
|
+
var hasUserFunctionLegacy = !isInternalFilter(filterOperator.getApplyFilterFn);
|
|
104
|
+
var hasUserFunctionV7 = !isInternalFilter(filterOperator.getApplyFilterFnV7);
|
|
105
|
+
if (filterOperator.getApplyFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
|
|
106
|
+
var _applyFilterOnRow = filterOperator.getApplyFilterFnV7(newFilterItem, column);
|
|
107
|
+
if (typeof _applyFilterOnRow !== 'function') {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
v7: true,
|
|
112
|
+
item: newFilterItem,
|
|
113
|
+
fn: function fn(row) {
|
|
114
|
+
var value = apiRef.current.getRowValue(row, column);
|
|
115
|
+
return _applyFilterOnRow(value, row, column, apiRef);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}
|
|
102
119
|
var applyFilterOnRow = filterOperator.getApplyFilterFn(newFilterItem, column);
|
|
103
120
|
if (typeof applyFilterOnRow !== 'function') {
|
|
104
121
|
return null;
|
|
105
122
|
}
|
|
106
|
-
var fn = function fn(rowId) {
|
|
107
|
-
var cellParams = apiRef.current.getCellParams(rowId, newFilterItem.field);
|
|
108
|
-
return applyFilterOnRow(cellParams);
|
|
109
|
-
};
|
|
110
123
|
return {
|
|
111
|
-
|
|
112
|
-
item: newFilterItem
|
|
124
|
+
v7: false,
|
|
125
|
+
item: newFilterItem,
|
|
126
|
+
fn: function fn(rowId) {
|
|
127
|
+
var params = apiRef.current.getCellParams(rowId, newFilterItem.field);
|
|
128
|
+
GLOBAL_API_REF.current = apiRef;
|
|
129
|
+
var result = applyFilterOnRow(params);
|
|
130
|
+
GLOBAL_API_REF.current = null;
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
113
133
|
};
|
|
114
134
|
};
|
|
115
135
|
|
|
116
136
|
/**
|
|
117
137
|
* Generates a method to easily check if a row is matching the current filter model.
|
|
138
|
+
* @param {GridRowIdGetter | undefined} getRowId The getter for row's id.
|
|
118
139
|
* @param {GridFilterModel} filterModel The model with which we want to filter the rows.
|
|
119
140
|
* @param {React.MutableRefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
120
141
|
* @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.
|
|
121
142
|
*/
|
|
122
|
-
export var buildAggregatedFilterItemsApplier = function buildAggregatedFilterItemsApplier(filterModel, apiRef) {
|
|
143
|
+
export var buildAggregatedFilterItemsApplier = function buildAggregatedFilterItemsApplier(getRowId, filterModel, apiRef) {
|
|
123
144
|
var items = filterModel.items;
|
|
124
145
|
var appliers = items.map(function (item) {
|
|
125
146
|
return getFilterCallbackFromItem(item, apiRef);
|
|
@@ -129,83 +150,112 @@ export var buildAggregatedFilterItemsApplier = function buildAggregatedFilterIte
|
|
|
129
150
|
if (appliers.length === 0) {
|
|
130
151
|
return null;
|
|
131
152
|
}
|
|
132
|
-
return function (
|
|
153
|
+
return function (row, shouldApplyFilter) {
|
|
133
154
|
var resultPerItemId = {};
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
155
|
+
for (var i = 0; i < appliers.length; i += 1) {
|
|
156
|
+
var applier = appliers[i];
|
|
157
|
+
if (!shouldApplyFilter || shouldApplyFilter(applier.item.field)) {
|
|
158
|
+
resultPerItemId[applier.item.id] = applier.v7 ? applier.fn(row) : applier.fn(getRowId ? getRowId(row) : row.id);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
140
161
|
return resultPerItemId;
|
|
141
162
|
};
|
|
142
163
|
};
|
|
143
164
|
|
|
144
165
|
/**
|
|
145
166
|
* Generates a method to easily check if a row is matching the current quick filter.
|
|
146
|
-
* @param {
|
|
167
|
+
* @param {GridRowIdGetter | undefined} getRowId The getter for row's id.
|
|
168
|
+
* @param {any[]} filterModel The model with which we want to filter the rows.
|
|
147
169
|
* @param {React.MutableRefObject<GridApiCommunity>} apiRef The API of the grid.
|
|
148
170
|
* @returns {GridAggregatedFilterItemApplier | null} A method that checks if a row is matching the current filter model. If `null`, we consider that all the rows are matching the filters.
|
|
149
171
|
*/
|
|
150
|
-
export var buildAggregatedQuickFilterApplier = function buildAggregatedQuickFilterApplier(filterModel, apiRef) {
|
|
151
|
-
var _filterModel$quickFil
|
|
152
|
-
|
|
172
|
+
export var buildAggregatedQuickFilterApplier = function buildAggregatedQuickFilterApplier(getRowId, filterModel, apiRef) {
|
|
173
|
+
var _filterModel$quickFil, _filterModel$quickFil2;
|
|
174
|
+
var quickFilterValues = (_filterModel$quickFil = (_filterModel$quickFil2 = filterModel.quickFilterValues) == null ? void 0 : _filterModel$quickFil2.filter(Boolean)) != null ? _filterModel$quickFil : [];
|
|
153
175
|
if (quickFilterValues.length === 0) {
|
|
154
176
|
return null;
|
|
155
177
|
}
|
|
156
|
-
var
|
|
157
|
-
var appliersPerField =
|
|
158
|
-
|
|
178
|
+
var columnFields = gridColumnFieldsSelector(apiRef);
|
|
179
|
+
var appliersPerField = [];
|
|
180
|
+
columnFields.forEach(function (field) {
|
|
159
181
|
var column = apiRef.current.getColumn(field);
|
|
160
182
|
var getApplyQuickFilterFn = column == null ? void 0 : column.getApplyQuickFilterFn;
|
|
161
|
-
|
|
162
|
-
|
|
183
|
+
var getApplyQuickFilterFnV7 = column == null ? void 0 : column.getApplyQuickFilterFnV7;
|
|
184
|
+
var hasUserFunctionLegacy = !isInternalFilter(getApplyQuickFilterFn);
|
|
185
|
+
var hasUserFunctionV7 = !isInternalFilter(getApplyQuickFilterFnV7);
|
|
186
|
+
if (getApplyQuickFilterFnV7 && !(hasUserFunctionLegacy && !hasUserFunctionV7)) {
|
|
187
|
+
appliersPerField.push({
|
|
188
|
+
column: column,
|
|
189
|
+
appliers: quickFilterValues.map(function (value) {
|
|
190
|
+
return {
|
|
191
|
+
v7: true,
|
|
192
|
+
fn: getApplyQuickFilterFnV7(value, column, apiRef)
|
|
193
|
+
};
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
} else if (getApplyQuickFilterFn) {
|
|
197
|
+
appliersPerField.push({
|
|
198
|
+
column: column,
|
|
199
|
+
appliers: quickFilterValues.map(function (value) {
|
|
200
|
+
return {
|
|
201
|
+
v7: false,
|
|
202
|
+
fn: getApplyQuickFilterFn(value, column, apiRef)
|
|
203
|
+
};
|
|
204
|
+
})
|
|
205
|
+
});
|
|
163
206
|
}
|
|
164
|
-
appliersPerField[field] = quickFilterValues.map(function (value) {
|
|
165
|
-
return getApplyQuickFilterFn(value, column, apiRef);
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
// If some value does not have an applier we ignore them
|
|
170
|
-
var sanitizedQuickFilterValues = quickFilterValues.filter(function (value, index) {
|
|
171
|
-
return Object.keys(appliersPerField).some(function (field) {
|
|
172
|
-
return appliersPerField[field][index] != null;
|
|
173
|
-
});
|
|
174
207
|
});
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
return function (rowId, shouldApplyFilter) {
|
|
208
|
+
return function isRowMatchingQuickFilter(row, shouldApplyFilter) {
|
|
209
|
+
var result = {};
|
|
179
210
|
var usedCellParams = {};
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
if (appliersPerField[field][index] == null) {
|
|
192
|
-
return false;
|
|
211
|
+
|
|
212
|
+
/* eslint-disable no-restricted-syntax, no-labels, no-continue */
|
|
213
|
+
outer: for (var v = 0; v < quickFilterValues.length; v += 1) {
|
|
214
|
+
var filterValue = quickFilterValues[v];
|
|
215
|
+
for (var i = 0; i < appliersPerField.length; i += 1) {
|
|
216
|
+
var _appliersPerField$i = appliersPerField[i],
|
|
217
|
+
column = _appliersPerField$i.column,
|
|
218
|
+
appliers = _appliersPerField$i.appliers;
|
|
219
|
+
var _field = column.field;
|
|
220
|
+
if (shouldApplyFilter && !shouldApplyFilter(_field)) {
|
|
221
|
+
continue;
|
|
193
222
|
}
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
223
|
+
var applier = appliers[v];
|
|
224
|
+
var value = apiRef.current.getRowValue(row, column);
|
|
225
|
+
if (applier.fn === null) {
|
|
226
|
+
continue;
|
|
227
|
+
}
|
|
228
|
+
if (applier.v7) {
|
|
229
|
+
var isMatching = applier.fn(value, row, column, apiRef);
|
|
230
|
+
if (isMatching) {
|
|
231
|
+
result[filterValue] = true;
|
|
232
|
+
continue outer;
|
|
233
|
+
}
|
|
234
|
+
} else {
|
|
235
|
+
var _usedCellParams$_fiel;
|
|
236
|
+
var cellParams = (_usedCellParams$_fiel = usedCellParams[_field]) != null ? _usedCellParams$_fiel : apiRef.current.getCellParams(getRowId ? getRowId(row) : row.id, _field);
|
|
237
|
+
usedCellParams[_field] = cellParams;
|
|
238
|
+
var _isMatching = applier.fn(cellParams);
|
|
239
|
+
if (_isMatching) {
|
|
240
|
+
result[filterValue] = true;
|
|
241
|
+
continue outer;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
result[filterValue] = false;
|
|
246
|
+
}
|
|
247
|
+
/* eslint-enable no-restricted-syntax, no-labels, no-continue */
|
|
248
|
+
|
|
249
|
+
return result;
|
|
199
250
|
};
|
|
200
251
|
};
|
|
201
|
-
export var buildAggregatedFilterApplier = function buildAggregatedFilterApplier(filterModel, apiRef) {
|
|
202
|
-
var isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(filterModel, apiRef);
|
|
203
|
-
var isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(filterModel, apiRef);
|
|
204
|
-
return function (
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
};
|
|
252
|
+
export var buildAggregatedFilterApplier = function buildAggregatedFilterApplier(getRowId, filterModel, apiRef) {
|
|
253
|
+
var isRowMatchingFilterItems = buildAggregatedFilterItemsApplier(getRowId, filterModel, apiRef);
|
|
254
|
+
var isRowMatchingQuickFilter = buildAggregatedQuickFilterApplier(getRowId, filterModel, apiRef);
|
|
255
|
+
return function isRowMatchingFilters(row, shouldApplyFilter, result) {
|
|
256
|
+
var _isRowMatchingFilterI, _isRowMatchingQuickFi;
|
|
257
|
+
result.passingFilterItems = (_isRowMatchingFilterI = isRowMatchingFilterItems == null ? void 0 : isRowMatchingFilterItems(row, shouldApplyFilter)) != null ? _isRowMatchingFilterI : null;
|
|
258
|
+
result.passingQuickFilterValues = (_isRowMatchingQuickFi = isRowMatchingQuickFilter == null ? void 0 : isRowMatchingQuickFilter(row, shouldApplyFilter)) != null ? _isRowMatchingQuickFi : null;
|
|
209
259
|
};
|
|
210
260
|
};
|
|
211
261
|
var isNotNull = function isNotNull(result) {
|
|
@@ -249,14 +299,14 @@ export var passFilterLogic = function passFilterLogic(allFilterItemResults, allQ
|
|
|
249
299
|
|
|
250
300
|
// get result for quick filter model
|
|
251
301
|
if (cleanedQuickFilterResults.length > 0 && filterModel.quickFilterValues != null) {
|
|
252
|
-
var _filterModel$
|
|
302
|
+
var _filterModel$quickFil3;
|
|
253
303
|
// Return true if the item pass with one of the rows
|
|
254
304
|
var quickFilterValuePredicate = function quickFilterValuePredicate(value) {
|
|
255
305
|
return cleanedQuickFilterResults.some(function (quickFilterValueResult) {
|
|
256
306
|
return quickFilterValueResult[value];
|
|
257
307
|
});
|
|
258
308
|
};
|
|
259
|
-
var quickFilterLogicOperator = (_filterModel$
|
|
309
|
+
var quickFilterLogicOperator = (_filterModel$quickFil3 = filterModel.quickFilterLogicOperator) != null ? _filterModel$quickFil3 : getDefaultGridFilterModel().quickFilterLogicOperator;
|
|
260
310
|
if (quickFilterLogicOperator === GridLogicOperator.And) {
|
|
261
311
|
var passesAllQuickFilterValues = filterModel.quickFilterValues.every(quickFilterValuePredicate);
|
|
262
312
|
if (!passesAllQuickFilterValues) {
|
|
@@ -10,7 +10,7 @@ import { GridPreferencePanelsValue } from '../preferencesPanel/gridPreferencePan
|
|
|
10
10
|
import { getDefaultGridFilterModel } from './gridFilterState';
|
|
11
11
|
import { gridFilterModelSelector } from './gridFilterSelector';
|
|
12
12
|
import { useFirstRender } from '../../utils/useFirstRender';
|
|
13
|
-
import {
|
|
13
|
+
import { gridRowsLookupSelector } from '../rows';
|
|
14
14
|
import { useGridRegisterPipeProcessor } from '../../core/pipeProcessing';
|
|
15
15
|
import { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from '../../core/strategyProcessing';
|
|
16
16
|
import { buildAggregatedFilterApplier, sanitizeFilterModel, mergeStateWithFilterModel, cleanFilterItem, passFilterLogic } from './gridFilterUtils';
|
|
@@ -56,7 +56,7 @@ export var useGridFilter = function useGridFilter(apiRef, props) {
|
|
|
56
56
|
var updateFilteredRows = React.useCallback(function () {
|
|
57
57
|
apiRef.current.setState(function (state) {
|
|
58
58
|
var filterModel = gridFilterModelSelector(state, apiRef.current.instanceId);
|
|
59
|
-
var isRowMatchingFilters = props.filterMode === 'client' ? buildAggregatedFilterApplier(filterModel, apiRef) : null;
|
|
59
|
+
var isRowMatchingFilters = props.filterMode === 'client' ? buildAggregatedFilterApplier(props.getRowId, filterModel, apiRef) : null;
|
|
60
60
|
var filteringResult = apiRef.current.applyStrategyProcessor('filtering', {
|
|
61
61
|
isRowMatchingFilters: isRowMatchingFilters,
|
|
62
62
|
filterModel: filterModel != null ? filterModel : getDefaultGridFilterModel()
|
|
@@ -70,7 +70,7 @@ export var useGridFilter = function useGridFilter(apiRef, props) {
|
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
apiRef.current.publishEvent('filteredRowsSet');
|
|
73
|
-
}, [props.filterMode,
|
|
73
|
+
}, [apiRef, props.filterMode, props.getRowId]);
|
|
74
74
|
var addColumnMenuItem = React.useCallback(function (columnMenuItems, colDef) {
|
|
75
75
|
if (colDef == null || colDef.filterable === false || props.disableColumnFilter) {
|
|
76
76
|
return columnMenuItems;
|
|
@@ -267,35 +267,43 @@ export var useGridFilter = function useGridFilter(apiRef, props) {
|
|
|
267
267
|
}
|
|
268
268
|
return initialValue;
|
|
269
269
|
}, [props.slots.filterPanel, (_props$slotProps2 = props.slotProps) == null ? void 0 : _props$slotProps2.filterPanel]);
|
|
270
|
+
var dataRowIdToIdLookup = apiRef.current.state.rows.dataRowIdToModelLookup;
|
|
271
|
+
var rows = React.useMemo(function () {
|
|
272
|
+
return Object.values(dataRowIdToIdLookup);
|
|
273
|
+
}, [dataRowIdToIdLookup]);
|
|
274
|
+
var getRowId = props.getRowId;
|
|
270
275
|
var flatFilteringMethod = React.useCallback(function (params) {
|
|
271
|
-
if (props.filterMode
|
|
272
|
-
var tree = gridRowTreeSelector(apiRef);
|
|
273
|
-
var rowIds = tree[GRID_ROOT_GROUP_ID].children;
|
|
274
|
-
var filteredRowsLookup = {};
|
|
275
|
-
var filterCache = {};
|
|
276
|
-
for (var i = 0; i < rowIds.length; i += 1) {
|
|
277
|
-
var rowId = rowIds[i];
|
|
278
|
-
var isRowPassing = void 0;
|
|
279
|
-
if (typeof rowId === 'string' && rowId.startsWith('auto-generated-group-footer')) {
|
|
280
|
-
isRowPassing = true;
|
|
281
|
-
} else {
|
|
282
|
-
var _params$isRowMatching = params.isRowMatchingFilters(rowId),
|
|
283
|
-
passingFilterItems = _params$isRowMatching.passingFilterItems,
|
|
284
|
-
passingQuickFilterValues = _params$isRowMatching.passingQuickFilterValues;
|
|
285
|
-
isRowPassing = passFilterLogic([passingFilterItems], [passingQuickFilterValues], params.filterModel, apiRef, filterCache);
|
|
286
|
-
}
|
|
287
|
-
filteredRowsLookup[rowId] = isRowPassing;
|
|
288
|
-
}
|
|
276
|
+
if (props.filterMode !== 'client' || !params.isRowMatchingFilters) {
|
|
289
277
|
return {
|
|
290
|
-
filteredRowsLookup:
|
|
278
|
+
filteredRowsLookup: {},
|
|
291
279
|
filteredDescendantCountLookup: {}
|
|
292
280
|
};
|
|
293
281
|
}
|
|
282
|
+
var dataRowIdToModelLookup = gridRowsLookupSelector(apiRef);
|
|
283
|
+
var filteredRowsLookup = {};
|
|
284
|
+
var isRowMatchingFilters = params.isRowMatchingFilters;
|
|
285
|
+
var filterCache = {};
|
|
286
|
+
var result = {
|
|
287
|
+
passingFilterItems: null,
|
|
288
|
+
passingQuickFilterValues: null
|
|
289
|
+
};
|
|
290
|
+
for (var i = 0; i < rows.length; i += 1) {
|
|
291
|
+
var row = rows[i];
|
|
292
|
+
var id = getRowId ? getRowId(row) : row.id;
|
|
293
|
+
isRowMatchingFilters(row, undefined, result);
|
|
294
|
+
var isRowPassing = passFilterLogic([result.passingFilterItems], [result.passingQuickFilterValues], params.filterModel, apiRef, filterCache);
|
|
295
|
+
filteredRowsLookup[id] = isRowPassing;
|
|
296
|
+
}
|
|
297
|
+
var footerId = 'auto-generated-group-footer-root';
|
|
298
|
+
var footer = dataRowIdToModelLookup[footerId];
|
|
299
|
+
if (footer) {
|
|
300
|
+
filteredRowsLookup[footerId] = true;
|
|
301
|
+
}
|
|
294
302
|
return {
|
|
295
|
-
filteredRowsLookup:
|
|
303
|
+
filteredRowsLookup: filteredRowsLookup,
|
|
296
304
|
filteredDescendantCountLookup: {}
|
|
297
305
|
};
|
|
298
|
-
}, [apiRef, props.filterMode]);
|
|
306
|
+
}, [apiRef, rows, props.filterMode, getRowId]);
|
|
299
307
|
useGridRegisterPipeProcessor(apiRef, 'columnMenu', addColumnMenuItem);
|
|
300
308
|
useGridRegisterPipeProcessor(apiRef, 'exportState', stateExportPreProcessing);
|
|
301
309
|
useGridRegisterPipeProcessor(apiRef, 'restoreState', stateRestorePreProcessing);
|
|
@@ -72,13 +72,18 @@ export var gridPaginationRowRangeSelector = createSelectorMemoized(gridPaginatio
|
|
|
72
72
|
var lastRowIndex = firstRowIndex;
|
|
73
73
|
var topLevelRowAdded = 0;
|
|
74
74
|
while (lastRowIndex < visibleSortedRowEntries.length && topLevelRowAdded <= topLevelRowsInCurrentPageCount) {
|
|
75
|
+
var _rowTree$row$id;
|
|
75
76
|
var row = visibleSortedRowEntries[lastRowIndex];
|
|
76
|
-
var depth = rowTree[row.id].depth;
|
|
77
|
-
if (
|
|
77
|
+
var depth = (_rowTree$row$id = rowTree[row.id]) == null ? void 0 : _rowTree$row$id.depth;
|
|
78
|
+
if (depth === undefined) {
|
|
78
79
|
lastRowIndex += 1;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
} else {
|
|
81
|
+
if (topLevelRowAdded < topLevelRowsInCurrentPageCount || depth > 0) {
|
|
82
|
+
lastRowIndex += 1;
|
|
83
|
+
}
|
|
84
|
+
if (depth === 0) {
|
|
85
|
+
topLevelRowAdded += 1;
|
|
86
|
+
}
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
return {
|
|
@@ -3,6 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import { gridPinnedRowsSelector } from './gridRowsSelector';
|
|
4
4
|
import { gridDensityFactorSelector } from '../density/densitySelector';
|
|
5
5
|
export var GRID_ROOT_GROUP_ID = "auto-generated-group-node-root";
|
|
6
|
+
export var GRID_ID_AUTOGENERATED = Symbol('mui-autogenerated-id');
|
|
6
7
|
export var buildRootGroup = function buildRootGroup() {
|
|
7
8
|
return {
|
|
8
9
|
type: 'group',
|
|
@@ -8,6 +8,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
8
8
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { getGridCellElement, getGridColumnHeaderElement, getGridRowElement } from '../../../utils/domUtils';
|
|
11
|
+
import { GRID_ID_AUTOGENERATED } from './gridRowsUtils';
|
|
11
12
|
import { useGridApiMethod } from '../../utils/useGridApiMethod';
|
|
12
13
|
import { gridFocusCellSelector, gridTabIndexCellSelector } from '../focus/gridFocusStateSelector';
|
|
13
14
|
export var MissingRowIdError = /*#__PURE__*/function (_Error) {
|
|
@@ -28,7 +29,8 @@ export var MissingRowIdError = /*#__PURE__*/function (_Error) {
|
|
|
28
29
|
* TODO: Impossible priority - useGridEditing also needs to be after useGridParamsApi
|
|
29
30
|
* TODO: Impossible priority - useGridFocus also needs to be after useGridParamsApi
|
|
30
31
|
*/
|
|
31
|
-
export function useGridParamsApi(apiRef) {
|
|
32
|
+
export function useGridParamsApi(apiRef, props) {
|
|
33
|
+
var getRowId = props.getRowId;
|
|
32
34
|
var getColumnHeaderParams = React.useCallback(function (field) {
|
|
33
35
|
return {
|
|
34
36
|
field: field,
|
|
@@ -114,6 +116,30 @@ export function useGridParamsApi(apiRef) {
|
|
|
114
116
|
}
|
|
115
117
|
return colDef.valueGetter(getBaseCellParams(id, field));
|
|
116
118
|
}, [apiRef, getBaseCellParams]);
|
|
119
|
+
var getRowValue = React.useCallback(function (row, colDef) {
|
|
120
|
+
var _getRowId;
|
|
121
|
+
var id = GRID_ID_AUTOGENERATED in row ? row[GRID_ID_AUTOGENERATED] : (_getRowId = getRowId == null ? void 0 : getRowId(row)) != null ? _getRowId : row.id;
|
|
122
|
+
var field = colDef.field;
|
|
123
|
+
if (!colDef || !colDef.valueGetter) {
|
|
124
|
+
return row[field];
|
|
125
|
+
}
|
|
126
|
+
return colDef.valueGetter(getBaseCellParams(id, field));
|
|
127
|
+
}, [getBaseCellParams, getRowId]);
|
|
128
|
+
var getRowFormattedValue = React.useCallback(function (row, colDef) {
|
|
129
|
+
var _ref;
|
|
130
|
+
var value = getRowValue(row, colDef);
|
|
131
|
+
if (!colDef || !colDef.valueFormatter) {
|
|
132
|
+
return value;
|
|
133
|
+
}
|
|
134
|
+
var id = (_ref = getRowId ? getRowId(row) : row.id) != null ? _ref : row[GRID_ID_AUTOGENERATED];
|
|
135
|
+
var field = colDef.field;
|
|
136
|
+
return colDef.valueFormatter({
|
|
137
|
+
id: id,
|
|
138
|
+
field: field,
|
|
139
|
+
value: value,
|
|
140
|
+
api: apiRef.current
|
|
141
|
+
});
|
|
142
|
+
}, [apiRef, getRowId, getRowValue]);
|
|
117
143
|
var getColumnHeaderElement = React.useCallback(function (field) {
|
|
118
144
|
if (!apiRef.current.rootElementRef.current) {
|
|
119
145
|
return null;
|
|
@@ -139,6 +165,8 @@ export function useGridParamsApi(apiRef) {
|
|
|
139
165
|
getCellValue: getCellValue,
|
|
140
166
|
getCellParams: getCellParams,
|
|
141
167
|
getCellElement: getCellElement,
|
|
168
|
+
getRowValue: getRowValue,
|
|
169
|
+
getRowFormattedValue: getRowFormattedValue,
|
|
142
170
|
getRowParams: getRowParams,
|
|
143
171
|
getRowElement: getRowElement,
|
|
144
172
|
getColumnHeaderParams: getColumnHeaderParams,
|
|
@@ -10,7 +10,7 @@ import { GridSignature, useGridApiEventHandler } from '../../utils/useGridApiEve
|
|
|
10
10
|
import { useGridVisibleRows } from '../../utils/useGridVisibleRows';
|
|
11
11
|
import { gridSortedRowIdsSelector } from '../sorting/gridSortingSelector';
|
|
12
12
|
import { gridFilteredRowsLookupSelector } from '../filter/gridFilterSelector';
|
|
13
|
-
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutoGeneratedRow, GRID_ROOT_GROUP_ID, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel } from './gridRowsUtils';
|
|
13
|
+
import { getTreeNodeDescendants, createRowsInternalCache, getRowsStateFromCache, isAutoGeneratedRow, GRID_ROOT_GROUP_ID, GRID_ID_AUTOGENERATED, updateCacheWithNewRows, getTopLevelRowCount, getRowIdFromRowModel } from './gridRowsUtils';
|
|
14
14
|
import { useGridRegisterPipeApplier } from '../../core/pipeProcessing';
|
|
15
15
|
export var rowsStateInitializer = function rowsStateInitializer(state, props, apiRef) {
|
|
16
16
|
apiRef.current.caches.rows = createRowsInternalCache({
|
|
@@ -49,21 +49,20 @@ export var useGridRows = function useGridRows(apiRef, props) {
|
|
|
49
49
|
}
|
|
50
50
|
var node = apiRef.current.getRowNode(id);
|
|
51
51
|
if (node && isAutoGeneratedRow(node)) {
|
|
52
|
-
|
|
53
|
-
return {};
|
|
52
|
+
return _defineProperty({}, GRID_ID_AUTOGENERATED, id);
|
|
54
53
|
}
|
|
55
54
|
return null;
|
|
56
55
|
}, [apiRef]);
|
|
57
56
|
var lookup = React.useMemo(function () {
|
|
58
|
-
return currentPage.rows.reduce(function (acc,
|
|
59
|
-
var id =
|
|
57
|
+
return currentPage.rows.reduce(function (acc, _ref2, index) {
|
|
58
|
+
var id = _ref2.id;
|
|
60
59
|
acc[id] = index;
|
|
61
60
|
return acc;
|
|
62
61
|
}, {});
|
|
63
62
|
}, [currentPage.rows]);
|
|
64
|
-
var throttledRowsChange = React.useCallback(function (
|
|
65
|
-
var cache =
|
|
66
|
-
throttle =
|
|
63
|
+
var throttledRowsChange = React.useCallback(function (_ref3) {
|
|
64
|
+
var cache = _ref3.cache,
|
|
65
|
+
throttle = _ref3.throttle;
|
|
67
66
|
var run = function run() {
|
|
68
67
|
timeout.current = null;
|
|
69
68
|
lastUpdateMs.current = Date.now();
|
|
@@ -184,15 +183,15 @@ export var useGridRows = function useGridRows(apiRef, props) {
|
|
|
184
183
|
apiRef.current.publishEvent('rowExpansionChange', newNode);
|
|
185
184
|
}, [apiRef]);
|
|
186
185
|
var getRowNode = React.useCallback(function (id) {
|
|
187
|
-
var
|
|
188
|
-
return (
|
|
186
|
+
var _ref4;
|
|
187
|
+
return (_ref4 = gridRowTreeSelector(apiRef)[id]) != null ? _ref4 : null;
|
|
189
188
|
}, [apiRef]);
|
|
190
|
-
var getRowGroupChildren = React.useCallback(function (
|
|
191
|
-
var
|
|
192
|
-
skipAutoGeneratedRows =
|
|
193
|
-
groupId =
|
|
194
|
-
applySorting =
|
|
195
|
-
applyFiltering =
|
|
189
|
+
var getRowGroupChildren = React.useCallback(function (_ref5) {
|
|
190
|
+
var _ref5$skipAutoGenerat = _ref5.skipAutoGeneratedRows,
|
|
191
|
+
skipAutoGeneratedRows = _ref5$skipAutoGenerat === void 0 ? true : _ref5$skipAutoGenerat,
|
|
192
|
+
groupId = _ref5.groupId,
|
|
193
|
+
applySorting = _ref5.applySorting,
|
|
194
|
+
applyFiltering = _ref5.applyFiltering;
|
|
196
195
|
var tree = gridRowTreeSelector(apiRef);
|
|
197
196
|
var children;
|
|
198
197
|
if (applySorting) {
|
package/legacy/index.js
CHANGED
|
@@ -56,4 +56,5 @@ export { buildWarning } from '../utils/warning';
|
|
|
56
56
|
export { exportAs } from '../utils/exportAs';
|
|
57
57
|
export { useGridPrivateApiContext } from '../hooks/utils/useGridPrivateApiContext';
|
|
58
58
|
export { serializeCellValue } from '../hooks/features/export/serializers/csvSerializer';
|
|
59
|
+
export * from '../colDef/utils';
|
|
59
60
|
export * from './utils';
|