@mui/x-data-grid 5.15.0 → 5.15.3
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 +128 -1
- package/DataGrid/DataGrid.js +2 -2
- package/README.md +2 -1
- package/components/ErrorBoundary.d.ts +1 -0
- package/components/GridAutoSizer.js +7 -0
- package/components/base/GridOverlays.js +1 -4
- package/components/cell/GridActionsCellItem.d.ts +2 -2
- package/components/cell/GridEditDateCell.js +1 -1
- package/components/cell/GridEditInputCell.d.ts +2 -5
- package/components/cell/GridEditInputCell.js +13 -14
- package/components/cell/GridEditSingleSelectCell.d.ts +4 -0
- package/components/cell/GridEditSingleSelectCell.js +20 -5
- package/components/containers/GridOverlay.js +7 -1
- package/components/menu/GridMenu.d.ts +3 -2
- package/components/menu/GridMenu.js +1 -0
- package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/GridPanel.js +1 -0
- package/components/panel/filterPanel/GridFilterForm.d.ts +4 -0
- package/components/panel/filterPanel/GridFilterForm.js +5 -0
- package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.d.ts +4 -0
- package/components/panel/filterPanel/GridFilterPanel.js +5 -0
- package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +13 -4
- package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
- package/components/toolbar/GridToolbarExportContainer.js +13 -2
- package/constants/envConstants.d.ts +1 -1
- package/constants/envConstants.js +2 -11
- package/hooks/features/editRows/useGridCellEditing.new.js +20 -13
- package/hooks/features/editRows/useGridCellEditing.old.js +2 -2
- package/hooks/features/editRows/useGridRowEditing.new.js +14 -8
- package/hooks/features/filter/gridFilterState.d.ts +12 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +8 -5
- package/hooks/features/filter/gridFilterUtils.js +74 -43
- package/hooks/features/filter/useGridFilter.js +16 -3
- package/hooks/features/focus/useGridFocus.js +11 -6
- package/hooks/features/rows/useGridRows.js +5 -2
- package/hooks/features/statePersistence/gridStatePersistenceInterface.d.ts +3 -0
- package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/legacy/DataGrid/DataGrid.js +2 -2
- package/legacy/components/GridAutoSizer.js +7 -0
- package/legacy/components/base/GridOverlays.js +1 -4
- package/legacy/components/cell/GridEditDateCell.js +1 -1
- package/legacy/components/cell/GridEditInputCell.js +13 -14
- package/legacy/components/cell/GridEditSingleSelectCell.js +20 -4
- package/legacy/components/containers/GridOverlay.js +7 -1
- package/legacy/components/menu/GridMenu.js +1 -0
- package/legacy/components/panel/GridPanel.js +1 -0
- package/legacy/components/panel/filterPanel/GridFilterForm.js +5 -0
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +5 -0
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +14 -5
- package/legacy/components/toolbar/GridToolbarExportContainer.js +15 -2
- package/legacy/constants/envConstants.js +2 -11
- package/legacy/hooks/features/editRows/useGridCellEditing.new.js +21 -14
- package/legacy/hooks/features/editRows/useGridCellEditing.old.js +2 -2
- package/legacy/hooks/features/editRows/useGridRowEditing.new.js +14 -8
- package/legacy/hooks/features/filter/gridFilterUtils.js +84 -55
- package/legacy/hooks/features/filter/useGridFilter.js +16 -3
- package/legacy/hooks/features/focus/useGridFocus.js +11 -6
- package/legacy/hooks/features/rows/useGridRows.js +5 -2
- package/legacy/hooks/utils/useGridNativeEventListener.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +1 -0
- package/legacy/locales/deDE.js +8 -8
- package/legacy/locales/itIT.js +15 -15
- package/legacy/locales/koKR.js +34 -30
- package/legacy/utils/keyboardUtils.js +8 -5
- package/locales/deDE.js +8 -8
- package/locales/itIT.js +15 -15
- package/locales/koKR.js +30 -30
- package/models/params/gridMenuParams.d.ts +1 -2
- package/models/props/DataGridProps.d.ts +4 -4
- package/modern/DataGrid/DataGrid.js +2 -2
- package/modern/components/GridAutoSizer.js +7 -0
- package/modern/components/base/GridOverlays.js +1 -4
- package/modern/components/cell/GridEditDateCell.js +1 -1
- package/modern/components/cell/GridEditInputCell.js +13 -14
- package/modern/components/cell/GridEditSingleSelectCell.js +20 -5
- package/modern/components/containers/GridOverlay.js +7 -1
- package/modern/components/menu/GridMenu.js +1 -0
- package/modern/components/panel/GridPanel.js +1 -0
- package/modern/components/panel/filterPanel/GridFilterForm.js +5 -0
- package/modern/components/panel/filterPanel/GridFilterPanel.js +5 -0
- package/modern/components/toolbar/GridToolbarDensitySelector.js +11 -4
- package/modern/components/toolbar/GridToolbarExportContainer.js +11 -2
- package/modern/constants/envConstants.js +2 -11
- package/modern/hooks/features/editRows/useGridCellEditing.new.js +20 -13
- package/modern/hooks/features/editRows/useGridCellEditing.old.js +2 -2
- package/modern/hooks/features/editRows/useGridRowEditing.new.js +14 -8
- package/modern/hooks/features/filter/gridFilterUtils.js +73 -42
- package/modern/hooks/features/filter/useGridFilter.js +16 -3
- package/modern/hooks/features/focus/useGridFocus.js +11 -6
- package/modern/hooks/features/rows/useGridRows.js +5 -2
- package/modern/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/locales/deDE.js +8 -8
- package/modern/locales/itIT.js +15 -15
- package/modern/locales/koKR.js +30 -30
- package/modern/utils/keyboardUtils.js +7 -2
- package/node/DataGrid/DataGrid.js +2 -2
- package/node/components/GridAutoSizer.js +7 -0
- package/node/components/base/GridOverlays.js +1 -4
- package/node/components/cell/GridEditDateCell.js +1 -1
- package/node/components/cell/GridEditInputCell.js +15 -16
- package/node/components/cell/GridEditSingleSelectCell.js +19 -5
- package/node/components/containers/GridOverlay.js +7 -1
- package/node/components/menu/GridMenu.js +1 -0
- package/node/components/panel/GridPanel.js +1 -0
- package/node/components/panel/filterPanel/GridFilterForm.js +5 -0
- package/node/components/panel/filterPanel/GridFilterPanel.js +5 -0
- package/node/components/toolbar/GridToolbarDensitySelector.js +13 -4
- package/node/components/toolbar/GridToolbarExportContainer.js +13 -2
- package/node/constants/envConstants.js +2 -13
- package/node/hooks/features/editRows/useGridCellEditing.new.js +20 -13
- package/node/hooks/features/editRows/useGridCellEditing.old.js +2 -2
- package/node/hooks/features/editRows/useGridRowEditing.new.js +14 -8
- package/node/hooks/features/filter/gridFilterUtils.js +81 -47
- package/node/hooks/features/filter/useGridFilter.js +15 -2
- package/node/hooks/features/focus/useGridFocus.js +11 -6
- package/node/hooks/features/rows/useGridRows.js +5 -2
- package/node/hooks/utils/useGridNativeEventListener.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/index.js +8 -0
- package/node/locales/deDE.js +8 -8
- package/node/locales/itIT.js +15 -15
- package/node/locales/koKR.js +30 -30
- package/node/utils/keyboardUtils.js +10 -4
- package/package.json +1 -1
- package/utils/keyboardUtils.d.ts +2 -2
- package/utils/keyboardUtils.js +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,133 @@
|
|
|
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
|
+
## 5.15.3
|
|
7
|
+
|
|
8
|
+
_Aug 18, 2022_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 📚 Documentation improvements
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
|
|
15
|
+
### `@mui/x-data-grid@v5.15.3` / `@mui/x-data-grid-pro@v5.15.3` / `@mui/x-data-grid-premium@v5.15.3`
|
|
16
|
+
|
|
17
|
+
#### Changes
|
|
18
|
+
|
|
19
|
+
- [DataGrid] Fix <kbd>Enter</kbd> causing Select to re-open when commiting value (#5756) @m4theushw
|
|
20
|
+
- [DataGrid] Fix `GridOverlays` bypassing pointer events (#5674) @philjones88
|
|
21
|
+
|
|
22
|
+
### `@mui/x-date-pickers@v5.0.0-beta.6` / `@mui/x-date-picker-pro@v5.0.0-beta.6`
|
|
23
|
+
|
|
24
|
+
#### Changes
|
|
25
|
+
|
|
26
|
+
- [DatePicker] Support click on day outside of current month (#5768) @alexfauquette
|
|
27
|
+
- [pickers] Extend `PickersActionBarProps` with `DialogActionProps` (#5798) @LukasTy
|
|
28
|
+
|
|
29
|
+
### Docs
|
|
30
|
+
|
|
31
|
+
- [docs] Fix API anchor link scroll top (#5795) @oliviertassinari
|
|
32
|
+
- [docs] Fix contradiction in the free trial clause (#5732) @oliviertassinari
|
|
33
|
+
- [docs] Fix default value of the DataGrid `logLevel` prop to false (#5784) @HwangTaehyun
|
|
34
|
+
- [docs] Fix typo on the row height page (#5772) @flaviendelangle
|
|
35
|
+
- [docs] Improve "upgrading plans" documentation. (#5683) @joserodolfofreitas
|
|
36
|
+
- [docs] Link the license docs before pricing (#5726) @oliviertassinari
|
|
37
|
+
- [docs] Update packages README files (#5835) @cherniavskii
|
|
38
|
+
- [docs] Use `InputBase` for pickers inputs (#5597) @cherniavskii
|
|
39
|
+
|
|
40
|
+
### Core
|
|
41
|
+
|
|
42
|
+
- [core] Upgrade monorepo (#5771, #5797) @cherniavskii
|
|
43
|
+
- [core] Various TS improvements (#5556) @flaviendelangle
|
|
44
|
+
- [license] Give more context in the missing license (#5731) @oliviertassinari
|
|
45
|
+
- [license] Only log an error type once (#5730) @oliviertassinari
|
|
46
|
+
- [test] Increase timeout to take print screenshot (#5799) @m4theushw
|
|
47
|
+
|
|
48
|
+
## 5.15.2
|
|
49
|
+
|
|
50
|
+
_Aug 11, 2022_
|
|
51
|
+
|
|
52
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
53
|
+
|
|
54
|
+
- ✨ Improve quick filtering with row grouping (#5701) @alexfauquette
|
|
55
|
+
- 📚 Documentation improvements
|
|
56
|
+
- 🐞 Bugfixes
|
|
57
|
+
|
|
58
|
+
### `@mui/x-data-grid@v5.15.2` / `@mui/x-data-grid-pro@v5.15.2` / `@mui/x-data-grid-premium@v5.15.2`
|
|
59
|
+
|
|
60
|
+
#### Changes
|
|
61
|
+
|
|
62
|
+
- [DataGrid] Catch errors if rows freezing is not supported (#5711) @cherniavskii
|
|
63
|
+
- [DataGrid] Preserve cell mode when entering edit mode while commiting (#5686) @m4theushw
|
|
64
|
+
- [DataGridPremium] Let quick filter search in row grouping children (#5701) @alexfauquette
|
|
65
|
+
|
|
66
|
+
### `@mui/x-date-pickers@v5.0.0-beta.5` / `@mui/x-date-picker-pro@5.0.0-beta.5`
|
|
67
|
+
|
|
68
|
+
#### Changes
|
|
69
|
+
|
|
70
|
+
- [pickers] Add `react-dom` to peerDependencies (#5752) @cherniavskii
|
|
71
|
+
- [TimePicker] Set clock focus outline to `none` (#5758) @LukasTy
|
|
72
|
+
- [pickers] Fix theme augmentation with TypeScript (#5596) @alexfauquette
|
|
73
|
+
- [pickers] Reset input value when locale is modified (#5310) @alexfauquette
|
|
74
|
+
- [pickers] Support `disableHighlightToday` on `MonthPicker` and `YearPicker` (#5562) @flaviendelangle
|
|
75
|
+
- [pickers] Fallback to desktop mode when `matchMedia` is unavailable (#5684) @LukasTy
|
|
76
|
+
- [pickers] Trigger `onChange` when clearing or accepting `Invalid date` (#5740) @LukasTy
|
|
77
|
+
|
|
78
|
+
### Docs
|
|
79
|
+
|
|
80
|
+
- [docs] Add RFC GH issue template (#5739) @bytasv
|
|
81
|
+
- [docs] Add description to the `GridExportStateParams` page (#5654) @oliviertassinari
|
|
82
|
+
- [docs] Improve the Events page (#5413) @flaviendelangle
|
|
83
|
+
- [docs] Use new editing API in the introduction demos (#5728) @oliviertassinari
|
|
84
|
+
|
|
85
|
+
### Core
|
|
86
|
+
|
|
87
|
+
- [core] Remove duplicated `FUNDING.yml` file (#5656) @oliviertassinari
|
|
88
|
+
- [core] Remove outdated Next.js options (#5727) @oliviertassinari
|
|
89
|
+
- [core] Update tooling to run with React 18 (#4155) @m4theushw
|
|
90
|
+
- [test] Fix failing dynamic row height tests on Edge (#5707) @m4theushw
|
|
91
|
+
|
|
92
|
+
## 5.15.1
|
|
93
|
+
|
|
94
|
+
_Aug 4, 2022_
|
|
95
|
+
|
|
96
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
97
|
+
|
|
98
|
+
- 📚 New [page presenting the `apiRef`](https://mui.com/x/react-data-grid/api-object/) (#5273) @flaviendelangle
|
|
99
|
+
- ✨ Better keyboard support for start editing cells (#5511) @oliviertassinari
|
|
100
|
+
- 🌍 Improvements to different locales
|
|
101
|
+
- 🐞 Bugfixes
|
|
102
|
+
|
|
103
|
+
### `@mui/x-data-grid@v5.15.1` / `@mui/x-data-grid-pro@v5.15.1` / `@mui/x-data-grid-premium@v5.15.1`
|
|
104
|
+
|
|
105
|
+
#### Changes
|
|
106
|
+
|
|
107
|
+
- [DataGrid] Improve start edit UX (#5511) @oliviertassinari
|
|
108
|
+
- [DataGrid] Add `initialOpen` prop to `GridEditSingleSelectCell` to allow overriding initial open state (#5645) @shapaaa
|
|
109
|
+
- [DataGrid] Forward `ref` to root element in `GridEditInputCell` (#5631) @Zenoo
|
|
110
|
+
- [DataGrid] Toggle open state when clicking on buttons in the `GridToolbar` (#5503) @cherniavskii
|
|
111
|
+
- [DataGrid] Improve German (de-DE) locale (#5586) @sebastianfrey
|
|
112
|
+
- [DataGrid] Improve Korean (ko-KR) locale (#5668) @Einere
|
|
113
|
+
- [DataGrid] Complete Italian (it-IT) locale (#5487) @mamodev
|
|
114
|
+
|
|
115
|
+
### `@mui/x-date-pickers@v5.0.0-beta.4` / `@mui/x-date-picker-pro@5.0.0-beta.4`
|
|
116
|
+
|
|
117
|
+
#### Changes
|
|
118
|
+
|
|
119
|
+
- [DatePicker] Customize day formatter in the calendar (#5373) @alexfauquette
|
|
120
|
+
|
|
121
|
+
### Docs
|
|
122
|
+
|
|
123
|
+
- [docs] New location for the legal content (#5595) @oliviertassinari
|
|
124
|
+
- [docs] Update description of `maxDateTime` prop (#5639) @jurecuhalev
|
|
125
|
+
- [docs] Add missing `date-fns` dependency when opening Codesandbox demo (#5692) @cherniavskii
|
|
126
|
+
|
|
127
|
+
### Core
|
|
128
|
+
|
|
129
|
+
- [core] Drop usage of `GRID_EXPERIMENTAL_ENABLED` env variable (#5669) @ar7casper
|
|
130
|
+
- [core] Isolate asset loading under /x/ (#5594) @oliviertassinari
|
|
131
|
+
- [core] Upgrade node to v14 (#4999) @cherniavskii
|
|
132
|
+
|
|
6
133
|
## 5.15.0
|
|
7
134
|
|
|
8
135
|
_Jul 29, 2022_
|
|
@@ -13,7 +140,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
13
140
|
|
|
14
141
|
Premium users can now aggregate data in the grid.
|
|
15
142
|
Extract information like sum, average, count, and others with a couple of clicks.
|
|
16
|
-
|
|
143
|
+
|
|
17
144
|
https://user-images.githubusercontent.com/45398769/181581503-77cc412e-9d9e-4de1-8bc3-c3bccc54cdaa.mp4
|
|
18
145
|
|
|
19
146
|
To enable this feature, add `experimentalFeatures={{ aggregation: true }}`.
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -347,7 +347,7 @@ DataGridRaw.propTypes = {
|
|
|
347
347
|
|
|
348
348
|
/**
|
|
349
349
|
* Allows to pass the logging level or false to turn off logging.
|
|
350
|
-
* @default "
|
|
350
|
+
* @default "error" ("warn" in dev mode)
|
|
351
351
|
*/
|
|
352
352
|
logLevel: PropTypes.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
353
353
|
|
|
@@ -645,7 +645,7 @@ DataGridRaw.propTypes = {
|
|
|
645
645
|
* @param {GridState} state The new state.
|
|
646
646
|
* @param {MuiEvent<{}>} event The event object.
|
|
647
647
|
* @param {GridCallbackDetails} details Additional details for this callback.
|
|
648
|
-
* @
|
|
648
|
+
* @ignore - do not document.
|
|
649
649
|
*/
|
|
650
650
|
onStateChange: PropTypes.func,
|
|
651
651
|
|
package/README.md
CHANGED
|
@@ -21,7 +21,8 @@ This component has the following peer dependencies that you will need to install
|
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@mui/material": "^5.4.1",
|
|
23
23
|
"@mui/system": "^5.4.1",
|
|
24
|
-
"react": "^17.0.2 || ^18.0.0"
|
|
24
|
+
"react": "^17.0.2 || ^18.0.0",
|
|
25
|
+
"react-dom": "^17.0.2 || ^18.0.0"
|
|
25
26
|
},
|
|
26
27
|
```
|
|
27
28
|
|
|
@@ -8,6 +8,7 @@ export interface ErrorBoundaryProps {
|
|
|
8
8
|
api: React.MutableRefObject<GridApiCommunity>;
|
|
9
9
|
hasError: boolean;
|
|
10
10
|
componentProps?: any[];
|
|
11
|
+
children?: React.ReactNode;
|
|
11
12
|
}
|
|
12
13
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, any> {
|
|
13
14
|
static getDerivedStateFromError(error: Error): {
|
|
@@ -106,6 +106,13 @@ process.env.NODE_ENV !== "production" ? GridAutoSizer.propTypes = {
|
|
|
106
106
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
107
107
|
// ----------------------------------------------------------------------
|
|
108
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Function responsible for rendering children.
|
|
111
|
+
* @param {AutoSizerSize} size The grid's size.
|
|
112
|
+
* @returns {React.ReactNode} The children to render.
|
|
113
|
+
*/
|
|
114
|
+
children: PropTypes.func.isRequired,
|
|
115
|
+
|
|
109
116
|
/**
|
|
110
117
|
* Default height to use for initial render; useful for SSR.
|
|
111
118
|
* @default null
|
|
@@ -44,10 +44,7 @@ function GridOverlayWrapper(props) {
|
|
|
44
44
|
width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
|
|
45
45
|
position: 'absolute',
|
|
46
46
|
top: headerHeight,
|
|
47
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
48
|
-
zIndex: 4,
|
|
49
|
-
// should be above pinned columns, pinned rows and detail panel
|
|
50
|
-
pointerEvents: 'none'
|
|
47
|
+
bottom: height === 'auto' ? 0 : undefined
|
|
51
48
|
}
|
|
52
49
|
}, props));
|
|
53
50
|
}
|
|
@@ -43,7 +43,7 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
|
|
|
43
43
|
touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
44
44
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
45
45
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
46
|
-
}, "color" | "size" | "disabled" | "
|
|
46
|
+
}, "color" | "size" | "disabled" | "action" | "tabIndex" | "children" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge">, "hidden" | "color" | "size" | "icon" | "translate" | "disabled" | "form" | "label" | "slot" | "title" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "type" | "value" | "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" | "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" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "showInMenu"> | Pick<{
|
|
47
47
|
label: string;
|
|
48
48
|
icon?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
|
|
49
49
|
} & {
|
|
@@ -75,5 +75,5 @@ declare const GridActionsCellItem: React.ForwardRefExoticComponent<(Pick<{
|
|
|
75
75
|
touchRippleRef?: React.Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
76
76
|
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "key" | keyof React.LiHTMLAttributes<HTMLLIElement>> & {
|
|
77
77
|
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
78
|
-
}, "dense" | "disabled" | "
|
|
78
|
+
}, "dense" | "disabled" | "action" | "autoFocus" | "tabIndex" | "selected" | "children" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef">, "hidden" | "color" | "dense" | "icon" | "translate" | "disabled" | "label" | "slot" | "title" | "key" | "action" | "autoFocus" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "selected" | "value" | "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" | "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" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "disableGutters" | "divider" | keyof import("@mui/material/OverridableComponent").CommonProps | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "showInMenu">) & React.RefAttributes<HTMLButtonElement>>;
|
|
79
79
|
export { GridActionsCellItem };
|
|
@@ -81,7 +81,7 @@ function GridEditDateCell(props) {
|
|
|
81
81
|
const [date, time] = newFormattedDate.split('T');
|
|
82
82
|
const [year, month, day] = date.split('-');
|
|
83
83
|
newParsedDate = new Date();
|
|
84
|
-
newParsedDate.setFullYear(year, Number(month) - 1, day);
|
|
84
|
+
newParsedDate.setFullYear(Number(year), Number(month) - 1, Number(day));
|
|
85
85
|
newParsedDate.setHours(0, 0, 0, 0);
|
|
86
86
|
|
|
87
87
|
if (time) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { InputBaseProps } from '@mui/material/InputBase';
|
|
3
3
|
import { GridRenderEditCellParams } from '../../models/params/gridCellParams';
|
|
4
|
-
export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<InputBaseProps, 'id' | 'value' | 'tabIndex'> {
|
|
4
|
+
export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<InputBaseProps, 'id' | 'value' | 'tabIndex' | 'ref'> {
|
|
5
5
|
debounceMs?: number;
|
|
6
6
|
/**
|
|
7
7
|
* Callback called when the value is changed by the user.
|
|
@@ -11,9 +11,6 @@ export interface GridEditInputCellProps extends GridRenderEditCellParams, Omit<I
|
|
|
11
11
|
*/
|
|
12
12
|
onValueChange?: (event: React.ChangeEvent<HTMLInputElement>, newValue: string) => Promise<void> | void;
|
|
13
13
|
}
|
|
14
|
-
declare
|
|
15
|
-
declare namespace GridEditInputCell {
|
|
16
|
-
var propTypes: any;
|
|
17
|
-
}
|
|
14
|
+
declare const GridEditInputCell: React.ForwardRefExoticComponent<Pick<GridEditInputCellProps, keyof GridEditInputCellProps> & React.RefAttributes<HTMLInputElement>>;
|
|
18
15
|
export { GridEditInputCell };
|
|
19
16
|
export declare const renderEditInputCell: (params: GridEditInputCellProps) => JSX.Element;
|
|
@@ -37,8 +37,7 @@ const GridEditInputCellRoot = styled(InputBase, {
|
|
|
37
37
|
height: '100%'
|
|
38
38
|
}
|
|
39
39
|
}));
|
|
40
|
-
|
|
41
|
-
function GridEditInputCell(props) {
|
|
40
|
+
const GridEditInputCell = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
42
41
|
var _rootProps$experiment;
|
|
43
42
|
|
|
44
43
|
const rootProps = useGridRootProps();
|
|
@@ -86,6 +85,7 @@ function GridEditInputCell(props) {
|
|
|
86
85
|
}
|
|
87
86
|
}, [hasFocus]);
|
|
88
87
|
return /*#__PURE__*/_jsx(GridEditInputCellRoot, _extends({
|
|
88
|
+
ref: ref,
|
|
89
89
|
inputRef: inputRef,
|
|
90
90
|
className: classes.root,
|
|
91
91
|
fullWidth: true,
|
|
@@ -94,8 +94,7 @@ function GridEditInputCell(props) {
|
|
|
94
94
|
onChange: handleChange,
|
|
95
95
|
endAdornment: isProcessingProps ? /*#__PURE__*/_jsx(GridLoadIcon, {}) : undefined
|
|
96
96
|
}, other));
|
|
97
|
-
}
|
|
98
|
-
|
|
97
|
+
});
|
|
99
98
|
process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
100
99
|
// ----------------------------- Warning --------------------------------
|
|
101
100
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -106,23 +105,23 @@ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
|
106
105
|
* GridApi that let you manipulate the grid.
|
|
107
106
|
* @deprecated Use the `apiRef` returned by `useGridApiContext` or `useGridApiRef` (only available in `@mui/x-data-grid-pro`)
|
|
108
107
|
*/
|
|
109
|
-
api: PropTypes.any
|
|
108
|
+
api: PropTypes.any,
|
|
110
109
|
|
|
111
110
|
/**
|
|
112
111
|
* The mode of the cell.
|
|
113
112
|
*/
|
|
114
|
-
cellMode: PropTypes.oneOf(['edit', 'view'])
|
|
113
|
+
cellMode: PropTypes.oneOf(['edit', 'view']),
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* The column of the row that the current cell belongs to.
|
|
118
117
|
*/
|
|
119
|
-
colDef: PropTypes.object
|
|
118
|
+
colDef: PropTypes.object,
|
|
120
119
|
debounceMs: PropTypes.number,
|
|
121
120
|
|
|
122
121
|
/**
|
|
123
122
|
* The column field of the cell that triggered the event.
|
|
124
123
|
*/
|
|
125
|
-
field: PropTypes.string
|
|
124
|
+
field: PropTypes.string,
|
|
126
125
|
|
|
127
126
|
/**
|
|
128
127
|
* The cell value formatted with the column valueFormatter.
|
|
@@ -136,17 +135,17 @@ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
|
136
135
|
* @returns {any} The cell value.
|
|
137
136
|
* @deprecated Use `params.row` to directly access the fields you want instead.
|
|
138
137
|
*/
|
|
139
|
-
getValue: PropTypes.func
|
|
138
|
+
getValue: PropTypes.func,
|
|
140
139
|
|
|
141
140
|
/**
|
|
142
141
|
* If true, the cell is the active element.
|
|
143
142
|
*/
|
|
144
|
-
hasFocus: PropTypes.bool
|
|
143
|
+
hasFocus: PropTypes.bool,
|
|
145
144
|
|
|
146
145
|
/**
|
|
147
146
|
* The grid row id.
|
|
148
147
|
*/
|
|
149
|
-
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
148
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
150
149
|
|
|
151
150
|
/**
|
|
152
151
|
* If true, the cell is editable.
|
|
@@ -166,17 +165,17 @@ process.env.NODE_ENV !== "production" ? GridEditInputCell.propTypes = {
|
|
|
166
165
|
/**
|
|
167
166
|
* The row model of the row that the current cell belongs to.
|
|
168
167
|
*/
|
|
169
|
-
row: PropTypes.object
|
|
168
|
+
row: PropTypes.object,
|
|
170
169
|
|
|
171
170
|
/**
|
|
172
171
|
* The node of the row that the current cell belongs to.
|
|
173
172
|
*/
|
|
174
|
-
rowNode: PropTypes.object
|
|
173
|
+
rowNode: PropTypes.object,
|
|
175
174
|
|
|
176
175
|
/**
|
|
177
176
|
* the tabIndex value.
|
|
178
177
|
*/
|
|
179
|
-
tabIndex: PropTypes.oneOf([-1, 0])
|
|
178
|
+
tabIndex: PropTypes.oneOf([-1, 0]),
|
|
180
179
|
|
|
181
180
|
/**
|
|
182
181
|
* The cell value, but if the column has valueGetter, use getValue.
|
|
@@ -9,6 +9,10 @@ export interface GridEditSingleSelectCellProps extends GridRenderEditCellParams,
|
|
|
9
9
|
* @returns {Promise<void> | void} A promise to be awaited before calling `apiRef.current.setEditCellValue`
|
|
10
10
|
*/
|
|
11
11
|
onValueChange?: (event: SelectChangeEvent<any>, newValue: any) => Promise<void> | void;
|
|
12
|
+
/**
|
|
13
|
+
* If true, the select opens by default.
|
|
14
|
+
*/
|
|
15
|
+
initialOpen?: boolean;
|
|
12
16
|
}
|
|
13
17
|
declare function GridEditSingleSelectCell(props: GridEditSingleSelectCellProps): JSX.Element;
|
|
14
18
|
declare namespace GridEditSingleSelectCell {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "getValue", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange"];
|
|
3
|
+
const _excluded = ["id", "value", "formattedValue", "api", "field", "row", "rowNode", "colDef", "cellMode", "isEditable", "tabIndex", "className", "getValue", "hasFocus", "isValidating", "isProcessingProps", "error", "onValueChange", "initialOpen"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
@@ -23,9 +23,15 @@ const renderSingleSelectOptions = (option, OptionComponent) => {
|
|
|
23
23
|
}, key);
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
function isKeyboardEvent(event) {
|
|
27
|
+
return !!event.key;
|
|
28
|
+
}
|
|
29
|
+
|
|
26
30
|
function GridEditSingleSelectCell(props) {
|
|
27
31
|
var _rootProps$components, _baseSelectProps$nati, _rootProps$components2;
|
|
28
32
|
|
|
33
|
+
const rootProps = useGridRootProps();
|
|
34
|
+
|
|
29
35
|
const {
|
|
30
36
|
id,
|
|
31
37
|
value,
|
|
@@ -35,15 +41,15 @@ function GridEditSingleSelectCell(props) {
|
|
|
35
41
|
colDef,
|
|
36
42
|
hasFocus,
|
|
37
43
|
error,
|
|
38
|
-
onValueChange
|
|
44
|
+
onValueChange,
|
|
45
|
+
initialOpen = rootProps.editMode === GridEditModes.Cell
|
|
39
46
|
} = props,
|
|
40
47
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
41
48
|
|
|
42
49
|
const apiRef = useGridApiContext();
|
|
43
50
|
const ref = React.useRef();
|
|
44
51
|
const inputRef = React.useRef();
|
|
45
|
-
const
|
|
46
|
-
const [open, setOpen] = React.useState(rootProps.editMode === 'cell');
|
|
52
|
+
const [open, setOpen] = React.useState(initialOpen);
|
|
47
53
|
const baseSelectProps = ((_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseSelect) || {};
|
|
48
54
|
const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : false;
|
|
49
55
|
let valueOptionsFormatted;
|
|
@@ -140,7 +146,11 @@ function GridEditSingleSelectCell(props) {
|
|
|
140
146
|
}
|
|
141
147
|
};
|
|
142
148
|
|
|
143
|
-
const handleOpen =
|
|
149
|
+
const handleOpen = event => {
|
|
150
|
+
if (isKeyboardEvent(event) && event.key === 'Enter') {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
144
154
|
setOpen(true);
|
|
145
155
|
};
|
|
146
156
|
|
|
@@ -218,6 +228,11 @@ process.env.NODE_ENV !== "production" ? GridEditSingleSelectCell.propTypes = {
|
|
|
218
228
|
*/
|
|
219
229
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
220
230
|
|
|
231
|
+
/**
|
|
232
|
+
* If true, the select opens by default.
|
|
233
|
+
*/
|
|
234
|
+
initialOpen: PropTypes.bool,
|
|
235
|
+
|
|
221
236
|
/**
|
|
222
237
|
* If true, the cell is editable.
|
|
223
238
|
*/
|
|
@@ -27,8 +27,14 @@ const GridOverlayRoot = styled('div', {
|
|
|
27
27
|
})(({
|
|
28
28
|
theme
|
|
29
29
|
}) => ({
|
|
30
|
-
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
top: 0,
|
|
32
|
+
zIndex: 4,
|
|
33
|
+
// should be above pinned columns, pinned rows and detail panel
|
|
34
|
+
width: '100%',
|
|
31
35
|
height: '100%',
|
|
36
|
+
pointerEvents: 'none',
|
|
37
|
+
display: 'flex',
|
|
32
38
|
alignSelf: 'center',
|
|
33
39
|
alignItems: 'center',
|
|
34
40
|
justifyContent: 'center',
|
|
@@ -3,12 +3,13 @@ import { ClickAwayListenerProps } from '@mui/material/ClickAwayListener';
|
|
|
3
3
|
import { GrowProps } from '@mui/material/Grow';
|
|
4
4
|
import { PopperProps } from '@mui/material/Popper';
|
|
5
5
|
declare type MenuPosition = 'bottom-end' | 'bottom-start' | 'bottom' | 'left-end' | 'left-start' | 'left' | 'right-end' | 'right-start' | 'right' | 'top-end' | 'top-start' | 'top' | undefined;
|
|
6
|
-
export interface GridMenuProps extends Omit<PopperProps, 'onKeyDown'> {
|
|
6
|
+
export interface GridMenuProps extends Omit<PopperProps, 'onKeyDown' | 'children'> {
|
|
7
7
|
open: boolean;
|
|
8
|
-
target:
|
|
8
|
+
target: HTMLElement | null;
|
|
9
9
|
onClickAway: ClickAwayListenerProps['onClickAway'];
|
|
10
10
|
position?: MenuPosition;
|
|
11
11
|
onExited?: GrowProps['onExited'];
|
|
12
|
+
children: React.ReactNode;
|
|
12
13
|
}
|
|
13
14
|
declare const GridMenu: {
|
|
14
15
|
(props: GridMenuProps): JSX.Element;
|
|
@@ -121,6 +121,7 @@ process.env.NODE_ENV !== "production" ? GridMenu.propTypes = {
|
|
|
121
121
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
122
122
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
123
123
|
// ----------------------------------------------------------------------
|
|
124
|
+
children: PropTypes.node,
|
|
124
125
|
onClickAway: PropTypes.func.isRequired,
|
|
125
126
|
onExited: PropTypes.func,
|
|
126
127
|
|
|
@@ -7,7 +7,7 @@ export interface GridColumnHeaderMenuProps {
|
|
|
7
7
|
contentComponentProps?: any;
|
|
8
8
|
field: string;
|
|
9
9
|
open: boolean;
|
|
10
|
-
target:
|
|
10
|
+
target: HTMLElement | null;
|
|
11
11
|
onExited?: GridMenuProps['onExited'];
|
|
12
12
|
}
|
|
13
13
|
declare function GridColumnHeaderMenu({ columnMenuId, columnMenuButtonId, ContentComponent, contentComponentProps, field, open, target, onExited, }: GridColumnHeaderMenuProps): JSX.Element | null;
|
|
@@ -18,5 +18,5 @@ export interface GridPanelProps extends StandardProps<MUIStyledCommonProps<Theme
|
|
|
18
18
|
open: boolean;
|
|
19
19
|
}
|
|
20
20
|
export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
21
|
-
declare const GridPanel: React.ForwardRefExoticComponent<Pick<GridPanelProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "
|
|
21
|
+
declare const GridPanel: React.ForwardRefExoticComponent<Pick<GridPanelProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "as" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "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-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" | "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" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "theme" | "classes" | "placement" | "anchorEl" | "container" | "disablePortal" | "keepMounted" | "modifiers" | "popperOptions" | "popperRef"> & React.RefAttributes<HTMLDivElement>>;
|
|
22
22
|
export { GridPanel };
|
|
@@ -98,6 +98,7 @@ process.env.NODE_ENV !== "production" ? GridPanel.propTypes = {
|
|
|
98
98
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
99
99
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
100
100
|
// ----------------------------------------------------------------------
|
|
101
|
+
children: PropTypes.node,
|
|
101
102
|
|
|
102
103
|
/**
|
|
103
104
|
* Override or extend the styles applied to the component.
|
|
@@ -77,6 +77,10 @@ export interface GridFilterFormProps {
|
|
|
77
77
|
* @default {}
|
|
78
78
|
*/
|
|
79
79
|
valueInputProps?: any;
|
|
80
|
+
/**
|
|
81
|
+
* @ignore - do not document.
|
|
82
|
+
*/
|
|
83
|
+
children?: React.ReactNode;
|
|
80
84
|
}
|
|
81
85
|
declare const GridFilterForm: React.ForwardRefExoticComponent<GridFilterFormProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
86
|
export { GridFilterForm };
|
|
@@ -351,6 +351,11 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
|
|
|
351
351
|
*/
|
|
352
352
|
applyMultiFilterOperatorChanges: PropTypes.func.isRequired,
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* @ignore - do not document.
|
|
356
|
+
*/
|
|
357
|
+
children: PropTypes.node,
|
|
358
|
+
|
|
354
359
|
/**
|
|
355
360
|
* Props passed to the column input component.
|
|
356
361
|
* @default {}
|