@mui/x-data-grid 7.9.0 → 7.11.0
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 +159 -0
- package/DataGrid/DataGrid.js +1 -0
- package/DataGrid/useDataGridProps.js +21 -20
- package/components/base/GridOverlays.js +1 -1
- package/components/containers/GridRoot.js +4 -16
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +4 -1
- package/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/components/virtualization/GridMainContainer.js +11 -3
- package/components/virtualization/GridVirtualScroller.js +3 -1
- package/components/virtualization/GridVirtualScrollerFiller.d.ts +5 -1
- package/components/virtualization/GridVirtualScrollerFiller.js +9 -6
- package/hooks/core/useGridApiInitialization.js +1 -1
- package/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/hooks/features/editing/gridEditingSelectors.d.ts +3 -0
- package/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/hooks/features/editing/index.d.ts +1 -0
- package/hooks/features/editing/index.js +1 -0
- package/hooks/features/filter/gridFilterSelector.d.ts +11 -0
- package/hooks/features/filter/gridFilterSelector.js +13 -0
- package/hooks/features/index.d.ts +1 -0
- package/hooks/features/index.js +1 -0
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -11
- package/hooks/utils/useGridApiEventHandler.d.ts +1 -1
- package/index.js +1 -1
- package/locales/esES.js +1 -2
- package/locales/ruRU.js +4 -5
- package/models/api/gridCoreApi.d.ts +1 -1
- package/models/api/gridRowSelectionApi.d.ts +2 -2
- package/models/colDef/gridColDef.d.ts +4 -4
- package/models/gridRowSelectionModel.d.ts +2 -2
- package/models/props/DataGridProps.d.ts +5 -4
- package/modern/DataGrid/DataGrid.js +1 -0
- package/modern/DataGrid/useDataGridProps.js +21 -20
- package/modern/components/base/GridOverlays.js +1 -1
- package/modern/components/containers/GridRoot.js +4 -16
- package/modern/components/panel/GridPanel.js +4 -1
- package/modern/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/modern/components/virtualization/GridMainContainer.js +11 -3
- package/modern/components/virtualization/GridVirtualScroller.js +3 -1
- package/modern/components/virtualization/GridVirtualScrollerFiller.js +9 -6
- package/modern/hooks/core/useGridApiInitialization.js +1 -1
- package/modern/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/modern/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/modern/hooks/features/editing/index.js +1 -0
- package/modern/hooks/features/filter/gridFilterSelector.js +13 -0
- package/modern/hooks/features/index.js +1 -0
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +3 -11
- package/modern/index.js +1 -1
- package/modern/locales/esES.js +1 -2
- package/modern/locales/ruRU.js +4 -5
- package/modern/utils/createSelector.js +2 -2
- package/node/DataGrid/DataGrid.js +1 -0
- package/node/DataGrid/useDataGridProps.js +21 -20
- package/node/components/base/GridOverlays.js +1 -1
- package/node/components/containers/GridRoot.js +3 -15
- package/node/components/panel/GridPanel.js +4 -1
- package/node/components/panel/filterPanel/GridFilterForm.js +1 -12
- package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +2 -2
- package/node/components/virtualization/GridMainContainer.js +10 -2
- package/node/components/virtualization/GridVirtualScroller.js +3 -1
- package/node/components/virtualization/GridVirtualScrollerFiller.js +9 -6
- package/node/hooks/core/useGridApiInitialization.js +1 -1
- package/node/hooks/features/columnResize/useGridColumnResize.js +1 -0
- package/node/hooks/features/editing/gridEditingSelectors.js +3 -1
- package/node/hooks/features/editing/index.js +16 -0
- package/node/hooks/features/filter/gridFilterSelector.js +14 -1
- package/node/hooks/features/index.js +11 -0
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +3 -11
- package/node/index.js +1 -1
- package/node/locales/esES.js +1 -2
- package/node/locales/ruRU.js +4 -5
- package/node/utils/createSelector.js +2 -2
- package/package.json +5 -5
- package/utils/createSelector.d.ts +1 -1
- package/utils/createSelector.js +2 -2
- package/modern/utils/EventManager.js +0 -69
- package/node/utils/EventManager.js +0 -76
- package/utils/EventManager.d.ts +0 -29
- package/utils/EventManager.js +0 -69
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,165 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 7.11.0
|
|
7
|
+
|
|
8
|
+
_Jul 18, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🎨 Add [color legend](https://mui.com/x/react-charts/legend/#color-legend) for charts (#13700) @alexfauquette
|
|
13
|
+
- 🌍 Improve Korean (ko-KR) locale on the Date and Time Pickers
|
|
14
|
+
- 🌍 Improve Russian (ru-RU) locale on the Date and Time Pickers and Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@7.11.0`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Expose `gridEditRowsStateSelector` (#13877) @romgrk
|
|
25
|
+
- [DataGrid] Fix `columnResizeStop` event not emitted when column is not resized (#13307) @mateuseap
|
|
26
|
+
- [DataGrid] Fix delete filter inconsistent behavior (#13353) @oukunan
|
|
27
|
+
- [DataGrid] Enable flip on preferences panel (#13803) @romgrk
|
|
28
|
+
- [DataGrid] Support `date` and `datetime-local` input types in `GridFilterInputMultipleValue` type (#13411) @karudedios
|
|
29
|
+
- [l10n] Improve Russian (ru-RU) locale (#13735) @diro-atk
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@7.11.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@7.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@7.11.0`.
|
|
38
|
+
|
|
39
|
+
### Date and Time Pickers
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-date-pickers@7.11.0`
|
|
42
|
+
|
|
43
|
+
- [l10n] Improve Korean (ko-KR) locale (#13651) @100pearlcent
|
|
44
|
+
- [l10n] Improve Russian (ru-RU) locale (#13871) @Inv1x
|
|
45
|
+
- [pickers] Add more conformance tests improving API docs precision (#13800) @LukasTy
|
|
46
|
+
- [TimePicker] Add `Mui-selected` class to `TimeClock` meridiem buttons (#13848) @LukasTy
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers-pro@7.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-date-pickers@7.11.0`, plus:
|
|
51
|
+
|
|
52
|
+
- [DateRangePicker] Fix `name` prop propagation regression (#13821) @LukasTy
|
|
53
|
+
|
|
54
|
+
### Charts
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-charts@7.11.0`
|
|
57
|
+
|
|
58
|
+
- [charts] Create color legend (#13700) @alexfauquette
|
|
59
|
+
- [charts] Defaultize axis on top level `useChartContainerProps` (#13817) @JCQuintas
|
|
60
|
+
- [charts] Fix charts not passing `className` to root element (#13647) @JCQuintas
|
|
61
|
+
- [charts] Generate API documentation for pro components (#13822) @alexfauquette
|
|
62
|
+
- [charts] Improve zoomed highlight behaviour (unreleased) (#13868) @JCQuintas
|
|
63
|
+
- [charts] Allow zoom on Y axis and add zoom options to configure zooming behaviour (unreleased) (#13726) @JCQuintas
|
|
64
|
+
- [charts] Disable animations while zooming (unreleased) (#13807) @JCQuintas
|
|
65
|
+
|
|
66
|
+
### Tree View
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-tree-view@7.11.0`
|
|
69
|
+
|
|
70
|
+
- [TreeView] Extract some logic outside of the `useTreeView` hook (#13845) @flaviendelangle
|
|
71
|
+
|
|
72
|
+
### Docs
|
|
73
|
+
|
|
74
|
+
- [docs] Add warning about `process.env.NODE_ENV` in production (#13869) @cherniavskii
|
|
75
|
+
- [docs] Allow controlling the demo form from the example (#13796) @JCQuintas
|
|
76
|
+
- [docs] Clarify Pickers clearable behavior not working on mobile (#13786) @lnhrdt
|
|
77
|
+
- [docs] Improve the documentation of the picker's `onChange` and `onAccept` props (#13543) @flaviendelangle
|
|
78
|
+
- [docs] Replace company name with project name @oliviertassinari
|
|
79
|
+
- [docs] Sort Pickers & Charts API slots alphabetically (#13843) @LukasTy
|
|
80
|
+
|
|
81
|
+
### Core
|
|
82
|
+
|
|
83
|
+
- [core] Add MUI Internal `renovate` group (#13846) @LukasTy
|
|
84
|
+
- [core] Link GitHub issue for `import/prefer-default-export` rule @oliviertassinari
|
|
85
|
+
- [core] Normalize `...other` and test imports in charts (#13844) @JCQuintas
|
|
86
|
+
- [core] Normalize rest / other to match the most common used @oliviertassinari
|
|
87
|
+
- [code-infra] Follow `next` tag for `@mui/docs` package bumps (#13813) @LukasTy
|
|
88
|
+
- [code-infra] Use specific version for `@mui/docs` dependency (#13760) @LukasTy
|
|
89
|
+
- [internals] Move `EventManager` to `@mui/x-internals` package (#13815) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
## 7.10.0
|
|
92
|
+
|
|
93
|
+
_Jul 11, 2024_
|
|
94
|
+
|
|
95
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
96
|
+
|
|
97
|
+
- 🎁 Add selectors to support showing child row count in footer in the Data Grid
|
|
98
|
+
- ✨ New APIs for retrieving current item tree and item's children IDs in the Tree View
|
|
99
|
+
- 🌍 Improve Spanish (es-ES) locale on the Data Grid
|
|
100
|
+
- 🐞 Bugfixes
|
|
101
|
+
- 📚 Documentation improvements
|
|
102
|
+
|
|
103
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
104
|
+
|
|
105
|
+
### Data Grid
|
|
106
|
+
|
|
107
|
+
#### `@mui/x-data-grid@7.10.0`
|
|
108
|
+
|
|
109
|
+
- [DataGrid] Add selectors to support showing child row count in footer (#13725) @KenanYusuf
|
|
110
|
+
- [DataGrid] Fix incorrect panels position when using a toolbar (#13474) @oukunan
|
|
111
|
+
- [DataGrid] Set default variant to `'standard'` in `GridFilterInputMultipleValue` (#13129) @tarunrajput
|
|
112
|
+
- [DataGrid] Use `readonly` on more array props (#13331) @pcorpet
|
|
113
|
+
- [l10n] Improve Spanish (es-ES) locale (#13772) @joserealdev
|
|
114
|
+
|
|
115
|
+
#### `@mui/x-data-grid-pro@7.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
116
|
+
|
|
117
|
+
Same changes as in `@mui/x-data-grid@7.10.0`, plus:
|
|
118
|
+
|
|
119
|
+
- [DataGridPro] Keep bottom pinned row at the bottom (#13313) @romgrk
|
|
120
|
+
|
|
121
|
+
#### `@mui/x-data-grid-premium@7.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
122
|
+
|
|
123
|
+
Same changes as in `@mui/x-data-grid-pro@7.10.0`.
|
|
124
|
+
|
|
125
|
+
### Date and Time Pickers
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-date-pickers@7.10.0`
|
|
128
|
+
|
|
129
|
+
- [fields] Prevent infinite recursion when ensuring selection (#13779) @LukasTy
|
|
130
|
+
- [fields] Unify fields behavior regardless of the `readOnly` flag (#13688) @LukasTy
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-date-pickers-pro@7.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-date-pickers@7.10.0`, plus:
|
|
135
|
+
|
|
136
|
+
- [DateRangePicker] Fix `calendarHeader` slot props propagation (#13780) @LukasTy
|
|
137
|
+
- [DateTimeRangePicker] Resolve `format` from given `views` (#13743) @LukasTy
|
|
138
|
+
|
|
139
|
+
### Charts
|
|
140
|
+
|
|
141
|
+
#### `@mui/x-charts@7.10.0`
|
|
142
|
+
|
|
143
|
+
- [charts] Fix displaying area of a `LineChart` when using the `log` scale (#13791) @alexfauquette
|
|
144
|
+
- [charts] Use correct click handler prop on pie chart `OnSeriesItemClick` documentation (#13761) @tonyhallett
|
|
145
|
+
|
|
146
|
+
### Tree View
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-tree-view@7.10.0`
|
|
149
|
+
|
|
150
|
+
- [TreeView] Add `getItemTree` and `getItemOrderedChildrenIds` methods to the public API (#13804) @flaviendelangle
|
|
151
|
+
- [TreeView] Add utility function to check if an optional plugin is present (#13788) @flaviendelangle
|
|
152
|
+
|
|
153
|
+
### Docs
|
|
154
|
+
|
|
155
|
+
- [docs] Add missing default `loading` prop value (#13604) @oliviertassinari
|
|
156
|
+
- [docs] Add the `DateTimeRangePicker` to the "Commonly used components" demo (#13775) @flaviendelangle
|
|
157
|
+
- [docs] Fix Pickers customization playground overflow (#13742) @LukasTy
|
|
158
|
+
- [docs] Move Pickers dialog guidelines to accessibility page (#13778) @arthurbalduini
|
|
159
|
+
|
|
160
|
+
### Core
|
|
161
|
+
|
|
162
|
+
- [core] Sort `DATA_GRID_PROPS_DEFAULT_VALUES` alphabetically (#13783) @oliviertassinari
|
|
163
|
+
- [test] Fix split infinitive use in tests @oliviertassinari
|
|
164
|
+
|
|
6
165
|
## 7.9.0
|
|
7
166
|
|
|
8
167
|
_Jul 5, 2024_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -23,54 +23,55 @@ const DATA_GRID_FORCED_PROPS = {
|
|
|
23
23
|
export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
24
24
|
autoHeight: false,
|
|
25
25
|
autoPageSize: false,
|
|
26
|
+
autosizeOnMount: false,
|
|
26
27
|
checkboxSelection: false,
|
|
27
28
|
checkboxSelectionVisibleOnly: false,
|
|
29
|
+
clipboardCopyCellDelimiter: '\t',
|
|
28
30
|
columnBufferPx: 150,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
rowSelection: true,
|
|
31
|
+
columnHeaderHeight: 56,
|
|
32
|
+
disableAutosize: false,
|
|
32
33
|
disableColumnFilter: false,
|
|
33
34
|
disableColumnMenu: false,
|
|
35
|
+
disableColumnReorder: false,
|
|
36
|
+
disableColumnResize: false,
|
|
34
37
|
disableColumnSelector: false,
|
|
38
|
+
disableColumnSorting: false,
|
|
35
39
|
disableDensitySelector: false,
|
|
36
40
|
disableEval: false,
|
|
37
41
|
disableMultipleColumnsFiltering: false,
|
|
38
|
-
disableMultipleRowSelection: false,
|
|
39
|
-
disableColumnSorting: false,
|
|
40
42
|
disableMultipleColumnsSorting: false,
|
|
43
|
+
disableMultipleRowSelection: false,
|
|
41
44
|
disableRowSelectionOnClick: false,
|
|
42
45
|
disableVirtualization: false,
|
|
43
46
|
editMode: GridEditModes.Cell,
|
|
44
|
-
filterMode: 'client',
|
|
45
47
|
filterDebounceMs: 150,
|
|
46
|
-
|
|
48
|
+
filterMode: 'client',
|
|
47
49
|
hideFooter: false,
|
|
48
50
|
hideFooterPagination: false,
|
|
49
51
|
hideFooterRowCount: false,
|
|
50
52
|
hideFooterSelectedRowCount: false,
|
|
51
53
|
ignoreDiacritics: false,
|
|
54
|
+
ignoreValueFormatterDuringExport: false,
|
|
55
|
+
keepColumnPositionIfDraggedOutside: false,
|
|
56
|
+
keepNonExistentRowsSelected: false,
|
|
57
|
+
loading: false,
|
|
52
58
|
logger: console,
|
|
53
59
|
logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
|
|
60
|
+
pageSizeOptions: [25, 50, 100],
|
|
54
61
|
pagination: false,
|
|
55
62
|
paginationMode: 'client',
|
|
56
|
-
rowHeight: 52,
|
|
57
63
|
resizeThrottleMs: 60,
|
|
58
|
-
|
|
64
|
+
rowBufferPx: 150,
|
|
65
|
+
rowHeight: 52,
|
|
66
|
+
rowPositionsDebounceMs: 166,
|
|
67
|
+
rows: [],
|
|
68
|
+
rowSelection: true,
|
|
59
69
|
rowSpacingType: 'margin',
|
|
60
70
|
showCellVerticalBorder: false,
|
|
61
71
|
showColumnVerticalBorder: false,
|
|
62
|
-
sortingOrder: ['asc', 'desc', null],
|
|
63
72
|
sortingMode: 'client',
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
disableColumnResize: false,
|
|
67
|
-
keepNonExistentRowsSelected: false,
|
|
68
|
-
keepColumnPositionIfDraggedOutside: false,
|
|
69
|
-
ignoreValueFormatterDuringExport: false,
|
|
70
|
-
clipboardCopyCellDelimiter: '\t',
|
|
71
|
-
rowPositionsDebounceMs: 166,
|
|
72
|
-
autosizeOnMount: false,
|
|
73
|
-
disableAutosize: false
|
|
73
|
+
sortingOrder: ['asc', 'desc', null],
|
|
74
|
+
throttleRowsMs: 0
|
|
74
75
|
};
|
|
75
76
|
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
76
77
|
export const useDataGridProps = inProps => {
|
|
@@ -55,7 +55,7 @@ function GridOverlayWrapper(props) {
|
|
|
55
55
|
const rootProps = useGridRootProps();
|
|
56
56
|
const currentPage = useGridVisibleRows(apiRef, rootProps);
|
|
57
57
|
const dimensions = useGridSelector(apiRef, gridDimensionsSelector);
|
|
58
|
-
let height = dimensions.viewportOuterSize.height - dimensions.
|
|
58
|
+
let height = dimensions.viewportOuterSize.height - dimensions.topContainerHeight - dimensions.bottomContainerHeight - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);
|
|
59
59
|
if (rootProps.autoHeight && currentPage.rows.length === 0 || height === 0) {
|
|
60
60
|
height = getMinimalContentHeight(apiRef);
|
|
61
61
|
}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["
|
|
3
|
+
const _excluded = ["className"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_capitalize as capitalize, unstable_composeClasses as composeClasses } from '@mui/utils';
|
|
8
|
-
import { styled } from '@mui/system';
|
|
9
8
|
import { GridRootStyles } from './GridRootStyles';
|
|
10
9
|
import { useGridSelector } from '../../hooks/utils/useGridSelector';
|
|
11
10
|
import { useGridPrivateApiContext } from '../../hooks/utils/useGridPrivateApiContext';
|
|
12
11
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
13
12
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
14
13
|
import { gridDensitySelector } from '../../hooks/features/density/densitySelector';
|
|
15
|
-
import { jsx as _jsx
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
15
|
const useUtilityClasses = ownerState => {
|
|
17
16
|
const {
|
|
18
17
|
autoHeight,
|
|
@@ -25,15 +24,9 @@ const useUtilityClasses = ownerState => {
|
|
|
25
24
|
};
|
|
26
25
|
return composeClasses(slots, getDataGridUtilityClass, classes);
|
|
27
26
|
};
|
|
28
|
-
const GridPanelAnchor = styled('div')({
|
|
29
|
-
position: 'absolute',
|
|
30
|
-
top: `var(--DataGrid-headersTotalHeight)`,
|
|
31
|
-
left: 0
|
|
32
|
-
});
|
|
33
27
|
const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
34
28
|
const rootProps = useGridRootProps();
|
|
35
29
|
const {
|
|
36
|
-
children,
|
|
37
30
|
className
|
|
38
31
|
} = props,
|
|
39
32
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -54,16 +47,11 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
|
|
|
54
47
|
if (!mountedState) {
|
|
55
48
|
return null;
|
|
56
49
|
}
|
|
57
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/_jsx(GridRootStyles, _extends({
|
|
58
51
|
ref: handleRef,
|
|
59
52
|
className: clsx(className, classes.root),
|
|
60
53
|
ownerState: ownerState
|
|
61
|
-
}, other
|
|
62
|
-
children: [/*#__PURE__*/_jsx(GridPanelAnchor, {
|
|
63
|
-
role: "presentation",
|
|
64
|
-
"data-id": "gridPanelAnchor"
|
|
65
|
-
}), children]
|
|
66
|
-
}));
|
|
54
|
+
}, other));
|
|
67
55
|
});
|
|
68
56
|
process.env.NODE_ENV !== "production" ? GridRoot.propTypes = {
|
|
69
57
|
// ----------------------------- Warning --------------------------------
|
|
@@ -16,7 +16,7 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
|
|
|
16
16
|
open: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
19
|
-
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Popper").PopperProps & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "sx" | "components" | "
|
|
19
|
+
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<import("@mui/material/Popper").PopperProps & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "content" | "style" | "open" | "translate" | "container" | "transition" | "slot" | "title" | "ref" | "suppressHydrationWarning" | "className" | "id" | "lang" | "role" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "nonce" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "component" | "sx" | "components" | "slots" | "slotProps" | "componentsProps" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
20
20
|
ownerState: OwnerState;
|
|
21
21
|
}, {}, {}>;
|
|
22
22
|
declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -57,7 +57,10 @@ const GridPanel = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
57
57
|
}, [apiRef]);
|
|
58
58
|
const modifiers = React.useMemo(() => [{
|
|
59
59
|
name: 'flip',
|
|
60
|
-
enabled:
|
|
60
|
+
enabled: true,
|
|
61
|
+
options: {
|
|
62
|
+
rootBoundary: 'document'
|
|
63
|
+
}
|
|
61
64
|
}, {
|
|
62
65
|
name: 'isPlaced',
|
|
63
66
|
enabled: true,
|
|
@@ -243,18 +243,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
243
243
|
applyMultiFilterOperatorChanges(logicOperator);
|
|
244
244
|
}, [applyMultiFilterOperatorChanges]);
|
|
245
245
|
const handleDeleteFilter = () => {
|
|
246
|
-
|
|
247
|
-
if (item.value === undefined) {
|
|
248
|
-
deleteFilter(item);
|
|
249
|
-
} else {
|
|
250
|
-
// TODO v6: simplify the behavior by always remove the filter form
|
|
251
|
-
applyFilterChanges(_extends({}, item, {
|
|
252
|
-
value: undefined
|
|
253
|
-
}));
|
|
254
|
-
}
|
|
255
|
-
} else {
|
|
256
|
-
deleteFilter(item);
|
|
257
|
-
}
|
|
246
|
+
deleteFilter(item);
|
|
258
247
|
};
|
|
259
248
|
React.useImperativeHandle(focusElementRef, () => ({
|
|
260
249
|
focus: () => {
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export type GridFilterInputMultipleValueProps = {
|
|
5
|
-
type?: 'text' | 'number';
|
|
5
|
+
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
6
6
|
} & GridFilterInputValueProps & Omit<AutocompleteProps<string, true, false, true>, 'options' | 'renderInput'>;
|
|
7
7
|
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): React.JSX.Element;
|
|
8
8
|
declare namespace GridFilterInputMultipleValue {
|
|
@@ -18,7 +18,7 @@ function GridFilterInputMultipleValue(props) {
|
|
|
18
18
|
error,
|
|
19
19
|
helperText,
|
|
20
20
|
size,
|
|
21
|
-
variant
|
|
21
|
+
variant = 'standard'
|
|
22
22
|
} = props,
|
|
23
23
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
24
24
|
const TextFieldProps = {
|
|
@@ -88,6 +88,6 @@ process.env.NODE_ENV !== "production" ? GridFilterInputMultipleValue.propTypes =
|
|
|
88
88
|
operator: PropTypes.string.isRequired,
|
|
89
89
|
value: PropTypes.any
|
|
90
90
|
}).isRequired,
|
|
91
|
-
type: PropTypes.oneOf(['number', 'text'])
|
|
91
|
+
type: PropTypes.oneOf(['date', 'datetime-local', 'number', 'text'])
|
|
92
92
|
} : void 0;
|
|
93
93
|
export { GridFilterInputMultipleValue };
|
|
@@ -3,7 +3,12 @@ import * as React from 'react';
|
|
|
3
3
|
import { styled } from '@mui/system';
|
|
4
4
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
5
5
|
import { useGridAriaAttributes } from '../../hooks/utils/useGridAriaAttributes';
|
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const GridPanelAnchor = styled('div')({
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
top: `var(--DataGrid-headersTotalHeight)`,
|
|
10
|
+
left: 0
|
|
11
|
+
});
|
|
7
12
|
const Element = styled('div', {
|
|
8
13
|
name: 'MuiDataGrid',
|
|
9
14
|
slot: 'Main',
|
|
@@ -16,12 +21,15 @@ const Element = styled('div', {
|
|
|
16
21
|
export const GridMainContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
17
22
|
const ariaAttributes = useGridAriaAttributes();
|
|
18
23
|
const rootProps = useGridRootProps();
|
|
19
|
-
return /*#__PURE__*/
|
|
24
|
+
return /*#__PURE__*/_jsxs(Element, _extends({
|
|
20
25
|
ref: ref,
|
|
21
26
|
ownerState: rootProps,
|
|
22
27
|
className: props.className,
|
|
23
28
|
tabIndex: -1
|
|
24
29
|
}, ariaAttributes, {
|
|
25
|
-
children:
|
|
30
|
+
children: [/*#__PURE__*/_jsx(GridPanelAnchor, {
|
|
31
|
+
role: "presentation",
|
|
32
|
+
"data-id": "gridPanelAnchor"
|
|
33
|
+
}), props.children]
|
|
26
34
|
}));
|
|
27
35
|
});
|
|
@@ -87,7 +87,9 @@ function GridVirtualScroller(props) {
|
|
|
87
87
|
virtualScroller: virtualScroller
|
|
88
88
|
})]
|
|
89
89
|
}))
|
|
90
|
-
})),
|
|
90
|
+
})), /*#__PURE__*/_jsx(SpaceFiller, {
|
|
91
|
+
rowsLength: rows.length
|
|
92
|
+
}), /*#__PURE__*/_jsx(BottomContainer, {
|
|
91
93
|
children: /*#__PURE__*/_jsx(rootProps.slots.pinnedRows, {
|
|
92
94
|
position: "bottom",
|
|
93
95
|
virtualScroller: virtualScroller
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
type Props = {
|
|
3
|
+
/** The number of rows */
|
|
4
|
+
rowsLength: number;
|
|
5
|
+
};
|
|
6
|
+
declare function GridVirtualScrollerFiller({ rowsLength }: Props): React.JSX.Element | null;
|
|
3
7
|
declare const Memoized: typeof GridVirtualScrollerFiller;
|
|
4
8
|
export { Memoized as GridVirtualScrollerFiller };
|
|
@@ -16,22 +16,24 @@ const Pinned = styled('div')({
|
|
|
16
16
|
position: 'sticky',
|
|
17
17
|
height: '100%',
|
|
18
18
|
boxSizing: 'border-box',
|
|
19
|
-
borderTop: '1px solid var(--
|
|
19
|
+
borderTop: '1px solid var(--rowBorderColor)',
|
|
20
20
|
backgroundColor: 'var(--DataGrid-pinnedBackground)'
|
|
21
21
|
});
|
|
22
22
|
const PinnedLeft = styled(Pinned)({
|
|
23
23
|
left: 0,
|
|
24
|
-
borderRight: '1px solid var(--
|
|
24
|
+
borderRight: '1px solid var(--rowBorderColor)'
|
|
25
25
|
});
|
|
26
26
|
const PinnedRight = styled(Pinned)({
|
|
27
27
|
right: 0,
|
|
28
|
-
borderLeft: '1px solid var(--
|
|
28
|
+
borderLeft: '1px solid var(--rowBorderColor)'
|
|
29
29
|
});
|
|
30
30
|
const Main = styled('div')({
|
|
31
31
|
flexGrow: 1,
|
|
32
|
-
borderTop: '1px solid var(--
|
|
32
|
+
borderTop: '1px solid var(--rowBorderColor)'
|
|
33
33
|
});
|
|
34
|
-
function GridVirtualScrollerFiller(
|
|
34
|
+
function GridVirtualScrollerFiller({
|
|
35
|
+
rowsLength
|
|
36
|
+
}) {
|
|
35
37
|
const apiRef = useGridApiContext();
|
|
36
38
|
const {
|
|
37
39
|
viewportOuterSize,
|
|
@@ -52,7 +54,8 @@ function GridVirtualScrollerFiller() {
|
|
|
52
54
|
className: gridClasses.filler,
|
|
53
55
|
role: "presentation",
|
|
54
56
|
style: {
|
|
55
|
-
height
|
|
57
|
+
height,
|
|
58
|
+
'--rowBorderColor': rowsLength === 0 ? 'transparent' : 'var(--DataGrid-rowBorderColor)'
|
|
56
59
|
},
|
|
57
60
|
children: [leftPinnedWidth > 0 && /*#__PURE__*/_jsx(PinnedLeft, {
|
|
58
61
|
className: gridClasses['filler--pinnedLeft'],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { EventManager } from '@mui/x-internals/EventManager';
|
|
2
3
|
import { Store } from '../../utils/Store';
|
|
3
4
|
import { useGridApiMethod } from '../utils/useGridApiMethod';
|
|
4
5
|
import { GridSignature } from '../utils/useGridApiEventHandler';
|
|
5
|
-
import { EventManager } from '../../utils/EventManager';
|
|
6
6
|
const SYMBOL_API_PRIVATE = Symbol('mui.api_private');
|
|
7
7
|
const isSyntheticEvent = event => {
|
|
8
8
|
return event.isPropagationStopped !== undefined;
|
|
@@ -267,6 +267,7 @@ export const useGridColumnResize = (apiRef, props) => {
|
|
|
267
267
|
// Check if the current event is part of a double-click
|
|
268
268
|
if (nativeEvent.timeStamp - prevTimeStamp < 300 && nativeEvent.clientX === prevClientX && nativeEvent.clientY === prevClientY) {
|
|
269
269
|
refs.previousMouseClickEvent = undefined;
|
|
270
|
+
apiRef.current.publishEvent('columnResizeStop', null, nativeEvent);
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
272
273
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gridEditingSelectors';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './gridEditingSelectors';
|
|
@@ -64,6 +64,17 @@ export declare const gridExpandedRowCountSelector: import("../../../utils/create
|
|
|
64
64
|
* @category Filtering
|
|
65
65
|
*/
|
|
66
66
|
export declare const gridFilteredTopLevelRowCountSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, number>;
|
|
67
|
+
/**
|
|
68
|
+
* Get the amount of rows accessible after the filtering process.
|
|
69
|
+
* Includes top level and descendant rows.
|
|
70
|
+
* @category Filtering
|
|
71
|
+
*/
|
|
72
|
+
export declare const gridFilteredRowCountSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, number>;
|
|
73
|
+
/**
|
|
74
|
+
* Get the amount of descendant rows accessible after the filtering process.
|
|
75
|
+
* @category Filtering
|
|
76
|
+
*/
|
|
77
|
+
export declare const gridFilteredDescendantRowCountSelector: import("../../../utils/createSelector").OutputSelector<GridStateCommunity, number>;
|
|
67
78
|
/**
|
|
68
79
|
* @category Filtering
|
|
69
80
|
* @ignore - do not document.
|
|
@@ -89,6 +89,19 @@ export const gridExpandedRowCountSelector = createSelector(gridExpandedSortedRow
|
|
|
89
89
|
*/
|
|
90
90
|
export const gridFilteredTopLevelRowCountSelector = createSelector(gridFilteredSortedTopLevelRowEntriesSelector, visibleSortedTopLevelRows => visibleSortedTopLevelRows.length);
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Get the amount of rows accessible after the filtering process.
|
|
94
|
+
* Includes top level and descendant rows.
|
|
95
|
+
* @category Filtering
|
|
96
|
+
*/
|
|
97
|
+
export const gridFilteredRowCountSelector = createSelector(gridFilteredSortedRowEntriesSelector, filteredSortedRowEntries => filteredSortedRowEntries.length);
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get the amount of descendant rows accessible after the filtering process.
|
|
101
|
+
* @category Filtering
|
|
102
|
+
*/
|
|
103
|
+
export const gridFilteredDescendantRowCountSelector = createSelector(gridFilteredRowCountSelector, gridFilteredTopLevelRowCountSelector, (totalRowCount, topLevelRowCount) => totalRowCount - topLevelRowCount);
|
|
104
|
+
|
|
92
105
|
/**
|
|
93
106
|
* @category Filtering
|
|
94
107
|
* @ignore - do not document.
|
package/hooks/features/index.js
CHANGED
|
@@ -361,20 +361,12 @@ export const useGridVirtualScroller = () => {
|
|
|
361
361
|
overflowY: rootProps.autoHeight ? 'hidden' : undefined
|
|
362
362
|
}), [needsHorizontalScrollbar, rootProps.autoHeight]);
|
|
363
363
|
const contentSize = React.useMemo(() => {
|
|
364
|
-
// In cases where the columns exceed the available width,
|
|
365
|
-
// the horizontal scrollbar should be shown even when there're no rows.
|
|
366
|
-
// Keeping 1px as minimum height ensures that the scrollbar will visible if necessary.
|
|
367
|
-
const height = Math.max(contentHeight, 1);
|
|
368
364
|
const size = {
|
|
369
365
|
width: needsHorizontalScrollbar ? columnsTotalWidth : 'auto',
|
|
370
|
-
height
|
|
366
|
+
height: contentHeight
|
|
371
367
|
};
|
|
372
|
-
if (rootProps.autoHeight) {
|
|
373
|
-
|
|
374
|
-
size.height = getMinimalContentHeight(apiRef); // Give room to show the overlay when there no rows.
|
|
375
|
-
} else {
|
|
376
|
-
size.height = contentHeight;
|
|
377
|
-
}
|
|
368
|
+
if (rootProps.autoHeight && currentPage.rows.length === 0) {
|
|
369
|
+
size.height = getMinimalContentHeight(apiRef); // Give room to show the overlay when there no rows.
|
|
378
370
|
}
|
|
379
371
|
return size;
|
|
380
372
|
}, [apiRef, columnsTotalWidth, contentHeight, needsHorizontalScrollbar, rootProps.autoHeight, currentPage.rows.length]);
|