@mui/x-data-grid 6.0.2 → 6.0.4
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 +119 -5
- package/components/GridPagination.d.ts +2 -2
- package/components/GridRow.js +1 -1
- package/components/columnHeaders/GridColumnHeaderSeparator.js +3 -3
- package/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/components/menu/columnMenu/GridColumnMenu.d.ts +5 -5
- package/components/menu/columnMenu/GridColumnMenu.js +30 -30
- package/components/menu/columnMenu/GridColumnMenuProps.d.ts +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/components/reexportable.d.ts +1 -1
- package/components/reexportable.js +1 -1
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +7 -1
- package/hooks/features/columnMenu/columnMenuInterfaces.d.ts +11 -11
- package/hooks/features/columnMenu/{useGridColumnMenuComponents.d.ts → useGridColumnMenuSlots.d.ts} +4 -4
- package/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
- package/hooks/features/columns/useGridColumns.js +1 -1
- package/hooks/features/filter/useGridFilter.js +1 -1
- package/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +3 -3
- package/hooks/features/sorting/useGridSorting.js +1 -1
- package/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/hooks/utils/useGridApiEventHandler.js +3 -3
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/legacy/components/GridRow.js +1 -1
- package/legacy/components/columnHeaders/GridColumnHeaderSeparator.js +3 -3
- package/legacy/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/legacy/components/menu/columnMenu/GridColumnMenu.js +32 -32
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/legacy/components/reexportable.js +1 -1
- package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +7 -1
- package/legacy/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +25 -30
- package/legacy/hooks/features/columns/useGridColumns.js +1 -1
- package/legacy/hooks/features/filter/useGridFilter.js +1 -1
- package/legacy/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +3 -3
- package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
- package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/legacy/hooks/utils/useGridApiEventHandler.js +3 -3
- package/legacy/index.js +2 -2
- package/legacy/locales/bgBG.js +9 -12
- package/legacy/locales/daDK.js +16 -21
- package/legacy/locales/esES.js +1 -1
- package/legacy/locales/faIR.js +2 -2
- package/legacy/locales/nbNO.js +10 -12
- package/legacy/locales/nlNL.js +7 -9
- package/legacy/locales/svSE.js +2 -2
- package/legacy/models/gridEditRowModel.js +9 -9
- package/legacy/models/gridFilterItem.js +3 -3
- package/legacy/models/params/gridEditCellParams.js +10 -10
- package/legacy/models/params/gridRowParams.js +9 -9
- package/locales/bgBG.js +9 -12
- package/locales/daDK.js +16 -21
- package/locales/esES.js +1 -1
- package/locales/faIR.js +2 -2
- package/locales/nbNO.js +10 -12
- package/locales/nlNL.js +7 -9
- package/locales/svSE.js +2 -2
- package/models/gridEditRowModel.js +9 -9
- package/models/gridFilterItem.js +3 -3
- package/models/params/gridEditCellParams.js +10 -10
- package/models/params/gridRowParams.js +9 -9
- package/modern/components/GridRow.js +1 -1
- package/modern/components/columnHeaders/GridColumnHeaderSeparator.js +3 -3
- package/modern/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/modern/components/menu/columnMenu/GridColumnMenu.js +30 -30
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/modern/components/reexportable.js +1 -1
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +6 -1
- package/modern/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +21 -26
- package/modern/hooks/features/columns/useGridColumns.js +1 -1
- package/modern/hooks/features/filter/useGridFilter.js +1 -1
- package/modern/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +3 -3
- package/modern/hooks/features/sorting/useGridSorting.js +1 -1
- package/modern/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/modern/hooks/utils/useGridApiEventHandler.js +3 -3
- package/modern/index.js +2 -2
- package/modern/locales/bgBG.js +9 -12
- package/modern/locales/daDK.js +16 -21
- package/modern/locales/esES.js +1 -1
- package/modern/locales/faIR.js +2 -2
- package/modern/locales/nbNO.js +10 -12
- package/modern/locales/nlNL.js +7 -9
- package/modern/locales/svSE.js +2 -2
- package/modern/models/gridEditRowModel.js +9 -9
- package/modern/models/gridFilterItem.js +3 -3
- package/modern/models/params/gridEditCellParams.js +10 -10
- package/modern/models/params/gridRowParams.js +9 -9
- package/node/components/GridRow.js +1 -1
- package/node/components/columnHeaders/GridColumnHeaderSeparator.js +4 -4
- package/node/components/columnHeaders/GridColumnHeaderTitle.js +5 -5
- package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +4 -2
- package/node/components/menu/columnMenu/GridColumnMenu.js +33 -33
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -1
- package/node/components/reexportable.js +4 -4
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +6 -1
- package/node/hooks/features/columnMenu/{useGridColumnMenuComponents.js → useGridColumnMenuSlots.js} +22 -27
- package/node/hooks/features/columns/useGridColumns.js +1 -1
- package/node/hooks/features/filter/useGridFilter.js +1 -1
- package/node/hooks/features/preferencesPanel/gridPreferencePanelsValue.js +4 -4
- package/node/hooks/features/sorting/useGridSorting.js +1 -1
- package/node/hooks/features/virtualization/useGridVirtualScroller.js +1 -1
- package/node/hooks/utils/useGridApiEventHandler.js +4 -4
- package/node/index.js +7 -7
- package/node/locales/bgBG.js +9 -12
- package/node/locales/daDK.js +16 -21
- package/node/locales/esES.js +1 -1
- package/node/locales/faIR.js +2 -2
- package/node/locales/nbNO.js +10 -12
- package/node/locales/nlNL.js +7 -9
- package/node/locales/svSE.js +2 -2
- package/node/models/gridEditRowModel.js +12 -12
- package/node/models/gridFilterItem.js +4 -4
- package/node/models/params/gridEditCellParams.js +12 -12
- package/node/models/params/gridRowParams.js +11 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,121 @@
|
|
|
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
|
+
## 6.0.4
|
|
7
|
+
|
|
8
|
+
_Mar 30, 2023_
|
|
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
|
+
- 🌍 Add Danish (da-DK), and improve Norwegian (nb-NO), Spanish (es-ES), and Swedish (sv-SE) locales
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
- 📚 Documentation improvements
|
|
15
|
+
|
|
16
|
+
### `@mui/x-data-grid@v6.0.4` / `@mui/x-data-grid-pro@v6.0.4` / `@mui/x-data-grid-premium@v6.0.4`
|
|
17
|
+
|
|
18
|
+
#### Changes
|
|
19
|
+
|
|
20
|
+
- [DataGrid] Fix column header tooltip not showing when the title is truncated (#8433) @rohitnatesh
|
|
21
|
+
- [DataGrid] Fix filter model buttons' display condition (#8415) @MBilalShafi
|
|
22
|
+
- [DataGrid] Fix infinite rerender in a flex parent (#8436) @cherniavskii
|
|
23
|
+
- [DataGrid] Prevent reopening column menu when clicking in the button while it is open (#8286) @tanuj-22
|
|
24
|
+
- [DataGrid] Rename `components` by `slots` in column menu API (#7999) @MBilalShafi
|
|
25
|
+
- [DataGrid] Remove hardcoded CSS classes' usages (#8444) @MBilalShafi
|
|
26
|
+
- [DataGridPremium] Fix aggregation initial state causing issue with quick filter (#8441) @MBilalShafi
|
|
27
|
+
- [l10n] Improve Danish (da-DK) locale (#8368) @BossElijah
|
|
28
|
+
- [l10n] Improve Danish (da-DK) locale (#8378) @BossElijah
|
|
29
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8367) @BossElijah
|
|
30
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8409) @BossElijah
|
|
31
|
+
- [l10n] Improve Spanish (es-ES) locale (#8420) @martjanz
|
|
32
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
33
|
+
|
|
34
|
+
### `@mui/x-date-pickers@v6.0.4` / `@mui/x-date-pickers-pro@v6.0.4`
|
|
35
|
+
|
|
36
|
+
#### Changes
|
|
37
|
+
|
|
38
|
+
- [fields] Add missing tokens to `AdapterDateFnsJalali` (#8402) @flaviendelangle
|
|
39
|
+
- [fields] Clean the active date manager (#8370) @flaviendelangle
|
|
40
|
+
- [fields] Cleanup `useFieldState` (#8292) @flaviendelangle
|
|
41
|
+
- [fields] Only add RTL characters when needed (#8325) @flaviendelangle
|
|
42
|
+
- [pickers] Add support for single input fields in range pickers (#7927) @flaviendelangle
|
|
43
|
+
- [pickers] Allows non token characters in format (#8256) @alexfauquette
|
|
44
|
+
- [pickers] Avoid root imports and move public models to the models folder (#8337) @flaviendelangle
|
|
45
|
+
- [pickers] Update `view` when `views` or `openTo` changes (#8361) @LukasTy
|
|
46
|
+
- [l10n] Improve Norwegian (nb-NO) locale (#8382) @BossElijah
|
|
47
|
+
- [l10n] Add Danish (da-DK) locale (#8379) @BossElijah
|
|
48
|
+
- [l10n] Improve Swedish (sv-SE) locale (#8381) @BossElijah
|
|
49
|
+
|
|
50
|
+
### `@mui/x-codemod@v6.0.4`
|
|
51
|
+
|
|
52
|
+
#### Changes
|
|
53
|
+
|
|
54
|
+
- [codemod] Fix `remove-stabilized-experimentalFeatures` codemod (#8289) @alexfauquette
|
|
55
|
+
|
|
56
|
+
### Docs
|
|
57
|
+
|
|
58
|
+
- [docs] Fix `GridCellParams` signature in migration guide (#8427) @cherniavskii
|
|
59
|
+
- [docs] Fix "Custom field" demos responsive styles (#8408) @LukasTy
|
|
60
|
+
- [docs] Remove `label` from demos where it reduces clarity (#8416) @LukasTy
|
|
61
|
+
- [docs] Update slots' references in Data Grid migration guide (#8159) @MBilalShafi
|
|
62
|
+
|
|
63
|
+
### Core
|
|
64
|
+
|
|
65
|
+
- [charts] Work on typing (#8421) @flaviendelangle
|
|
66
|
+
|
|
67
|
+
## 6.0.3
|
|
68
|
+
|
|
69
|
+
_Mar 23, 2023_
|
|
70
|
+
|
|
71
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
72
|
+
|
|
73
|
+
- 🌍 Improve Bulgarian (bg-BG), Persian (fa-IR), Polish (pl-PL), and Dutch (nl-NL) locales
|
|
74
|
+
- 🐞 Bugfixes
|
|
75
|
+
- 📚 Documentation improvements
|
|
76
|
+
|
|
77
|
+
### `@mui/x-data-grid@v6.0.3` / `@mui/x-data-grid-pro@v6.0.3` / `@mui/x-data-grid-premium@v6.0.3`
|
|
78
|
+
|
|
79
|
+
#### Changes
|
|
80
|
+
|
|
81
|
+
- [DataGrid] Fix overflow calculation issue in column group headers (#8246) @MBilalShafi
|
|
82
|
+
- [DataGridPro] Fix column reorder glitches (#8335) @cherniavskii
|
|
83
|
+
- [l10n] Improve Bulgarian (bg-BG) locale (#8315) @todevmilen
|
|
84
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
85
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
86
|
+
|
|
87
|
+
### `@mui/x-date-pickers@v6.0.3` / `@mui/x-date-pickers-pro@v6.0.3`
|
|
88
|
+
|
|
89
|
+
#### Changes
|
|
90
|
+
|
|
91
|
+
- [fields] Allow to reset the value from the outside (#8287) @flaviendelangle
|
|
92
|
+
- [fields] Cleanup section order generation (#8290) @flaviendelangle
|
|
93
|
+
- [fields] Fix Safari input selection resetting regression (#8295) @LukasTy
|
|
94
|
+
- [fields] Fix editing when all sections are selected (#8330) @flaviendelangle
|
|
95
|
+
- [fields] Fix iOS browser scroll jumping when entering data (#8328) @LukasTy
|
|
96
|
+
- [fields] New prop `unstableFieldRef` to imperatively interact with the selected sections (#8235) @flaviendelangle
|
|
97
|
+
- [pickers] Align date calendar colors (#8318) @LukasTy
|
|
98
|
+
- [pickers] Support invalid dates from the field (#8298) @flaviendelangle
|
|
99
|
+
- [l10n] Improve Persian (fa-IR) locale (#8268) @fakhamatia
|
|
100
|
+
- [l10n] Improve Polish (pl-PL) locale (#8344) @drmats
|
|
101
|
+
- [l10n] improve Dutch (nl-NL) locale (#8317) @developenguin
|
|
102
|
+
|
|
103
|
+
### Docs
|
|
104
|
+
|
|
105
|
+
- [docs] Create examples of pickers with custom fields (#8034) @flaviendelangle
|
|
106
|
+
- [docs] Fix 301 redirections @oliviertassinari
|
|
107
|
+
- [docs] Fix link to React's docs @oliviertassinari
|
|
108
|
+
- [docs] Fix pro license links to point to the same page (#8303) @LukasTy
|
|
109
|
+
- [docs] Give an incentive to upgrade (#8269) @oliviertassinari
|
|
110
|
+
- [docs] Improve contrast on data grid navigation (#8239) @oliviertassinari
|
|
111
|
+
- [docs] Update shortcuts page to use slotProps (#8288) @dcorb
|
|
112
|
+
- [docs] Explain the `shouldDisableTime` migration in more depth (#8348) @LukasTy
|
|
113
|
+
|
|
114
|
+
### Core
|
|
115
|
+
|
|
116
|
+
- [core] Remove unused `visx` chart package (#8259) @LukasTy
|
|
117
|
+
- [core] Upgrade monorepo (#8331) @cherniavskii
|
|
118
|
+
- [charts] Project setup (#8308) @alexfauquette
|
|
119
|
+
- [test] Track visual regressions of column menu and filter/column panels (#8095) @cherniavskii
|
|
120
|
+
|
|
6
121
|
## 6.0.2
|
|
7
122
|
|
|
8
123
|
_Mar 16, 2023_
|
|
@@ -98,11 +213,9 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
98
213
|
|
|
99
214
|
_Mar 3, 2023_
|
|
100
215
|
|
|
101
|
-
We're
|
|
216
|
+
We're excited to [announce the first v6 stable release](https://mui.com/blog/mui-x-v6/)! 🎉🚀
|
|
102
217
|
|
|
103
218
|
This is now the officially supported major version, where we'll keep rolling out new features, bug fixes, and improvements.
|
|
104
|
-
Head over to the [what's new](https://mui.com/x/whats-new/) page to check the highlighted new features.
|
|
105
|
-
|
|
106
219
|
Migration guides are available with a complete list of the breaking changes:
|
|
107
220
|
|
|
108
221
|
- [Data Grid](https://mui.com/x/migration/migration-data-grid-v5/)
|
|
@@ -119,6 +232,7 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
119
232
|
- experimentalFeatures={{ rowPinning: true }}
|
|
120
233
|
/>
|
|
121
234
|
```
|
|
235
|
+
|
|
122
236
|
- ⚡️ Improved grid performance by rows and cells memoization (#7846) @m4theushw
|
|
123
237
|
- ✨ Fields have a distinct visual state when empty (#8069) @LukasTy
|
|
124
238
|
- 🌍 Improve Czech (cs-CZ) locale (#8113) @BlastyCZ
|
|
@@ -556,14 +670,14 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
556
670
|
```
|
|
557
671
|
|
|
558
672
|
- The `error` and `onError` props were removed - the grid no longer catches errors during rendering.
|
|
559
|
-
To catch errors that happen during rendering use the [error boundary](https://
|
|
673
|
+
To catch errors that happen during rendering use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary).
|
|
560
674
|
|
|
561
675
|
- The `components.ErrorOverlay` slot was removed.
|
|
562
676
|
|
|
563
677
|
- The `GridErrorOverlay` component was removed.
|
|
564
678
|
|
|
565
679
|
- The `componentError` event was removed.
|
|
566
|
-
Use the [error boundary](https://
|
|
680
|
+
Use the [error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) to catch errors thrown during rendering.
|
|
567
681
|
|
|
568
682
|
- The `apiRef.current.showError` method was removed.
|
|
569
683
|
The UI for errors is no longer handled by the grid.
|
|
@@ -20,7 +20,7 @@ export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Parti
|
|
|
20
20
|
showFirstButton?: boolean | undefined;
|
|
21
21
|
showLastButton?: boolean | undefined;
|
|
22
22
|
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
23
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "labelDisplayedRows" | "labelRowsPerPage" | "onPageChange" | "onRowsPerPageChange" | "rowsPerPage" | "rowsPerPageOptions" | "showFirstButton" | "showLastButton" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps">>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationBaseProps & {
|
|
23
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "labelDisplayedRows" | "labelRowsPerPage" | "onPageChange" | "onRowsPerPageChange" | "rowsPerPage" | "rowsPerPageOptions" | "showFirstButton" | "showLastButton" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps">>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationBaseProps & {
|
|
24
24
|
ActionsComponent?: React.ElementType<import("@mui/material/TablePagination/TablePaginationActions").TablePaginationActionsProps> | undefined;
|
|
25
25
|
backIconButtonProps?: Partial<import("@mui/material").IconButtonProps<"button", {}>> | undefined;
|
|
26
26
|
classes?: Partial<import("@mui/material/TablePagination").TablePaginationClasses> | undefined;
|
|
@@ -41,4 +41,4 @@ export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Parti
|
|
|
41
41
|
showFirstButton?: boolean | undefined;
|
|
42
42
|
showLastButton?: boolean | undefined;
|
|
43
43
|
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
44
|
-
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "labelDisplayedRows" | "labelRowsPerPage" | "onPageChange" | "onRowsPerPageChange" | "rowsPerPage" | "rowsPerPageOptions" | "showFirstButton" | "showLastButton" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps">>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
+
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "labelDisplayedRows" | "labelRowsPerPage" | "onPageChange" | "onRowsPerPageChange" | "rowsPerPage" | "rowsPerPageOptions" | "showFirstButton" | "showLastButton" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps">>, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
package/components/GridRow.js
CHANGED
|
@@ -48,7 +48,7 @@ function EmptyCell({
|
|
|
48
48
|
width
|
|
49
49
|
};
|
|
50
50
|
return /*#__PURE__*/_jsx("div", {
|
|
51
|
-
className:
|
|
51
|
+
className: `${gridClasses.cell} ${gridClasses.withBorderColor}`,
|
|
52
52
|
style: style
|
|
53
53
|
}); // TODO change to .MuiDataGrid-emptyCell or .MuiDataGrid-rowFiller
|
|
54
54
|
}
|
|
@@ -7,11 +7,11 @@ import { unstable_composeClasses as composeClasses, unstable_capitalize as capit
|
|
|
7
7
|
import { getDataGridUtilityClass } from '../../constants/gridClasses';
|
|
8
8
|
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
var GridColumnHeaderSeparatorSides
|
|
11
|
-
(function (GridColumnHeaderSeparatorSides) {
|
|
10
|
+
var GridColumnHeaderSeparatorSides = /*#__PURE__*/function (GridColumnHeaderSeparatorSides) {
|
|
12
11
|
GridColumnHeaderSeparatorSides["Left"] = "left";
|
|
13
12
|
GridColumnHeaderSeparatorSides["Right"] = "right";
|
|
14
|
-
|
|
13
|
+
return GridColumnHeaderSeparatorSides;
|
|
14
|
+
}(GridColumnHeaderSeparatorSides || {});
|
|
15
15
|
const useUtilityClasses = ownerState => {
|
|
16
16
|
const {
|
|
17
17
|
resizable,
|
|
@@ -47,14 +47,13 @@ function GridColumnHeaderTitle(props) {
|
|
|
47
47
|
var _rootProps$slotProps;
|
|
48
48
|
const {
|
|
49
49
|
label,
|
|
50
|
-
description
|
|
51
|
-
columnWidth
|
|
50
|
+
description
|
|
52
51
|
} = props;
|
|
53
52
|
const rootProps = useGridRootProps();
|
|
54
53
|
const titleRef = React.useRef(null);
|
|
55
54
|
const [tooltip, setTooltip] = React.useState('');
|
|
56
|
-
React.
|
|
57
|
-
if (!description && titleRef && titleRef.current) {
|
|
55
|
+
const handleMouseOver = React.useCallback(() => {
|
|
56
|
+
if (!description && titleRef != null && titleRef.current) {
|
|
58
57
|
const isOver = isOverflown(titleRef.current);
|
|
59
58
|
if (isOver) {
|
|
60
59
|
setTooltip(label);
|
|
@@ -62,11 +61,12 @@ function GridColumnHeaderTitle(props) {
|
|
|
62
61
|
setTooltip('');
|
|
63
62
|
}
|
|
64
63
|
}
|
|
65
|
-
}, [
|
|
64
|
+
}, [description, label]);
|
|
66
65
|
return /*#__PURE__*/_jsx(rootProps.slots.baseTooltip, _extends({
|
|
67
66
|
title: description || tooltip
|
|
68
67
|
}, (_rootProps$slotProps = rootProps.slotProps) == null ? void 0 : _rootProps$slotProps.baseTooltip, {
|
|
69
68
|
children: /*#__PURE__*/_jsx(ColumnHeaderInnerTitle, {
|
|
69
|
+
onMouseOver: handleMouseOver,
|
|
70
70
|
ref: titleRef,
|
|
71
71
|
children: label
|
|
72
72
|
})
|
|
@@ -20,8 +20,10 @@ function GridColumnHeaderMenu({
|
|
|
20
20
|
const hideMenu = React.useCallback(event => {
|
|
21
21
|
// Prevent triggering the sorting
|
|
22
22
|
event.stopPropagation();
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
if (!(target != null && target.contains(event.target))) {
|
|
24
|
+
apiRef.current.hideColumnMenu();
|
|
25
|
+
}
|
|
26
|
+
}, [apiRef, target]);
|
|
25
27
|
if (!target) {
|
|
26
28
|
return null;
|
|
27
29
|
}
|
|
@@ -3,12 +3,12 @@ import { GridColumnMenuColumnsItem } from './menuItems/GridColumnMenuColumnsItem
|
|
|
3
3
|
import { GridColumnMenuFilterItem } from './menuItems/GridColumnMenuFilterItem';
|
|
4
4
|
import { GridColumnMenuSortItem } from './menuItems/GridColumnMenuSortItem';
|
|
5
5
|
import { GridColumnMenuProps, GridGenericColumnMenuProps } from './GridColumnMenuProps';
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export declare const GRID_COLUMN_MENU_SLOTS: {
|
|
7
|
+
columnMenuSortItem: typeof GridColumnMenuSortItem;
|
|
8
|
+
columnMenuFilterItem: typeof GridColumnMenuFilterItem;
|
|
9
|
+
columnMenuColumnsItem: typeof GridColumnMenuColumnsItem;
|
|
10
10
|
};
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const GRID_COLUMN_MENU_SLOT_PROPS: {
|
|
12
12
|
columnMenuSortItem: {
|
|
13
13
|
displayOrder: number;
|
|
14
14
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["
|
|
3
|
+
const _excluded = ["defaultSlots", "defaultSlotProps", "slots", "slotProps"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
|
-
import {
|
|
6
|
+
import { useGridColumnMenuSlots } from '../../../hooks/features/columnMenu/useGridColumnMenuSlots';
|
|
7
7
|
import { GridColumnMenuContainer } from './GridColumnMenuContainer';
|
|
8
8
|
import { GridColumnMenuColumnsItem } from './menuItems/GridColumnMenuColumnsItem';
|
|
9
9
|
import { GridColumnMenuFilterItem } from './menuItems/GridColumnMenuFilterItem';
|
|
10
10
|
import { GridColumnMenuSortItem } from './menuItems/GridColumnMenuSortItem';
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
export const GRID_COLUMN_MENU_SLOTS = {
|
|
13
|
+
columnMenuSortItem: GridColumnMenuSortItem,
|
|
14
|
+
columnMenuFilterItem: GridColumnMenuFilterItem,
|
|
15
|
+
columnMenuColumnsItem: GridColumnMenuColumnsItem
|
|
16
16
|
};
|
|
17
|
-
export const
|
|
17
|
+
export const GRID_COLUMN_MENU_SLOT_PROPS = {
|
|
18
18
|
columnMenuSortItem: {
|
|
19
19
|
displayOrder: 10
|
|
20
20
|
},
|
|
@@ -27,29 +27,29 @@ export const GRID_COLUMN_MENU_COMPONENTS_PROPS = {
|
|
|
27
27
|
};
|
|
28
28
|
const GridGenericColumnMenu = /*#__PURE__*/React.forwardRef(function GridGenericColumnMenu(props, ref) {
|
|
29
29
|
const {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
defaultSlots,
|
|
31
|
+
defaultSlotProps,
|
|
32
|
+
slots,
|
|
33
|
+
slotProps
|
|
34
34
|
} = props,
|
|
35
35
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
const orderedSlots = useGridColumnMenuSlots(_extends({}, other, {
|
|
37
|
+
defaultSlots,
|
|
38
|
+
defaultSlotProps,
|
|
39
|
+
slots,
|
|
40
|
+
slotProps
|
|
41
41
|
}));
|
|
42
42
|
return /*#__PURE__*/_jsx(GridColumnMenuContainer, _extends({
|
|
43
43
|
ref: ref
|
|
44
44
|
}, other, {
|
|
45
|
-
children:
|
|
45
|
+
children: orderedSlots.map(([Component, otherProps], index) => /*#__PURE__*/_jsx(Component, _extends({}, otherProps), index))
|
|
46
46
|
}));
|
|
47
47
|
});
|
|
48
48
|
const GridColumnMenu = /*#__PURE__*/React.forwardRef(function GridColumnMenu(props, ref) {
|
|
49
49
|
return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
|
|
50
50
|
ref: ref,
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
defaultSlots: GRID_COLUMN_MENU_SLOTS,
|
|
52
|
+
defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS
|
|
53
53
|
}));
|
|
54
54
|
});
|
|
55
55
|
process.env.NODE_ENV !== "production" ? GridColumnMenu.propTypes = {
|
|
@@ -58,20 +58,20 @@ process.env.NODE_ENV !== "production" ? GridColumnMenu.propTypes = {
|
|
|
58
58
|
// | To update them edit the TypeScript types and run "yarn proptypes" |
|
|
59
59
|
// ----------------------------------------------------------------------
|
|
60
60
|
colDef: PropTypes.object.isRequired,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*/
|
|
66
|
-
components: PropTypes.object,
|
|
61
|
+
hideMenu: PropTypes.func.isRequired,
|
|
62
|
+
id: PropTypes.string,
|
|
63
|
+
labelledby: PropTypes.string,
|
|
64
|
+
open: PropTypes.bool.isRequired,
|
|
67
65
|
/**
|
|
68
66
|
* Could be used to pass new props or override props specific to a column menu component
|
|
69
67
|
* e.g. `displayOrder`
|
|
70
68
|
*/
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
slotProps: PropTypes.object,
|
|
70
|
+
/**
|
|
71
|
+
* `slots` could be used to add new and (or) override default column menu items
|
|
72
|
+
* If you register a nee component you must pass it's `displayOrder` in `slotProps`
|
|
73
|
+
* or it will be placed in the end of the list
|
|
74
|
+
*/
|
|
75
|
+
slots: PropTypes.object
|
|
76
76
|
} : void 0;
|
|
77
77
|
export { GridColumnMenu, GridGenericColumnMenu };
|
|
@@ -10,5 +10,5 @@ export interface GridColumnMenuContainerProps extends React.HTMLAttributes<HTMLU
|
|
|
10
10
|
}
|
|
11
11
|
export interface GridGenericColumnMenuProps extends GridColumnMenuRootProps, GridColumnMenuContainerProps {
|
|
12
12
|
}
|
|
13
|
-
export interface GridColumnMenuProps extends Omit<GridGenericColumnMenuProps, '
|
|
13
|
+
export interface GridColumnMenuProps extends Omit<GridGenericColumnMenuProps, 'defaultSlots' | 'defaultSlotProps'> {
|
|
14
14
|
}
|
|
@@ -24,7 +24,7 @@ declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit
|
|
|
24
24
|
root?: import("@mui/base").SlotComponentProps<"div", import("@mui/base").PopperUnstyledRootSlotPropsOverrides, import("@mui/base").PopperUnstyledOwnerState> | undefined;
|
|
25
25
|
} | undefined;
|
|
26
26
|
sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
|
|
27
|
-
} & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "ownerState" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps" | keyof React.RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
27
|
+
} & React.RefAttributes<HTMLDivElement>, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "sx" | "ownerState" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps" | keyof React.RefAttributes<HTMLDivElement>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme> & {
|
|
28
28
|
ownerState: OwnerState;
|
|
29
29
|
}, {}, {}>;
|
|
30
30
|
declare const GridPanel: React.ForwardRefExoticComponent<Omit<GridPanelProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -147,7 +147,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
|
|
|
147
147
|
logicOperators: logicOperators,
|
|
148
148
|
columnsSort: columnsSort
|
|
149
149
|
}, filterFormProps), item.id == null ? index : item.id))
|
|
150
|
-
}), !rootProps.disableMultipleColumnsFiltering && !disableAddFilterButton &&
|
|
150
|
+
}), !rootProps.disableMultipleColumnsFiltering && !(disableAddFilterButton && disableRemoveAllButton) ? /*#__PURE__*/_jsxs(GridPanelFooter, {
|
|
151
151
|
children: [!disableAddFilterButton ? /*#__PURE__*/_jsx(rootProps.slots.baseButton, _extends({
|
|
152
152
|
onClick: addNewFilter,
|
|
153
153
|
startIcon: /*#__PURE__*/_jsx(rootProps.slots.filterPanelAddIcon, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridColumnMenu,
|
|
1
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS, } from './menu/columnMenu/GridColumnMenu';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { GridColumnMenu,
|
|
1
|
+
export { GridColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from './menu/columnMenu/GridColumnMenu';
|
|
@@ -247,7 +247,13 @@ export const useGridColumnHeaders = props => {
|
|
|
247
247
|
columnFields: groupStructure.columnFields.filter(field => columnVisibility[field] !== false)
|
|
248
248
|
});
|
|
249
249
|
}).filter(groupStructure => groupStructure.columnFields.length > 0);
|
|
250
|
-
const
|
|
250
|
+
const firstVisibleColumnIndex = visibleColumnGroupHeader[0].columnFields.indexOf(firstColumnFieldToRender);
|
|
251
|
+
const hiddenGroupColumns = visibleColumnGroupHeader[0].columnFields.slice(0, firstVisibleColumnIndex);
|
|
252
|
+
const leftOverflow = hiddenGroupColumns.reduce((acc, field) => {
|
|
253
|
+
var _column$computedWidth;
|
|
254
|
+
const column = apiRef.current.getColumn(field);
|
|
255
|
+
return acc + ((_column$computedWidth = column.computedWidth) != null ? _column$computedWidth : 0);
|
|
256
|
+
}, 0);
|
|
251
257
|
let columnIndex = firstColumnToRender;
|
|
252
258
|
const elements = visibleColumnGroupHeader.map(({
|
|
253
259
|
groupId,
|
|
@@ -3,7 +3,7 @@ export interface GridColumnMenuState {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
field?: string;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface GridColumnMenuSlotProps {
|
|
7
7
|
/**
|
|
8
8
|
* Every item has a `displayOrder` based which it will be placed before or after other
|
|
9
9
|
* items in the column menu, `array.prototype.sort` is applied to sort the items.
|
|
@@ -16,32 +16,32 @@ export interface GridColumnMenuComponentProps {
|
|
|
16
16
|
}
|
|
17
17
|
export interface GridColumnMenuRootProps {
|
|
18
18
|
/**
|
|
19
|
-
* Initial `
|
|
19
|
+
* Initial `slots` - it is internal, to be overrriden by Pro or Premium packages
|
|
20
20
|
* @ignore - do not document.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
defaultSlots: {
|
|
23
23
|
[key: string]: React.JSXElementConstructor<any>;
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
|
-
* Initial `
|
|
26
|
+
* Initial `slotProps` - it is internal, to be overrriden by Pro or Premium packages
|
|
27
27
|
* @ignore - do not document.
|
|
28
28
|
*/
|
|
29
|
-
|
|
30
|
-
[key: string]:
|
|
29
|
+
defaultSlotProps: {
|
|
30
|
+
[key: string]: GridColumnMenuSlotProps;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
|
-
* `
|
|
34
|
-
* If you register a nee component you must pass it's `displayOrder` in `
|
|
33
|
+
* `slots` could be used to add new and (or) override default column menu items
|
|
34
|
+
* If you register a nee component you must pass it's `displayOrder` in `slotProps`
|
|
35
35
|
* or it will be placed in the end of the list
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
slots?: {
|
|
38
38
|
[key: string]: React.JSXElementConstructor<any> | null;
|
|
39
39
|
};
|
|
40
40
|
/**
|
|
41
41
|
* Could be used to pass new props or override props specific to a column menu component
|
|
42
42
|
* e.g. `displayOrder`
|
|
43
43
|
*/
|
|
44
|
-
|
|
45
|
-
[key: string]:
|
|
44
|
+
slotProps?: {
|
|
45
|
+
[key: string]: GridColumnMenuSlotProps;
|
|
46
46
|
};
|
|
47
47
|
}
|
package/hooks/features/columnMenu/{useGridColumnMenuComponents.d.ts → useGridColumnMenuSlots.d.ts}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridColumnMenuRootProps } from './columnMenuInterfaces';
|
|
3
3
|
import { GridColDef } from '../../../models/colDef/gridColDef';
|
|
4
|
-
interface
|
|
4
|
+
interface UseGridColumnMenuSlotsProps extends GridColumnMenuRootProps {
|
|
5
5
|
colDef: GridColDef;
|
|
6
6
|
hideMenu: (event: React.SyntheticEvent) => void;
|
|
7
7
|
addDividers?: boolean;
|
|
8
8
|
}
|
|
9
|
-
type
|
|
9
|
+
type UseGridColumnMenuSlotsResponse = Array<[
|
|
10
10
|
React.JSXElementConstructor<any>,
|
|
11
11
|
{
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
}
|
|
14
14
|
]>;
|
|
15
|
-
declare const
|
|
16
|
-
export {
|
|
15
|
+
declare const useGridColumnMenuSlots: (props: UseGridColumnMenuSlotsProps) => UseGridColumnMenuSlotsResponse;
|
|
16
|
+
export { useGridColumnMenuSlots };
|