@mui/x-data-grid 5.15.2 → 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 +43 -1
- package/DataGrid/DataGrid.js +1 -1
- 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/GridEditSingleSelectCell.js +9 -1
- 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/GridToolbarExportContainer.d.ts +1 -1
- package/hooks/utils/useGridNativeEventListener.d.ts +1 -1
- package/hooks/utils/useGridNativeEventListener.js +2 -2
- package/index.js +1 -1
- package/legacy/DataGrid/DataGrid.js +1 -1
- 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/GridEditSingleSelectCell.js +9 -1
- 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/hooks/utils/useGridNativeEventListener.js +2 -2
- package/legacy/index.js +1 -1
- package/models/params/gridMenuParams.d.ts +1 -2
- package/models/props/DataGridProps.d.ts +1 -1
- package/modern/DataGrid/DataGrid.js +1 -1
- 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/GridEditSingleSelectCell.js +9 -1
- 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/hooks/utils/useGridNativeEventListener.js +2 -2
- package/modern/index.js +1 -1
- package/node/DataGrid/DataGrid.js +1 -1
- 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/GridEditSingleSelectCell.js +9 -1
- 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/hooks/utils/useGridNativeEventListener.js +2 -2
- package/node/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
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
|
+
|
|
6
48
|
## 5.15.2
|
|
7
49
|
|
|
8
50
|
_Aug 11, 2022_
|
|
@@ -13,7 +55,7 @@ We'd like to offer a big thanks to the 7 contributors who made this release poss
|
|
|
13
55
|
- 📚 Documentation improvements
|
|
14
56
|
- 🐞 Bugfixes
|
|
15
57
|
|
|
16
|
-
### `@mui/x-data-grid@
|
|
58
|
+
### `@mui/x-data-grid@v5.15.2` / `@mui/x-data-grid-pro@v5.15.2` / `@mui/x-data-grid-premium@v5.15.2`
|
|
17
59
|
|
|
18
60
|
#### Changes
|
|
19
61
|
|
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
|
|
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) {
|
|
@@ -23,6 +23,10 @@ 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
|
|
|
@@ -142,7 +146,11 @@ function GridEditSingleSelectCell(props) {
|
|
|
142
146
|
}
|
|
143
147
|
};
|
|
144
148
|
|
|
145
|
-
const handleOpen =
|
|
149
|
+
const handleOpen = event => {
|
|
150
|
+
if (isKeyboardEvent(event) && event.key === 'Enter') {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
|
|
146
154
|
setOpen(true);
|
|
147
155
|
};
|
|
148
156
|
|
|
@@ -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 {}
|
|
@@ -3,7 +3,7 @@ import { AutocompleteProps } from '@mui/material/Autocomplete';
|
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
4
|
export declare type GridFilterInputMultipleValueProps = {
|
|
5
5
|
type?: 'text' | 'number';
|
|
6
|
-
} & GridFilterInputValueProps & Omit<AutocompleteProps<
|
|
6
|
+
} & GridFilterInputValueProps & Omit<AutocompleteProps<string, true, false, true>, 'options' | 'renderInput'>;
|
|
7
7
|
declare function GridFilterInputMultipleValue(props: GridFilterInputMultipleValueProps): JSX.Element;
|
|
8
8
|
declare namespace GridFilterInputMultipleValue {
|
|
9
9
|
var propTypes: any;
|
|
@@ -10,6 +10,10 @@ export interface GridFilterPanelProps extends Pick<GridFilterFormProps, 'linkOpe
|
|
|
10
10
|
* Props passed to each filter form.
|
|
11
11
|
*/
|
|
12
12
|
filterFormProps?: Pick<GridFilterFormProps, 'columnsSort' | 'deleteIconProps' | 'linkOperatorInputProps' | 'operatorInputProps' | 'columnInputProps' | 'valueInputProps'>;
|
|
13
|
+
/**
|
|
14
|
+
* @ignore - do not document.
|
|
15
|
+
*/
|
|
16
|
+
children?: React.ReactNode;
|
|
13
17
|
}
|
|
14
18
|
declare const GridFilterPanel: React.ForwardRefExoticComponent<GridFilterPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
19
|
export { GridFilterPanel };
|
|
@@ -126,6 +126,11 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
126
126
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
127
127
|
// ----------------------------------------------------------------------
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* @ignore - do not document.
|
|
131
|
+
*/
|
|
132
|
+
children: PropTypes.node,
|
|
133
|
+
|
|
129
134
|
/**
|
|
130
135
|
* Changes how the options in the columns selector should be ordered.
|
|
131
136
|
* If not specified, the order is derived from the `columns` prop.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
-
export declare const GridToolbarColumnsButton: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "
|
|
3
|
+
export declare const GridToolbarColumnsButton: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "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 | "variant" | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "disableElevation" | "fullWidth" | "endIcon" | "startIcon"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
-
export declare const GridToolbarDensitySelector: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "
|
|
3
|
+
export declare const GridToolbarDensitySelector: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "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 | "variant" | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "disableElevation" | "fullWidth" | "endIcon" | "startIcon"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material/Button';
|
|
3
|
-
export declare const GridToolbarExportContainer: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "
|
|
3
|
+
export declare const GridToolbarExportContainer: React.ForwardRefExoticComponent<Pick<ButtonProps<"button", {}>, "hidden" | "color" | "size" | "translate" | "disabled" | "form" | "slot" | "title" | "key" | "action" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "href" | "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 | "variant" | "onFocusVisible" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "disableElevation" | "fullWidth" | "endIcon" | "startIcon"> & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridApiCommon } from '../../models';
|
|
3
|
-
export declare const useGridNativeEventListener: <Api extends GridApiCommon,
|
|
3
|
+
export declare const useGridNativeEventListener: <Api extends GridApiCommon, K extends keyof HTMLElementEventMap>(apiRef: React.MutableRefObject<Api>, ref: React.MutableRefObject<HTMLDivElement | null> | (() => HTMLElement | undefined | null), eventName: K, handler?: ((event: HTMLElementEventMap[K]) => any) | undefined, options?: AddEventListenerOptions) => void;
|
|
@@ -5,8 +5,8 @@ export const useGridNativeEventListener = (apiRef, ref, eventName, handler, opti
|
|
|
5
5
|
const logger = useGridLogger(apiRef, 'useNativeEventListener');
|
|
6
6
|
const [added, setAdded] = React.useState(false);
|
|
7
7
|
const handlerRef = React.useRef(handler);
|
|
8
|
-
const wrapHandler = React.useCallback(
|
|
9
|
-
return handlerRef.current && handlerRef.current(
|
|
8
|
+
const wrapHandler = React.useCallback(event => {
|
|
9
|
+
return handlerRef.current && handlerRef.current(event);
|
|
10
10
|
}, []);
|
|
11
11
|
React.useEffect(() => {
|
|
12
12
|
handlerRef.current = handler;
|
package/index.js
CHANGED
|
@@ -349,7 +349,7 @@ DataGridRaw.propTypes = {
|
|
|
349
349
|
|
|
350
350
|
/**
|
|
351
351
|
* Allows to pass the logging level or false to turn off logging.
|
|
352
|
-
* @default "
|
|
352
|
+
* @default "error" ("warn" in dev mode)
|
|
353
353
|
*/
|
|
354
354
|
logLevel: PropTypes.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
355
355
|
|
|
@@ -113,6 +113,13 @@ process.env.NODE_ENV !== "production" ? GridAutoSizer.propTypes = {
|
|
|
113
113
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
114
114
|
// ----------------------------------------------------------------------
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Function responsible for rendering children.
|
|
118
|
+
* @param {AutoSizerSize} size The grid's size.
|
|
119
|
+
* @returns {React.ReactNode} The children to render.
|
|
120
|
+
*/
|
|
121
|
+
children: PropTypes.func.isRequired,
|
|
122
|
+
|
|
116
123
|
/**
|
|
117
124
|
* Default height to use for initial render; useful for SSR.
|
|
118
125
|
* @default null
|
|
@@ -50,10 +50,7 @@ function GridOverlayWrapper(props) {
|
|
|
50
50
|
width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
|
|
51
51
|
position: 'absolute',
|
|
52
52
|
top: headerHeight,
|
|
53
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
54
|
-
zIndex: 4,
|
|
55
|
-
// should be above pinned columns, pinned rows and detail panel
|
|
56
|
-
pointerEvents: 'none'
|
|
53
|
+
bottom: height === 'auto' ? 0 : undefined
|
|
57
54
|
}
|
|
58
55
|
}, props));
|
|
59
56
|
}
|
|
@@ -101,7 +101,7 @@ function GridEditDateCell(props) {
|
|
|
101
101
|
_newFormattedDate$spl = newFormattedDate.split('T'), _newFormattedDate$spl2 = _slicedToArray(_newFormattedDate$spl, 2), date = _newFormattedDate$spl2[0], time = _newFormattedDate$spl2[1];
|
|
102
102
|
_date$split = date.split('-'), _date$split2 = _slicedToArray(_date$split, 3), year = _date$split2[0], month = _date$split2[1], day = _date$split2[2];
|
|
103
103
|
newParsedDate = new Date();
|
|
104
|
-
newParsedDate.setFullYear(year, Number(month) - 1, day);
|
|
104
|
+
newParsedDate.setFullYear(Number(year), Number(month) - 1, Number(day));
|
|
105
105
|
newParsedDate.setHours(0, 0, 0, 0);
|
|
106
106
|
|
|
107
107
|
if (time) {
|
|
@@ -27,6 +27,10 @@ var renderSingleSelectOptions = function renderSingleSelectOptions(option, Optio
|
|
|
27
27
|
}, key);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
function isKeyboardEvent(event) {
|
|
31
|
+
return !!event.key;
|
|
32
|
+
}
|
|
33
|
+
|
|
30
34
|
function GridEditSingleSelectCell(props) {
|
|
31
35
|
var _rootProps$components, _baseSelectProps$nati, _rootProps$components2;
|
|
32
36
|
|
|
@@ -197,7 +201,11 @@ function GridEditSingleSelectCell(props) {
|
|
|
197
201
|
}
|
|
198
202
|
};
|
|
199
203
|
|
|
200
|
-
var handleOpen = function handleOpen() {
|
|
204
|
+
var handleOpen = function handleOpen(event) {
|
|
205
|
+
if (isKeyboardEvent(event) && event.key === 'Enter') {
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
201
209
|
setOpen(true);
|
|
202
210
|
};
|
|
203
211
|
|
|
@@ -27,8 +27,14 @@ var GridOverlayRoot = styled('div', {
|
|
|
27
27
|
})(function (_ref) {
|
|
28
28
|
var theme = _ref.theme;
|
|
29
29
|
return {
|
|
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',
|
|
@@ -123,6 +123,7 @@ process.env.NODE_ENV !== "production" ? GridMenu.propTypes = {
|
|
|
123
123
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
124
124
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
125
125
|
// ----------------------------------------------------------------------
|
|
126
|
+
children: PropTypes.node,
|
|
126
127
|
onClickAway: PropTypes.func.isRequired,
|
|
127
128
|
onExited: PropTypes.func,
|
|
128
129
|
|
|
@@ -113,6 +113,7 @@ process.env.NODE_ENV !== "production" ? GridPanel.propTypes = {
|
|
|
113
113
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
114
114
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
115
115
|
// ----------------------------------------------------------------------
|
|
116
|
+
children: PropTypes.node,
|
|
116
117
|
|
|
117
118
|
/**
|
|
118
119
|
* Override or extend the styles applied to the component.
|
|
@@ -386,6 +386,11 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
|
|
|
386
386
|
*/
|
|
387
387
|
applyMultiFilterOperatorChanges: PropTypes.func.isRequired,
|
|
388
388
|
|
|
389
|
+
/**
|
|
390
|
+
* @ignore - do not document.
|
|
391
|
+
*/
|
|
392
|
+
children: PropTypes.node,
|
|
393
|
+
|
|
389
394
|
/**
|
|
390
395
|
* Props passed to the column input component.
|
|
391
396
|
* @default {}
|
|
@@ -129,6 +129,11 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
129
129
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
130
130
|
// ----------------------------------------------------------------------
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* @ignore - do not document.
|
|
134
|
+
*/
|
|
135
|
+
children: PropTypes.node,
|
|
136
|
+
|
|
132
137
|
/**
|
|
133
138
|
* Changes how the options in the columns selector should be ordered.
|
|
134
139
|
* If not specified, the order is derived from the `columns` prop.
|
|
@@ -11,8 +11,8 @@ export var useGridNativeEventListener = function useGridNativeEventListener(apiR
|
|
|
11
11
|
setAdded = _React$useState2[1];
|
|
12
12
|
|
|
13
13
|
var handlerRef = React.useRef(handler);
|
|
14
|
-
var wrapHandler = React.useCallback(function (
|
|
15
|
-
return handlerRef.current && handlerRef.current(
|
|
14
|
+
var wrapHandler = React.useCallback(function (event) {
|
|
15
|
+
return handlerRef.current && handlerRef.current(event);
|
|
16
16
|
}, []);
|
|
17
17
|
React.useEffect(function () {
|
|
18
18
|
handlerRef.current = handler;
|
package/legacy/index.js
CHANGED
|
@@ -234,7 +234,7 @@ export interface DataGridPropsWithDefaultValues {
|
|
|
234
234
|
logger: Logger;
|
|
235
235
|
/**
|
|
236
236
|
* Allows to pass the logging level or false to turn off logging.
|
|
237
|
-
* @default "
|
|
237
|
+
* @default "error" ("warn" in dev mode)
|
|
238
238
|
*/
|
|
239
239
|
logLevel: keyof Logger | false;
|
|
240
240
|
/**
|
|
@@ -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
|
|
|
@@ -104,6 +104,13 @@ process.env.NODE_ENV !== "production" ? GridAutoSizer.propTypes = {
|
|
|
104
104
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
105
105
|
// ----------------------------------------------------------------------
|
|
106
106
|
|
|
107
|
+
/**
|
|
108
|
+
* Function responsible for rendering children.
|
|
109
|
+
* @param {AutoSizerSize} size The grid's size.
|
|
110
|
+
* @returns {React.ReactNode} The children to render.
|
|
111
|
+
*/
|
|
112
|
+
children: PropTypes.func.isRequired,
|
|
113
|
+
|
|
107
114
|
/**
|
|
108
115
|
* Default height to use for initial render; useful for SSR.
|
|
109
116
|
* @default null
|
|
@@ -36,10 +36,7 @@ function GridOverlayWrapper(props) {
|
|
|
36
36
|
width: viewportInnerSize?.width ?? 0,
|
|
37
37
|
position: 'absolute',
|
|
38
38
|
top: headerHeight,
|
|
39
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
40
|
-
zIndex: 4,
|
|
41
|
-
// should be above pinned columns, pinned rows and detail panel
|
|
42
|
-
pointerEvents: 'none'
|
|
39
|
+
bottom: height === 'auto' ? 0 : undefined
|
|
43
40
|
}
|
|
44
41
|
}, props));
|
|
45
42
|
}
|
|
@@ -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) {
|
|
@@ -23,6 +23,10 @@ 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
|
const rootProps = useGridRootProps();
|
|
28
32
|
|
|
@@ -136,7 +140,11 @@ function GridEditSingleSelectCell(props) {
|
|
|
136
140
|
}
|
|
137
141
|
};
|
|
138
142
|
|
|
139
|
-
const handleOpen =
|
|
143
|
+
const handleOpen = event => {
|
|
144
|
+
if (isKeyboardEvent(event) && event.key === 'Enter') {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
|
|
140
148
|
setOpen(true);
|
|
141
149
|
};
|
|
142
150
|
|
|
@@ -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',
|
|
@@ -119,6 +119,7 @@ process.env.NODE_ENV !== "production" ? GridMenu.propTypes = {
|
|
|
119
119
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
120
120
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
121
121
|
// ----------------------------------------------------------------------
|
|
122
|
+
children: PropTypes.node,
|
|
122
123
|
onClickAway: PropTypes.func.isRequired,
|
|
123
124
|
onExited: PropTypes.func,
|
|
124
125
|
|
|
@@ -96,6 +96,7 @@ process.env.NODE_ENV !== "production" ? GridPanel.propTypes = {
|
|
|
96
96
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
97
97
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
98
98
|
// ----------------------------------------------------------------------
|
|
99
|
+
children: PropTypes.node,
|
|
99
100
|
|
|
100
101
|
/**
|
|
101
102
|
* Override or extend the styles applied to the component.
|
|
@@ -345,6 +345,11 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
|
|
|
345
345
|
*/
|
|
346
346
|
applyMultiFilterOperatorChanges: PropTypes.func.isRequired,
|
|
347
347
|
|
|
348
|
+
/**
|
|
349
|
+
* @ignore - do not document.
|
|
350
|
+
*/
|
|
351
|
+
children: PropTypes.node,
|
|
352
|
+
|
|
348
353
|
/**
|
|
349
354
|
* Props passed to the column input component.
|
|
350
355
|
* @default {}
|
|
@@ -120,6 +120,11 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
120
120
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
121
121
|
// ----------------------------------------------------------------------
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* @ignore - do not document.
|
|
125
|
+
*/
|
|
126
|
+
children: PropTypes.node,
|
|
127
|
+
|
|
123
128
|
/**
|
|
124
129
|
* Changes how the options in the columns selector should be ordered.
|
|
125
130
|
* If not specified, the order is derived from the `columns` prop.
|
|
@@ -5,8 +5,8 @@ export const useGridNativeEventListener = (apiRef, ref, eventName, handler, opti
|
|
|
5
5
|
const logger = useGridLogger(apiRef, 'useNativeEventListener');
|
|
6
6
|
const [added, setAdded] = React.useState(false);
|
|
7
7
|
const handlerRef = React.useRef(handler);
|
|
8
|
-
const wrapHandler = React.useCallback(
|
|
9
|
-
return handlerRef.current && handlerRef.current(
|
|
8
|
+
const wrapHandler = React.useCallback(event => {
|
|
9
|
+
return handlerRef.current && handlerRef.current(event);
|
|
10
10
|
}, []);
|
|
11
11
|
React.useEffect(() => {
|
|
12
12
|
handlerRef.current = handler;
|
package/modern/index.js
CHANGED
|
@@ -370,7 +370,7 @@ DataGridRaw.propTypes = {
|
|
|
370
370
|
|
|
371
371
|
/**
|
|
372
372
|
* Allows to pass the logging level or false to turn off logging.
|
|
373
|
-
* @default "
|
|
373
|
+
* @default "error" ("warn" in dev mode)
|
|
374
374
|
*/
|
|
375
375
|
logLevel: _propTypes.default.oneOf(['debug', 'error', 'info', 'warn', false]),
|
|
376
376
|
|
|
@@ -126,6 +126,13 @@ process.env.NODE_ENV !== "production" ? GridAutoSizer.propTypes = {
|
|
|
126
126
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
127
127
|
// ----------------------------------------------------------------------
|
|
128
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Function responsible for rendering children.
|
|
131
|
+
* @param {AutoSizerSize} size The grid's size.
|
|
132
|
+
* @returns {React.ReactNode} The children to render.
|
|
133
|
+
*/
|
|
134
|
+
children: _propTypes.default.func.isRequired,
|
|
135
|
+
|
|
129
136
|
/**
|
|
130
137
|
* Default height to use for initial render; useful for SSR.
|
|
131
138
|
* @default null
|
|
@@ -66,10 +66,7 @@ function GridOverlayWrapper(props) {
|
|
|
66
66
|
width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
|
|
67
67
|
position: 'absolute',
|
|
68
68
|
top: headerHeight,
|
|
69
|
-
bottom: height === 'auto' ? 0 : undefined
|
|
70
|
-
zIndex: 4,
|
|
71
|
-
// should be above pinned columns, pinned rows and detail panel
|
|
72
|
-
pointerEvents: 'none'
|
|
69
|
+
bottom: height === 'auto' ? 0 : undefined
|
|
73
70
|
}
|
|
74
71
|
}, props));
|
|
75
72
|
}
|
|
@@ -107,7 +107,7 @@ function GridEditDateCell(props) {
|
|
|
107
107
|
const [date, time] = newFormattedDate.split('T');
|
|
108
108
|
const [year, month, day] = date.split('-');
|
|
109
109
|
newParsedDate = new Date();
|
|
110
|
-
newParsedDate.setFullYear(year, Number(month) - 1, day);
|
|
110
|
+
newParsedDate.setFullYear(Number(year), Number(month) - 1, Number(day));
|
|
111
111
|
newParsedDate.setHours(0, 0, 0, 0);
|
|
112
112
|
|
|
113
113
|
if (time) {
|
|
@@ -49,6 +49,10 @@ const renderSingleSelectOptions = (option, OptionComponent) => {
|
|
|
49
49
|
}, key);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
+
function isKeyboardEvent(event) {
|
|
53
|
+
return !!event.key;
|
|
54
|
+
}
|
|
55
|
+
|
|
52
56
|
function GridEditSingleSelectCell(props) {
|
|
53
57
|
var _rootProps$components, _baseSelectProps$nati, _rootProps$components2;
|
|
54
58
|
|
|
@@ -166,7 +170,11 @@ function GridEditSingleSelectCell(props) {
|
|
|
166
170
|
}
|
|
167
171
|
};
|
|
168
172
|
|
|
169
|
-
const handleOpen =
|
|
173
|
+
const handleOpen = event => {
|
|
174
|
+
if (isKeyboardEvent(event) && event.key === 'Enter') {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
|
|
170
178
|
setOpen(true);
|
|
171
179
|
};
|
|
172
180
|
|
|
@@ -50,8 +50,14 @@ const GridOverlayRoot = (0, _styles.styled)('div', {
|
|
|
50
50
|
})(({
|
|
51
51
|
theme
|
|
52
52
|
}) => ({
|
|
53
|
-
|
|
53
|
+
position: 'absolute',
|
|
54
|
+
top: 0,
|
|
55
|
+
zIndex: 4,
|
|
56
|
+
// should be above pinned columns, pinned rows and detail panel
|
|
57
|
+
width: '100%',
|
|
54
58
|
height: '100%',
|
|
59
|
+
pointerEvents: 'none',
|
|
60
|
+
display: 'flex',
|
|
55
61
|
alignSelf: 'center',
|
|
56
62
|
alignItems: 'center',
|
|
57
63
|
justifyContent: 'center',
|
|
@@ -150,6 +150,7 @@ process.env.NODE_ENV !== "production" ? GridMenu.propTypes = {
|
|
|
150
150
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
151
151
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
152
152
|
// ----------------------------------------------------------------------
|
|
153
|
+
children: _propTypes.default.node,
|
|
153
154
|
onClickAway: _propTypes.default.func.isRequired,
|
|
154
155
|
onExited: _propTypes.default.func,
|
|
155
156
|
|
|
@@ -126,6 +126,7 @@ process.env.NODE_ENV !== "production" ? GridPanel.propTypes = {
|
|
|
126
126
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
127
127
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
128
128
|
// ----------------------------------------------------------------------
|
|
129
|
+
children: _propTypes.default.node,
|
|
129
130
|
|
|
130
131
|
/**
|
|
131
132
|
* Override or extend the styles applied to the component.
|
|
@@ -380,6 +380,11 @@ process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
|
|
|
380
380
|
*/
|
|
381
381
|
applyMultiFilterOperatorChanges: _propTypes.default.func.isRequired,
|
|
382
382
|
|
|
383
|
+
/**
|
|
384
|
+
* @ignore - do not document.
|
|
385
|
+
*/
|
|
386
|
+
children: _propTypes.default.node,
|
|
387
|
+
|
|
383
388
|
/**
|
|
384
389
|
* Props passed to the column input component.
|
|
385
390
|
* @default {}
|
|
@@ -154,6 +154,11 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
|
|
|
154
154
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
155
155
|
// ----------------------------------------------------------------------
|
|
156
156
|
|
|
157
|
+
/**
|
|
158
|
+
* @ignore - do not document.
|
|
159
|
+
*/
|
|
160
|
+
children: _propTypes.default.node,
|
|
161
|
+
|
|
157
162
|
/**
|
|
158
163
|
* Changes how the options in the columns selector should be ordered.
|
|
159
164
|
* If not specified, the order is derived from the `columns` prop.
|
|
@@ -19,8 +19,8 @@ const useGridNativeEventListener = (apiRef, ref, eventName, handler, options) =>
|
|
|
19
19
|
const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useNativeEventListener');
|
|
20
20
|
const [added, setAdded] = React.useState(false);
|
|
21
21
|
const handlerRef = React.useRef(handler);
|
|
22
|
-
const wrapHandler = React.useCallback(
|
|
23
|
-
return handlerRef.current && handlerRef.current(
|
|
22
|
+
const wrapHandler = React.useCallback(event => {
|
|
23
|
+
return handlerRef.current && handlerRef.current(event);
|
|
24
24
|
}, []);
|
|
25
25
|
React.useEffect(() => {
|
|
26
26
|
handlerRef.current = handler;
|
package/node/index.js
CHANGED