@mui/x-data-grid 8.5.1 → 8.5.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 +92 -0
- package/esm/hooks/core/useGridApiInitialization.js +1 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +13 -5
- package/esm/hooks/features/columnResize/columnResizeSelector.d.ts +3 -1
- package/esm/hooks/features/columns/gridColumnsSelector.d.ts +41 -15
- package/esm/hooks/features/columns/gridColumnsUtils.js +3 -1
- package/esm/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -2
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +4 -0
- package/esm/hooks/features/density/densitySelector.d.ts +3 -1
- package/esm/hooks/features/dimensions/gridDimensionsSelectors.d.ts +36 -12
- package/esm/hooks/features/editing/gridEditingSelectors.d.ts +8 -4
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +51 -17
- package/esm/hooks/features/filter/gridFilterState.d.ts +2 -1
- package/esm/hooks/features/filter/gridFilterState.js +2 -1
- package/esm/hooks/features/filter/useGridFilter.js +1 -1
- package/esm/hooks/features/focus/gridFocusStateSelector.d.ts +24 -8
- package/esm/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +9 -3
- package/esm/hooks/features/pagination/gridPaginationSelector.d.ts +35 -19
- package/esm/hooks/features/pivoting/gridPivotingSelectors.d.ts +9 -4
- package/esm/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +3 -1
- package/esm/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +9 -3
- package/esm/hooks/features/rowSelection/utils.d.ts +5 -3
- package/esm/hooks/features/rows/gridRowSpanningSelectors.d.ts +9 -3
- package/esm/hooks/features/rows/gridRowsSelector.d.ts +50 -29
- package/esm/hooks/features/sorting/gridSortingSelector.d.ts +15 -5
- package/esm/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +4 -2
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +15 -5
- package/esm/hooks/features/virtualization/gridVirtualizationSelectors.js +3 -1
- package/esm/hooks/utils/useGridSelector.d.ts +2 -4
- package/esm/hooks/utils/useGridSelector.js +2 -2
- package/esm/index.js +1 -1
- package/esm/material/variables.js +1 -2
- package/esm/models/api/gridCoreApi.d.ts +1 -1
- package/esm/models/gridCellClass.d.ts +2 -0
- package/esm/models/gridColumnGrouping.d.ts +2 -0
- package/esm/models/gridColumnGrouping.js +2 -0
- package/esm/models/gridColumnHeaderClass.d.ts +2 -0
- package/esm/models/gridRows.d.ts +2 -0
- package/esm/models/gridSortModel.d.ts +5 -0
- package/esm/models/params/gridRowParams.d.ts +1 -1
- package/esm/models/params/gridRowParams.js +1 -1
- package/esm/utils/createSelector.d.ts +3 -11
- package/esm/utils/createSelector.js +16 -86
- package/hooks/core/useGridApiInitialization.js +2 -2
- package/hooks/features/columnGrouping/gridColumnGroupsSelector.d.ts +13 -5
- package/hooks/features/columnResize/columnResizeSelector.d.ts +3 -1
- package/hooks/features/columns/gridColumnsSelector.d.ts +41 -15
- package/hooks/features/columns/gridColumnsUtils.js +3 -1
- package/hooks/features/dataSource/gridDataSourceSelector.d.ts +4 -2
- package/hooks/features/dataSource/useGridDataSourceBase.js +4 -0
- package/hooks/features/density/densitySelector.d.ts +3 -1
- package/hooks/features/dimensions/gridDimensionsSelectors.d.ts +36 -12
- package/hooks/features/editing/gridEditingSelectors.d.ts +8 -4
- package/hooks/features/filter/gridFilterSelector.d.ts +51 -17
- package/hooks/features/filter/gridFilterState.d.ts +2 -1
- package/hooks/features/filter/gridFilterState.js +2 -1
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/focus/gridFocusStateSelector.d.ts +24 -8
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.d.ts +9 -3
- package/hooks/features/pagination/gridPaginationSelector.d.ts +35 -19
- package/hooks/features/pivoting/gridPivotingSelectors.d.ts +9 -4
- package/hooks/features/preferencesPanel/gridPreferencePanelSelector.d.ts +3 -1
- package/hooks/features/rowSelection/gridRowSelectionSelector.d.ts +9 -3
- package/hooks/features/rowSelection/utils.d.ts +5 -3
- package/hooks/features/rows/gridRowSpanningSelectors.d.ts +9 -3
- package/hooks/features/rows/gridRowsSelector.d.ts +50 -29
- package/hooks/features/sorting/gridSortingSelector.d.ts +15 -5
- package/hooks/features/virtualization/gridFocusedVirtualCellSelector.d.ts +4 -2
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +15 -5
- package/hooks/features/virtualization/gridVirtualizationSelectors.js +3 -1
- package/hooks/utils/useGridSelector.d.ts +2 -4
- package/hooks/utils/useGridSelector.js +4 -4
- package/index.js +1 -1
- package/material/variables.js +1 -2
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/gridCellClass.d.ts +2 -0
- package/models/gridColumnGrouping.d.ts +2 -0
- package/models/gridColumnGrouping.js +2 -0
- package/models/gridColumnHeaderClass.d.ts +2 -0
- package/models/gridRows.d.ts +2 -0
- package/models/gridSortModel.d.ts +5 -0
- package/models/params/gridRowParams.d.ts +1 -1
- package/models/params/gridRowParams.js +1 -1
- package/package.json +3 -4
- package/utils/createSelector.d.ts +3 -11
- package/utils/createSelector.js +18 -88
- package/esm/utils/Store.d.ts +0 -11
- package/esm/utils/Store.js +0 -24
- package/esm/utils/weakMapMemoize.d.ts +0 -20
- package/esm/utils/weakMapMemoize.js +0 -128
- package/utils/Store.d.ts +0 -11
- package/utils/Store.js +0 -31
- package/utils/weakMapMemoize.d.ts +0 -20
- package/utils/weakMapMemoize.js +0 -134
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,98 @@
|
|
|
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.5.2
|
|
9
|
+
|
|
10
|
+
_Jun 12, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Improve Data Grid selectors performance
|
|
15
|
+
- 🐞 Fix `useSyncExternalStore` import error in React 17
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@alisasanib, @noobyogi0010.
|
|
19
|
+
|
|
20
|
+
The following are all team members who have contributed to this release:
|
|
21
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @mapache-salvaje, @michelengelen, @noraleonte, @oliviertassinari, @prakhargupta1, @romgrk.
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.5.2`
|
|
26
|
+
|
|
27
|
+
- [DataGrid] Improve selectors performance (#18234) @romgrk
|
|
28
|
+
- [DataGrid] Fix data grid palette when using CSS vars (#18310) @KenanYusuf
|
|
29
|
+
- [DataGrid] Ignore data source request if the grid got unmounted (#18268) @arminmeh
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@8.5.2`, plus:
|
|
34
|
+
|
|
35
|
+
- [DataGridPro] Fix flex column width if it is a pinned column (#18293) @alisasanib
|
|
36
|
+
- [DataGridPro] Fix inconsistent filtering results with aggregation (#17954) @cherniavskii
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@8.5.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@8.5.2`.
|
|
41
|
+
|
|
42
|
+
### Date and Time Pickers
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-date-pickers@8.5.2`
|
|
45
|
+
|
|
46
|
+
- [pickers] Add `PickerDay2` and `DateRangePickerDay2` components (#15921) @noraleonte
|
|
47
|
+
- [pickers] Fix `hiddenLabel` prop propagation (#18195) @noobyogi0010
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-date-pickers@8.5.2`.
|
|
52
|
+
|
|
53
|
+
### Charts
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts@8.5.2`
|
|
56
|
+
|
|
57
|
+
- [charts] Add a default value formatter for continuous scales (#18178) @bernardobelchior
|
|
58
|
+
- [charts] Add margin-bottom to charts toolbar (#18326) @bernardobelchior
|
|
59
|
+
- [charts] Fix grid with band scale (#18295) @alexfauquette
|
|
60
|
+
- [charts] Remove unnecessary style changes in tests (#18317) @JCQuintas
|
|
61
|
+
- [charts] Remove `sx` prop merging from `useComponentRenderer` (#18235) @bernardobelchior
|
|
62
|
+
- [charts] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-charts@8.5.2`, plus:
|
|
67
|
+
|
|
68
|
+
- [charts-pro] Document zoom slider tooltip value formatting (#18261) @bernardobelchior
|
|
69
|
+
- [charts-pro] Funnel `gap` prop does not impact the drawing area (#18233) @JCQuintas
|
|
70
|
+
- [charts-pro] Use `ChartsToolbarPro` types in pro charts (#18243) @bernardobelchior
|
|
71
|
+
|
|
72
|
+
### Tree View
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-tree-view@8.5.2`
|
|
75
|
+
|
|
76
|
+
- [tree-view] Fix `useSyncExternalStore` import error in React 17 (#18314) @bernardobelchior
|
|
77
|
+
|
|
78
|
+
#### `@mui/x-tree-view-pro@8.5.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
79
|
+
|
|
80
|
+
Same changes as in `@mui/x-tree-view@8.5.2`.
|
|
81
|
+
|
|
82
|
+
### Docs
|
|
83
|
+
|
|
84
|
+
- [docs] Add toolbar custom trigger and panel recipe (#18297) @KenanYusuf
|
|
85
|
+
- [docs] Copyedit the Priority support page (#18311) @mapache-salvaje
|
|
86
|
+
- [docs] Remove confusing opt-out mention in telemetry docs (#18257) @prakhargupta1
|
|
87
|
+
- [docs] Revise the Master Detail doc (#17927) @mapache-salvaje
|
|
88
|
+
- [docs] Revise the list view doc (#17928) @mapache-salvaje
|
|
89
|
+
- [docs] Audit and revise the Pro column docs (#17844) @mapache-salvaje
|
|
90
|
+
- [docs] Add some more context on Heatmap (#18256) @oliviertassinari
|
|
91
|
+
- [x-telemetry] Reduce Telemetry overhead (#18292) @oliviertassinari
|
|
92
|
+
- [code-infra] Align Node version used in CI to v22 (#18319) @LukasTy
|
|
93
|
+
- [code-infra] Fix pkg.pr.new publishing (#18316) @bernardobelchior
|
|
94
|
+
- [code-infra] Revert `React` to `19.0.0` (#18265) @LukasTy
|
|
95
|
+
- [code-infra] Use `catalog` for reused dependencies (#18302) @LukasTy
|
|
96
|
+
- [infra] Remove unused karma/mocha deps and files (#18340) @JCQuintas
|
|
97
|
+
- [infra] Update github label references to use 'scope' instead of 'component' (#18260) @michelengelen
|
|
98
|
+
- [infra] Use a single browser server in CI (#18230) @JCQuintas
|
|
99
|
+
|
|
8
100
|
## 8.5.1
|
|
9
101
|
|
|
10
102
|
<!-- generated comparing v8.5.0..master -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { EventManager } from '@mui/x-internals/EventManager';
|
|
3
|
-
import { Store } from
|
|
3
|
+
import { Store } from '@mui/x-internals/store';
|
|
4
4
|
import { useGridApiMethod } from "../utils/useGridApiMethod.js";
|
|
5
5
|
import { GridSignature } from "../../constants/signature.js";
|
|
6
6
|
const SYMBOL_API_PRIVATE = Symbol('mui.api_private');
|
|
@@ -4,9 +4,17 @@ import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
|
4
4
|
* @ignore - do not document.
|
|
5
5
|
*/
|
|
6
6
|
export declare const gridColumnGroupingSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnsGroupingState>;
|
|
7
|
-
export declare const gridColumnGroupsUnwrappedModelSelector:
|
|
7
|
+
export declare const gridColumnGroupsUnwrappedModelSelector: (args_0: import("react").RefObject<{
|
|
8
|
+
state: GridStateCommunity;
|
|
9
|
+
} | null>) => {
|
|
8
10
|
[columnField: string]: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare const gridColumnGroupsLookupSelector:
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
};
|
|
12
|
+
export declare const gridColumnGroupsLookupSelector: (args_0: import("react").RefObject<{
|
|
13
|
+
state: GridStateCommunity;
|
|
14
|
+
} | null>) => import("./gridColumnGroupsInterfaces.js").GridColumnGroupLookup;
|
|
15
|
+
export declare const gridColumnGroupsHeaderStructureSelector: (args_0: import("react").RefObject<{
|
|
16
|
+
state: GridStateCommunity;
|
|
17
|
+
} | null>) => import("./gridColumnGroupsInterfaces.js").GridGroupingStructure[][];
|
|
18
|
+
export declare const gridColumnGroupsHeaderMaxDepthSelector: (args_0: import("react").RefObject<{
|
|
19
|
+
state: GridStateCommunity;
|
|
20
|
+
} | null>) => number;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
export declare const gridColumnResizeSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridColumnResizeState>;
|
|
3
|
-
export declare const gridResizingColumnFieldSelector:
|
|
3
|
+
export declare const gridResizingColumnFieldSelector: (args_0: import("react").RefObject<{
|
|
4
|
+
state: GridStateCommunity;
|
|
5
|
+
} | null>) => string;
|
|
@@ -9,40 +9,54 @@ export declare const gridColumnsStateSelector: import("@mui/x-data-grid").Output
|
|
|
9
9
|
* Get an array of column fields in the order rendered on screen.
|
|
10
10
|
* @category Columns
|
|
11
11
|
*/
|
|
12
|
-
export declare const gridColumnFieldsSelector:
|
|
12
|
+
export declare const gridColumnFieldsSelector: (args_0: import("react").RefObject<{
|
|
13
|
+
state: GridStateCommunity;
|
|
14
|
+
} | null>) => string[];
|
|
13
15
|
/**
|
|
14
16
|
* Get the columns as a lookup (an object containing the field for keys and the definition for values).
|
|
15
17
|
* @category Columns
|
|
16
18
|
*/
|
|
17
|
-
export declare const gridColumnLookupSelector:
|
|
19
|
+
export declare const gridColumnLookupSelector: (args_0: import("react").RefObject<{
|
|
20
|
+
state: GridStateCommunity;
|
|
21
|
+
} | null>) => GridColumnLookup;
|
|
18
22
|
/**
|
|
19
23
|
* Get an array of column definitions in the order rendered on screen..
|
|
20
24
|
* @category Columns
|
|
21
25
|
*/
|
|
22
|
-
export declare const gridColumnDefinitionsSelector:
|
|
26
|
+
export declare const gridColumnDefinitionsSelector: (args_0: import("react").RefObject<{
|
|
27
|
+
state: GridStateCommunity;
|
|
28
|
+
} | null>) => import("../../../internals/index.js").GridStateColDef[];
|
|
23
29
|
/**
|
|
24
30
|
* Get the column visibility model, containing the visibility status of each column.
|
|
25
31
|
* If a column is not registered in the model, it is visible.
|
|
26
32
|
* @category Visible Columns
|
|
27
33
|
*/
|
|
28
|
-
export declare const gridColumnVisibilityModelSelector:
|
|
34
|
+
export declare const gridColumnVisibilityModelSelector: (args_0: import("react").RefObject<{
|
|
35
|
+
state: GridStateCommunity;
|
|
36
|
+
} | null>) => import("@mui/x-data-grid").GridColumnVisibilityModel;
|
|
29
37
|
/**
|
|
30
38
|
* Get the "initial" column visibility model, containing the visibility status of each column.
|
|
31
39
|
* It is updated when the `columns` prop is updated or when `updateColumns` API method is called.
|
|
32
40
|
* If a column is not registered in the model, it is visible.
|
|
33
41
|
* @category Visible Columns
|
|
34
42
|
*/
|
|
35
|
-
export declare const gridInitialColumnVisibilityModelSelector:
|
|
43
|
+
export declare const gridInitialColumnVisibilityModelSelector: (args_0: import("react").RefObject<{
|
|
44
|
+
state: GridStateCommunity;
|
|
45
|
+
} | null>) => import("@mui/x-data-grid").GridColumnVisibilityModel;
|
|
36
46
|
/**
|
|
37
47
|
* Get the visible columns as a lookup (an object containing the field for keys and the definition for values).
|
|
38
48
|
* @category Visible Columns
|
|
39
49
|
*/
|
|
40
|
-
export declare const gridVisibleColumnDefinitionsSelector:
|
|
50
|
+
export declare const gridVisibleColumnDefinitionsSelector: (args_0: import("react").RefObject<{
|
|
51
|
+
state: GridStateCommunity;
|
|
52
|
+
} | null>) => import("../../../internals/index.js").GridStateColDef[];
|
|
41
53
|
/**
|
|
42
54
|
* Get the field of each visible column.
|
|
43
55
|
* @category Visible Columns
|
|
44
56
|
*/
|
|
45
|
-
export declare const gridVisibleColumnFieldsSelector:
|
|
57
|
+
export declare const gridVisibleColumnFieldsSelector: (args_0: import("react").RefObject<{
|
|
58
|
+
state: GridStateCommunity;
|
|
59
|
+
} | null>) => string[];
|
|
46
60
|
/**
|
|
47
61
|
* Get the visible pinned columns model.
|
|
48
62
|
* @category Visible Columns
|
|
@@ -53,36 +67,48 @@ export declare const gridPinnedColumnsSelector: import("@mui/x-data-grid").Outpu
|
|
|
53
67
|
* @category Pinned Columns
|
|
54
68
|
* @ignore - Do not document
|
|
55
69
|
*/
|
|
56
|
-
export declare const gridExistingPinnedColumnSelector: import("
|
|
70
|
+
export declare const gridExistingPinnedColumnSelector: (args_0: import("react").RefObject<{
|
|
71
|
+
state: GridStateCommunity;
|
|
72
|
+
} | null>) => {
|
|
57
73
|
left: string[];
|
|
58
74
|
right: string[];
|
|
59
|
-
}
|
|
75
|
+
};
|
|
60
76
|
/**
|
|
61
77
|
* Get the visible pinned columns.
|
|
62
78
|
* @category Visible Columns
|
|
63
79
|
*/
|
|
64
|
-
export declare const gridVisiblePinnedColumnDefinitionsSelector: import("
|
|
80
|
+
export declare const gridVisiblePinnedColumnDefinitionsSelector: (args_0: import("react").RefObject<{
|
|
81
|
+
state: GridStateCommunity;
|
|
82
|
+
} | null>) => {
|
|
65
83
|
left: import("../../../internals/index.js").GridStateColDef[];
|
|
66
84
|
right: import("../../../internals/index.js").GridStateColDef[];
|
|
67
|
-
}
|
|
85
|
+
};
|
|
68
86
|
/**
|
|
69
87
|
* Get the left position in pixel of each visible columns relative to the left of the first column.
|
|
70
88
|
* @category Visible Columns
|
|
71
89
|
*/
|
|
72
|
-
export declare const gridColumnPositionsSelector:
|
|
90
|
+
export declare const gridColumnPositionsSelector: (args_0: import("react").RefObject<{
|
|
91
|
+
state: GridStateCommunity;
|
|
92
|
+
} | null>) => number[];
|
|
73
93
|
/**
|
|
74
94
|
* Get the filterable columns as an array.
|
|
75
95
|
* @category Columns
|
|
76
96
|
*/
|
|
77
|
-
export declare const gridFilterableColumnDefinitionsSelector:
|
|
97
|
+
export declare const gridFilterableColumnDefinitionsSelector: (args_0: import("react").RefObject<{
|
|
98
|
+
state: GridStateCommunity;
|
|
99
|
+
} | null>) => import("../../../internals/index.js").GridStateColDef[];
|
|
78
100
|
/**
|
|
79
101
|
* Get the filterable columns as a lookup (an object containing the field for keys and the definition for values).
|
|
80
102
|
* @category Columns
|
|
81
103
|
*/
|
|
82
|
-
export declare const gridFilterableColumnLookupSelector:
|
|
104
|
+
export declare const gridFilterableColumnLookupSelector: (args_0: import("react").RefObject<{
|
|
105
|
+
state: GridStateCommunity;
|
|
106
|
+
} | null>) => GridColumnLookup;
|
|
83
107
|
/**
|
|
84
108
|
* Checks if some column has a colSpan field.
|
|
85
109
|
* @category Columns
|
|
86
110
|
* @ignore - Do not document
|
|
87
111
|
*/
|
|
88
|
-
export declare const gridHasColSpanSelector:
|
|
112
|
+
export declare const gridHasColSpanSelector: (args_0: import("react").RefObject<{
|
|
113
|
+
state: GridStateCommunity;
|
|
114
|
+
} | null>) => boolean;
|
|
@@ -153,7 +153,9 @@ export const hydrateColumnsWidth = (rawState, dimensions) => {
|
|
|
153
153
|
flexColumns
|
|
154
154
|
});
|
|
155
155
|
Object.keys(computedColumnWidths).forEach(field => {
|
|
156
|
-
columnsLookup[field]
|
|
156
|
+
columnsLookup[field] = _extends({}, columnsLookup[field], {
|
|
157
|
+
computedWidth: computedColumnWidths[field].computedWidth
|
|
158
|
+
});
|
|
157
159
|
});
|
|
158
160
|
}
|
|
159
161
|
return _extends({}, rawState, {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export declare const gridGetRowsParamsSelector:
|
|
1
|
+
export declare const gridGetRowsParamsSelector: (args_0: import("react").RefObject<{
|
|
2
|
+
state: import("../../../models/gridStateCommunity.js").GridStateCommunity;
|
|
3
|
+
} | null>) => {
|
|
2
4
|
groupKeys: never[];
|
|
3
5
|
paginationModel: import("@mui/x-data-grid").GridPaginationModel;
|
|
4
6
|
sortModel: import("@mui/x-data-grid").GridSortModel;
|
|
5
7
|
filterModel: import("@mui/x-data-grid").GridFilterModel;
|
|
6
8
|
start: number;
|
|
7
9
|
end: number;
|
|
8
|
-
}
|
|
10
|
+
};
|
|
@@ -173,6 +173,10 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
173
173
|
apiRef.current.dataSource.cache.clear();
|
|
174
174
|
apiRef.current.dataSource.fetchRows();
|
|
175
175
|
}
|
|
176
|
+
return () => {
|
|
177
|
+
// ignore the current request on unmount
|
|
178
|
+
lastRequestId.current += 1;
|
|
179
|
+
};
|
|
176
180
|
}, [apiRef, props.dataSource]);
|
|
177
181
|
return {
|
|
178
182
|
api: {
|
|
@@ -3,4 +3,6 @@ import { GridDensity } from "../../../models/gridDensity.js";
|
|
|
3
3
|
export declare const COMPACT_DENSITY_FACTOR = 0.7;
|
|
4
4
|
export declare const COMFORTABLE_DENSITY_FACTOR = 1.3;
|
|
5
5
|
export declare const gridDensitySelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridDensity>;
|
|
6
|
-
export declare const gridDensityFactorSelector: import("
|
|
6
|
+
export declare const gridDensityFactorSelector: (args_0: import("react").RefObject<{
|
|
7
|
+
state: GridStateCommunity;
|
|
8
|
+
} | null>) => number;
|
|
@@ -4,15 +4,39 @@ export declare const gridDimensionsSelector: import("@mui/x-data-grid").OutputSe
|
|
|
4
4
|
* Get the summed width of all the visible columns.
|
|
5
5
|
* @category Visible Columns
|
|
6
6
|
*/
|
|
7
|
-
export declare const gridColumnsTotalWidthSelector:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export declare const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
export declare const gridColumnsTotalWidthSelector: (args_0: import("react").RefObject<{
|
|
8
|
+
state: GridStateCommunity;
|
|
9
|
+
} | null>) => number;
|
|
10
|
+
export declare const gridRowHeightSelector: (args_0: import("react").RefObject<{
|
|
11
|
+
state: GridStateCommunity;
|
|
12
|
+
} | null>) => number;
|
|
13
|
+
export declare const gridContentHeightSelector: (args_0: import("react").RefObject<{
|
|
14
|
+
state: GridStateCommunity;
|
|
15
|
+
} | null>) => number;
|
|
16
|
+
export declare const gridHasScrollXSelector: (args_0: import("react").RefObject<{
|
|
17
|
+
state: GridStateCommunity;
|
|
18
|
+
} | null>) => boolean;
|
|
19
|
+
export declare const gridHasScrollYSelector: (args_0: import("react").RefObject<{
|
|
20
|
+
state: GridStateCommunity;
|
|
21
|
+
} | null>) => boolean;
|
|
22
|
+
export declare const gridHasFillerSelector: (args_0: import("react").RefObject<{
|
|
23
|
+
state: GridStateCommunity;
|
|
24
|
+
} | null>) => boolean;
|
|
25
|
+
export declare const gridHeaderHeightSelector: (args_0: import("react").RefObject<{
|
|
26
|
+
state: GridStateCommunity;
|
|
27
|
+
} | null>) => number;
|
|
28
|
+
export declare const gridGroupHeaderHeightSelector: (args_0: import("react").RefObject<{
|
|
29
|
+
state: GridStateCommunity;
|
|
30
|
+
} | null>) => number;
|
|
31
|
+
export declare const gridHeaderFilterHeightSelector: (args_0: import("react").RefObject<{
|
|
32
|
+
state: GridStateCommunity;
|
|
33
|
+
} | null>) => number;
|
|
34
|
+
export declare const gridHorizontalScrollbarHeightSelector: (args_0: import("react").RefObject<{
|
|
35
|
+
state: GridStateCommunity;
|
|
36
|
+
} | null>) => number;
|
|
37
|
+
export declare const gridVerticalScrollbarWidthSelector: (args_0: import("react").RefObject<{
|
|
38
|
+
state: GridStateCommunity;
|
|
39
|
+
} | null>) => number;
|
|
40
|
+
export declare const gridHasBottomFillerSelector: (args_0: import("react").RefObject<{
|
|
41
|
+
state: GridStateCommunity;
|
|
42
|
+
} | null>) => boolean;
|
|
@@ -5,11 +5,15 @@ import { GridEditMode } from "../../../models/gridEditRowModel.js";
|
|
|
5
5
|
* Select the row editing state.
|
|
6
6
|
*/
|
|
7
7
|
export declare const gridEditRowsStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, import("@mui/x-data-grid").GridEditingState>;
|
|
8
|
-
export declare const gridRowIsEditingSelector: import("
|
|
8
|
+
export declare const gridRowIsEditingSelector: (args_0: import("react").RefObject<{
|
|
9
|
+
state: GridStateCommunity;
|
|
10
|
+
} | null>, args_1: {
|
|
9
11
|
rowId: GridRowId;
|
|
10
12
|
editMode: GridEditMode;
|
|
11
|
-
}
|
|
12
|
-
export declare const gridEditCellStateSelector: import("
|
|
13
|
+
}) => boolean;
|
|
14
|
+
export declare const gridEditCellStateSelector: (args_0: import("react").RefObject<{
|
|
15
|
+
state: GridStateCommunity;
|
|
16
|
+
} | null>, args_1: {
|
|
13
17
|
rowId: GridRowId;
|
|
14
18
|
field: string;
|
|
15
|
-
}
|
|
19
|
+
}) => import("@mui/x-data-grid").GridEditCellProps<any>;
|
|
@@ -5,12 +5,16 @@ import { GridFilterItem } from "../../../models/gridFilterItem.js";
|
|
|
5
5
|
* Get the current filter model.
|
|
6
6
|
* @category Filtering
|
|
7
7
|
*/
|
|
8
|
-
export declare const gridFilterModelSelector:
|
|
8
|
+
export declare const gridFilterModelSelector: (args_0: import("react").RefObject<{
|
|
9
|
+
state: GridStateCommunity;
|
|
10
|
+
} | null>) => import("@mui/x-data-grid").GridFilterModel;
|
|
9
11
|
/**
|
|
10
12
|
* Get the current quick filter values.
|
|
11
13
|
* @category Filtering
|
|
12
14
|
*/
|
|
13
|
-
export declare const gridQuickFilterValuesSelector:
|
|
15
|
+
export declare const gridQuickFilterValuesSelector: (args_0: import("react").RefObject<{
|
|
16
|
+
state: GridStateCommunity;
|
|
17
|
+
} | null>) => any[] | undefined;
|
|
14
18
|
/**
|
|
15
19
|
* @category Visible rows
|
|
16
20
|
* @ignore - do not document.
|
|
@@ -20,79 +24,107 @@ export declare const gridVisibleRowsLookupSelector: import("@mui/x-data-grid").O
|
|
|
20
24
|
* @category Filtering
|
|
21
25
|
* @ignore - do not document.
|
|
22
26
|
*/
|
|
23
|
-
export declare const gridFilteredRowsLookupSelector:
|
|
27
|
+
export declare const gridFilteredRowsLookupSelector: (args_0: import("react").RefObject<{
|
|
28
|
+
state: GridStateCommunity;
|
|
29
|
+
} | null>) => Record<GridRowId, false>;
|
|
24
30
|
/**
|
|
25
31
|
* @category Filtering
|
|
26
32
|
* @ignore - do not document.
|
|
27
33
|
*/
|
|
28
|
-
export declare const gridFilteredChildrenCountLookupSelector:
|
|
34
|
+
export declare const gridFilteredChildrenCountLookupSelector: (args_0: import("react").RefObject<{
|
|
35
|
+
state: GridStateCommunity;
|
|
36
|
+
} | null>) => Record<GridRowId, number>;
|
|
29
37
|
/**
|
|
30
38
|
* @category Filtering
|
|
31
39
|
* @ignore - do not document.
|
|
32
40
|
*/
|
|
33
|
-
export declare const gridFilteredDescendantCountLookupSelector:
|
|
41
|
+
export declare const gridFilteredDescendantCountLookupSelector: (args_0: import("react").RefObject<{
|
|
42
|
+
state: GridStateCommunity;
|
|
43
|
+
} | null>) => Record<GridRowId, number>;
|
|
34
44
|
/**
|
|
35
45
|
* Get the id and the model of the rows accessible after the filtering process.
|
|
36
46
|
* Does not contain the collapsed children.
|
|
37
47
|
* @category Filtering
|
|
38
48
|
*/
|
|
39
|
-
export declare const gridExpandedSortedRowEntriesSelector:
|
|
49
|
+
export declare const gridExpandedSortedRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
50
|
+
state: GridStateCommunity;
|
|
51
|
+
} | null>) => import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
40
52
|
/**
|
|
41
53
|
* Get the id of the rows accessible after the filtering process.
|
|
42
54
|
* Does not contain the collapsed children.
|
|
43
55
|
* @category Filtering
|
|
44
56
|
*/
|
|
45
|
-
export declare const gridExpandedSortedRowIdsSelector:
|
|
57
|
+
export declare const gridExpandedSortedRowIdsSelector: (args_0: import("react").RefObject<{
|
|
58
|
+
state: GridStateCommunity;
|
|
59
|
+
} | null>) => GridRowId[];
|
|
46
60
|
/**
|
|
47
61
|
* Get the id and the model of the rows accessible after the filtering process.
|
|
48
62
|
* Contains the collapsed children.
|
|
49
63
|
* @category Filtering
|
|
50
64
|
*/
|
|
51
|
-
export declare const gridFilteredSortedRowEntriesSelector:
|
|
65
|
+
export declare const gridFilteredSortedRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
66
|
+
state: GridStateCommunity;
|
|
67
|
+
} | null>) => import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
52
68
|
/**
|
|
53
69
|
* Get the id of the rows accessible after the filtering process.
|
|
54
70
|
* Contains the collapsed children.
|
|
55
71
|
* @category Filtering
|
|
56
72
|
*/
|
|
57
|
-
export declare const gridFilteredSortedRowIdsSelector:
|
|
73
|
+
export declare const gridFilteredSortedRowIdsSelector: (args_0: import("react").RefObject<{
|
|
74
|
+
state: GridStateCommunity;
|
|
75
|
+
} | null>) => GridRowId[];
|
|
58
76
|
/**
|
|
59
77
|
* Get the ids to position in the current tree level lookup of the rows accessible after the filtering process.
|
|
60
78
|
* Does not contain the collapsed children.
|
|
61
79
|
* @category Filtering
|
|
62
80
|
* @ignore - do not document.
|
|
63
81
|
*/
|
|
64
|
-
export declare const gridExpandedSortedRowTreeLevelPositionLookupSelector:
|
|
82
|
+
export declare const gridExpandedSortedRowTreeLevelPositionLookupSelector: (args_0: import("react").RefObject<{
|
|
83
|
+
state: GridStateCommunity;
|
|
84
|
+
} | null>) => Record<GridRowId, number>;
|
|
65
85
|
/**
|
|
66
86
|
* Get the id and the model of the top level rows accessible after the filtering process.
|
|
67
87
|
* @category Filtering
|
|
68
88
|
*/
|
|
69
|
-
export declare const gridFilteredSortedTopLevelRowEntriesSelector:
|
|
89
|
+
export declare const gridFilteredSortedTopLevelRowEntriesSelector: (args_0: import("react").RefObject<{
|
|
90
|
+
state: GridStateCommunity;
|
|
91
|
+
} | null>) => import("@mui/x-data-grid").GridRowEntry<import("@mui/x-data-grid").GridValidRowModel>[];
|
|
70
92
|
/**
|
|
71
93
|
* Get the amount of rows accessible after the filtering process.
|
|
72
94
|
* @category Filtering
|
|
73
95
|
*/
|
|
74
|
-
export declare const gridExpandedRowCountSelector:
|
|
96
|
+
export declare const gridExpandedRowCountSelector: (args_0: import("react").RefObject<{
|
|
97
|
+
state: GridStateCommunity;
|
|
98
|
+
} | null>) => number;
|
|
75
99
|
/**
|
|
76
100
|
* Get the amount of top level rows accessible after the filtering process.
|
|
77
101
|
* @category Filtering
|
|
78
102
|
*/
|
|
79
|
-
export declare const gridFilteredTopLevelRowCountSelector:
|
|
103
|
+
export declare const gridFilteredTopLevelRowCountSelector: (args_0: import("react").RefObject<{
|
|
104
|
+
state: GridStateCommunity;
|
|
105
|
+
} | null>) => number;
|
|
80
106
|
/**
|
|
81
107
|
* Get the amount of rows accessible after the filtering process.
|
|
82
108
|
* Includes top level and descendant rows.
|
|
83
109
|
* @category Filtering
|
|
84
110
|
*/
|
|
85
|
-
export declare const gridFilteredRowCountSelector:
|
|
111
|
+
export declare const gridFilteredRowCountSelector: (args_0: import("react").RefObject<{
|
|
112
|
+
state: GridStateCommunity;
|
|
113
|
+
} | null>) => number;
|
|
86
114
|
/**
|
|
87
115
|
* Get the amount of descendant rows accessible after the filtering process.
|
|
88
116
|
* @category Filtering
|
|
89
117
|
*/
|
|
90
|
-
export declare const gridFilteredDescendantRowCountSelector: import("
|
|
118
|
+
export declare const gridFilteredDescendantRowCountSelector: (args_0: import("react").RefObject<{
|
|
119
|
+
state: GridStateCommunity;
|
|
120
|
+
} | null>) => number;
|
|
91
121
|
/**
|
|
92
122
|
* @category Filtering
|
|
93
123
|
* @ignore - do not document.
|
|
94
124
|
*/
|
|
95
|
-
export declare const gridFilterActiveItemsSelector:
|
|
125
|
+
export declare const gridFilterActiveItemsSelector: (args_0: import("react").RefObject<{
|
|
126
|
+
state: GridStateCommunity;
|
|
127
|
+
} | null>) => GridFilterItem[];
|
|
96
128
|
export type GridFilterActiveItemsLookup = {
|
|
97
129
|
[field: string]: GridFilterItem[];
|
|
98
130
|
};
|
|
@@ -100,4 +132,6 @@ export type GridFilterActiveItemsLookup = {
|
|
|
100
132
|
* @category Filtering
|
|
101
133
|
* @ignore - do not document.
|
|
102
134
|
*/
|
|
103
|
-
export declare const gridFilterActiveItemsLookupSelector: import("
|
|
135
|
+
export declare const gridFilterActiveItemsLookupSelector: (args_0: import("react").RefObject<{
|
|
136
|
+
state: GridStateCommunity;
|
|
137
|
+
} | null>) => GridFilterActiveItemsLookup;
|
|
@@ -44,8 +44,9 @@ export interface GridAggregatedFilterItemApplierResult {
|
|
|
44
44
|
passingQuickFilterValues: null | GridQuickFilterValueResult;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* @param {
|
|
47
|
+
* @param {GridValidRowModel} row The model of the row we want to filter.
|
|
48
48
|
* @param {(filterItem: GridFilterItem) => boolean} shouldApplyItem An optional callback to allow the filtering engine to only apply some items.
|
|
49
|
+
* @param {GridAggregatedFilterItemApplierResult} result The previous result of the filtering engine.
|
|
49
50
|
*/
|
|
50
51
|
export type GridAggregatedFilterItemApplier = (row: GridValidRowModel, shouldApplyItem: ((field: string) => boolean) | undefined, result: GridAggregatedFilterItemApplierResult) => void;
|
|
51
52
|
export interface GridFilteringMethodParams {
|
|
@@ -12,8 +12,9 @@ export const getDefaultGridFilterModel = () => ({
|
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {GridValidRowModel} row The model of the row we want to filter.
|
|
16
16
|
* @param {(filterItem: GridFilterItem) => boolean} shouldApplyItem An optional callback to allow the filtering engine to only apply some items.
|
|
17
|
+
* @param {GridAggregatedFilterItemApplierResult} result The previous result of the filtering engine.
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { lruMemoize } from '
|
|
3
|
+
import { lruMemoize } from '@mui/x-internals/lruMemoize';
|
|
4
4
|
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
|
5
5
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
6
6
|
import { useLazyRef } from "../../utils/useLazyRef.js";
|
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { GridStateCommunity } from "../../../models/gridStateCommunity.js";
|
|
2
2
|
import { GridFocusState, GridTabIndexState } from "./gridFocusState.js";
|
|
3
3
|
export declare const gridFocusStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridFocusState>;
|
|
4
|
-
export declare const gridFocusCellSelector:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
4
|
+
export declare const gridFocusCellSelector: (args_0: import("react").RefObject<{
|
|
5
|
+
state: GridStateCommunity;
|
|
6
|
+
} | null>) => import("@mui/x-data-grid").GridCellCoordinates | null;
|
|
7
|
+
export declare const gridFocusColumnHeaderSelector: (args_0: import("react").RefObject<{
|
|
8
|
+
state: GridStateCommunity;
|
|
9
|
+
} | null>) => import("@mui/x-data-grid").GridColumnIdentifier | null;
|
|
10
|
+
export declare const gridFocusColumnHeaderFilterSelector: (args_0: import("react").RefObject<{
|
|
11
|
+
state: GridStateCommunity;
|
|
12
|
+
} | null>) => import("@mui/x-data-grid").GridColumnIdentifier | null;
|
|
13
|
+
export declare const gridFocusColumnGroupHeaderSelector: (args_0: import("react").RefObject<{
|
|
14
|
+
state: GridStateCommunity;
|
|
15
|
+
} | null>) => import("@mui/x-data-grid").GridColumnGroupIdentifier | null;
|
|
8
16
|
export declare const gridTabIndexStateSelector: import("@mui/x-data-grid").OutputSelector<GridStateCommunity, unknown, GridTabIndexState>;
|
|
9
|
-
export declare const gridTabIndexCellSelector:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const
|
|
17
|
+
export declare const gridTabIndexCellSelector: (args_0: import("react").RefObject<{
|
|
18
|
+
state: GridStateCommunity;
|
|
19
|
+
} | null>) => import("@mui/x-data-grid").GridCellCoordinates | null;
|
|
20
|
+
export declare const gridTabIndexColumnHeaderSelector: (args_0: import("react").RefObject<{
|
|
21
|
+
state: GridStateCommunity;
|
|
22
|
+
} | null>) => import("@mui/x-data-grid").GridColumnIdentifier | null;
|
|
23
|
+
export declare const gridTabIndexColumnHeaderFilterSelector: (args_0: import("react").RefObject<{
|
|
24
|
+
state: GridStateCommunity;
|
|
25
|
+
} | null>) => import("@mui/x-data-grid").GridColumnIdentifier | null;
|
|
26
|
+
export declare const gridTabIndexColumnGroupHeaderSelector: (args_0: import("react").RefObject<{
|
|
27
|
+
state: GridStateCommunity;
|
|
28
|
+
} | null>) => import("@mui/x-data-grid").GridColumnGroupIdentifier | null;
|