@mui/x-data-grid 8.0.0-alpha.0 → 8.0.0-alpha.1
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 +429 -5
- package/README.md +2 -2
- package/components/GridLoadingOverlay.d.ts +2 -2
- package/components/GridLoadingOverlay.js +4 -4
- package/components/cell/GridCell.js +3 -0
- package/components/columnsManagement/GridColumnsManagement.d.ts +2 -0
- package/components/columnsManagement/GridColumnsManagement.js +53 -6
- package/constants/gridClasses.d.ts +24 -0
- package/constants/gridClasses.js +1 -1
- package/constants/localeTextConstants.js +12 -0
- package/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/joy/joySlots.js +7 -2
- package/locales/arSD.js +13 -0
- package/locales/beBY.js +13 -0
- package/locales/bgBG.js +14 -0
- package/locales/csCZ.js +14 -0
- package/locales/daDK.js +14 -0
- package/locales/deDE.js +14 -0
- package/locales/elGR.js +13 -0
- package/locales/esES.js +18 -4
- package/locales/faIR.js +14 -0
- package/locales/fiFI.js +14 -0
- package/locales/frFR.js +14 -0
- package/locales/heIL.js +14 -0
- package/locales/hrHR.js +14 -0
- package/locales/huHU.js +14 -0
- package/locales/isIS.js +13 -0
- package/locales/itIT.js +14 -0
- package/locales/jaJP.js +14 -0
- package/locales/koKR.js +13 -0
- package/locales/nbNO.js +14 -0
- package/locales/nlNL.js +14 -0
- package/locales/nnNO.js +14 -0
- package/locales/plPL.js +14 -0
- package/locales/ptBR.js +14 -0
- package/locales/ptPT.js +14 -0
- package/locales/roRO.js +13 -0
- package/locales/ruRU.js +14 -0
- package/locales/skSK.js +13 -0
- package/locales/svSE.js +18 -5
- package/locales/trTR.js +14 -0
- package/locales/ukUA.js +13 -0
- package/locales/urPK.js +13 -0
- package/locales/viVN.js +14 -0
- package/locales/zhCN.js +18 -4
- package/locales/zhHK.js +13 -0
- package/locales/zhTW.js +13 -0
- package/models/api/gridLocaleTextApi.d.ts +11 -0
- package/models/colDef/gridColDef.d.ts +4 -0
- package/models/gridDataSource.d.ts +12 -12
- package/modern/components/GridLoadingOverlay.js +4 -4
- package/modern/components/cell/GridCell.js +3 -0
- package/modern/components/columnsManagement/GridColumnsManagement.js +53 -6
- package/modern/constants/gridClasses.js +1 -1
- package/modern/constants/localeTextConstants.js +12 -0
- package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/modern/index.js +1 -1
- package/modern/internals/index.js +1 -0
- package/modern/joy/joySlots.js +7 -2
- package/modern/locales/arSD.js +13 -0
- package/modern/locales/beBY.js +13 -0
- package/modern/locales/bgBG.js +14 -0
- package/modern/locales/csCZ.js +14 -0
- package/modern/locales/daDK.js +14 -0
- package/modern/locales/deDE.js +14 -0
- package/modern/locales/elGR.js +13 -0
- package/modern/locales/esES.js +18 -4
- package/modern/locales/faIR.js +14 -0
- package/modern/locales/fiFI.js +14 -0
- package/modern/locales/frFR.js +14 -0
- package/modern/locales/heIL.js +14 -0
- package/modern/locales/hrHR.js +14 -0
- package/modern/locales/huHU.js +14 -0
- package/modern/locales/isIS.js +13 -0
- package/modern/locales/itIT.js +14 -0
- package/modern/locales/jaJP.js +14 -0
- package/modern/locales/koKR.js +13 -0
- package/modern/locales/nbNO.js +14 -0
- package/modern/locales/nlNL.js +14 -0
- package/modern/locales/nnNO.js +14 -0
- package/modern/locales/plPL.js +14 -0
- package/modern/locales/ptBR.js +14 -0
- package/modern/locales/ptPT.js +14 -0
- package/modern/locales/roRO.js +13 -0
- package/modern/locales/ruRU.js +14 -0
- package/modern/locales/skSK.js +13 -0
- package/modern/locales/svSE.js +18 -5
- package/modern/locales/trTR.js +14 -0
- package/modern/locales/ukUA.js +13 -0
- package/modern/locales/urPK.js +13 -0
- package/modern/locales/viVN.js +14 -0
- package/modern/locales/zhCN.js +18 -4
- package/modern/locales/zhHK.js +13 -0
- package/modern/locales/zhTW.js +13 -0
- package/node/components/GridLoadingOverlay.js +4 -4
- package/node/components/cell/GridCell.js +3 -0
- package/node/components/columnsManagement/GridColumnsManagement.js +53 -6
- package/node/constants/gridClasses.js +1 -1
- package/node/constants/localeTextConstants.js +12 -0
- package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +2 -2
- package/node/index.js +1 -1
- package/node/internals/index.js +9 -2
- package/node/joy/joySlots.js +7 -2
- package/node/locales/arSD.js +13 -0
- package/node/locales/beBY.js +13 -0
- package/node/locales/bgBG.js +14 -0
- package/node/locales/csCZ.js +14 -0
- package/node/locales/daDK.js +14 -0
- package/node/locales/deDE.js +14 -0
- package/node/locales/elGR.js +13 -0
- package/node/locales/esES.js +18 -4
- package/node/locales/faIR.js +14 -0
- package/node/locales/fiFI.js +14 -0
- package/node/locales/frFR.js +14 -0
- package/node/locales/heIL.js +14 -0
- package/node/locales/hrHR.js +14 -0
- package/node/locales/huHU.js +14 -0
- package/node/locales/isIS.js +13 -0
- package/node/locales/itIT.js +14 -0
- package/node/locales/jaJP.js +14 -0
- package/node/locales/koKR.js +13 -0
- package/node/locales/nbNO.js +14 -0
- package/node/locales/nlNL.js +14 -0
- package/node/locales/nnNO.js +14 -0
- package/node/locales/plPL.js +14 -0
- package/node/locales/ptBR.js +14 -0
- package/node/locales/ptPT.js +14 -0
- package/node/locales/roRO.js +13 -0
- package/node/locales/ruRU.js +14 -0
- package/node/locales/skSK.js +13 -0
- package/node/locales/svSE.js +18 -5
- package/node/locales/trTR.js +14 -0
- package/node/locales/ukUA.js +13 -0
- package/node/locales/urPK.js +13 -0
- package/node/locales/viVN.js +14 -0
- package/node/locales/zhCN.js +18 -4
- package/node/locales/zhHK.js +13 -0
- package/node/locales/zhTW.js +13 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,148 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## v8.0.0-alpha.1
|
|
9
|
+
|
|
10
|
+
_Nov 22, 2024_
|
|
11
|
+
|
|
12
|
+
We'd like to offer a big thanks to the 16 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 🔧 Refactor Tooltip customisation for charts — [Learn more](https://next.mui.com/x/react-charts/tooltip/#overriding-content).
|
|
15
|
+
- ⚛️ React 19 support
|
|
16
|
+
- 🌍 Improve Chinese, Spanish, and Swedish locale on the Data Grid component
|
|
17
|
+
- 🐞 Bugfixes
|
|
18
|
+
- 📚 Documentation improvements
|
|
19
|
+
|
|
20
|
+
### Breaking change
|
|
21
|
+
|
|
22
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
23
|
+
@CarlosLopezLg, @headironc, @hendrikpeilke, @k-rajat19, @lhilgert9, @viktormelin.
|
|
24
|
+
Following are all team members who have contributed to this release:
|
|
25
|
+
@alexfauquette, @arthurbalduini, @cherniavskii, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @oliviertassinari, @KenanYusuf, @arminmeh.
|
|
26
|
+
|
|
27
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
28
|
+
|
|
29
|
+
### Data Grid
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid@v8.0.0-alpha.1`
|
|
32
|
+
|
|
33
|
+
- [DataGrid] React 19 support (#15342) @arminmeh
|
|
34
|
+
- [DataGrid] Add prop to override search input props in `GridColumnsManagement` (#15347) @k-rajat19
|
|
35
|
+
- [DataGrid] Add test coverage for issues fixed in #15184 (#15282) @MBilalShafi
|
|
36
|
+
- [DataGrid] Change default loading overlay variants (#15504) @KenanYusuf
|
|
37
|
+
- [DataGrid] Fix last separator not being hidden when grid is scrollable (#15543) @KenanYusuf
|
|
38
|
+
- [DataGrid] Fix right column group header border with virtualization (#15470) @hendrikpeilke
|
|
39
|
+
- [DataGrid] Fix row-spanning in combination with column-pinning (#15368) @lhilgert9
|
|
40
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15365) @headironc
|
|
41
|
+
- [l10n] Improve Spanish (es-ES) locale (#15369) @CarlosLopezLg
|
|
42
|
+
- [l10n] Improve Swedish (sv-SE) locale (#15371) @viktormelin
|
|
43
|
+
|
|
44
|
+
#### `@mui/x-data-grid-pro@v8.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
45
|
+
|
|
46
|
+
Same changes as in `@mui/x-data-grid@v8.0.0-alpha.1`.
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-data-grid-premium@v8.0.0-alpha.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
49
|
+
|
|
50
|
+
Same changes as in `@mui/x-data-grid-pro@v8.0.0-alpha.1`, plus:
|
|
51
|
+
|
|
52
|
+
- [DataGridPremium] Prompt input control (#15401) @arminmeh
|
|
53
|
+
|
|
54
|
+
### Date and Time Pickers
|
|
55
|
+
|
|
56
|
+
#### Breaking change
|
|
57
|
+
|
|
58
|
+
- The `FieldValueType` type has been renamed to `PickerValueType` — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#renamed-variables).
|
|
59
|
+
- The `toolbar` and `layout` slots no longer receive the `disabled` and `readOnly` props — [Learn more](https://next.mui.com/x/migration/migration-pickers-v7/#slots-breaking-changes).
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-date-pickers@v8.0.0-alpha.1`
|
|
62
|
+
|
|
63
|
+
- [fields] Fix focus management with new DOM structure (#15475) @flaviendelangle
|
|
64
|
+
- [pickers] React 19 support (#15342) @arminmeh
|
|
65
|
+
- [pickers] Add new properties to `PickerOwnerState` and `PickerContextValue` (#15415) @flaviendelangle
|
|
66
|
+
- [pickers] Always use `props.value` when it changes (#15490) @flaviendelangle
|
|
67
|
+
- [pickers] Ensure internal value timezone is updated (#15435) @LukasTy
|
|
68
|
+
- [pickers] Fix unused code in `<PickersToolbar />` component (#15515) @LukasTy
|
|
69
|
+
- [pickers] Remove `FieldValueType` in favor of `PickerValueType` (#15259) @arthurbalduini
|
|
70
|
+
- [pickers] Remove the form props from the layout and the toolbar slots (#15492) @flaviendelangle
|
|
71
|
+
- [pickers] Use `props.referenceDate` timezone when `props.value` and `props.defaultValue` are not defined (#15532) @flaviendelangle
|
|
72
|
+
- [TimePicker] Prevent mouse events after `touchend` event (#15346) @arthurbalduini
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-date-pickers-pro@v8.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
75
|
+
|
|
76
|
+
Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
|
|
77
|
+
|
|
78
|
+
- [DateTimeRangePicker] Use time in `referenceDate` when selecting date (#15429) @LukasTy
|
|
79
|
+
|
|
80
|
+
### Charts
|
|
81
|
+
|
|
82
|
+
#### Breaking change
|
|
83
|
+
|
|
84
|
+
- The DX of the Tooltip customization has been refactored
|
|
85
|
+
- The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
|
|
86
|
+
- The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
|
|
87
|
+
- To override the tooltip content, use the `useItemTooltip` or `useAxisTooltip` hook to get the data, and wrap your component in `ChartsTooltipContainer` to follow the pointer position.
|
|
88
|
+
- To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
|
|
89
|
+
|
|
90
|
+
- The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
|
|
91
|
+
- This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
|
|
92
|
+
If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
|
|
93
|
+
- The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
|
|
94
|
+
You can still target those elements by using the `MuiLinePlot`, `MuiAreaPlot`, and `MuiBarPlot` and target the appropriate classes `lineElementClasses.root`, `areaElementClasses.root`, `barElementClasses.root`
|
|
95
|
+
|
|
96
|
+
- Removed the `resolveSizeBeforeRender` prop from all chart components — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#remove-resolvesizebeforerender-prop).
|
|
97
|
+
- Removed `width` and `height` props from the `ChartsSurface` component.
|
|
98
|
+
- Removed the `viewport` prop from all charts.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-charts@v8.0.0-alpha.1`
|
|
101
|
+
|
|
102
|
+
- [charts] React 19 support (#15342) @arminmeh
|
|
103
|
+
- [charts] Decouple `<ChartDataProvider />` and `<ChartsSurface />` (#15375) @JCQuintas
|
|
104
|
+
- [charts] Fix Scatter Chart tooltip wrong defaults (#15537) @JCQuintas
|
|
105
|
+
- [charts] Fix key generation for the `<ChartsGrid />` component (#15463) @alexfauquette
|
|
106
|
+
- [charts] Improve `<SvgRefProvider />` to split the received ref (#15424) @JCQuintas
|
|
107
|
+
- [charts] Move interaction state in store (#15426) @alexfauquette
|
|
108
|
+
- [charts] Refactor Tooltip customisation (#15154) @alexfauquette
|
|
109
|
+
- [charts] Remove intrinsic size requirement (#15471) @JCQuintas
|
|
110
|
+
- [charts] Replace `d3-color` with CSS filter for highlight (#15084) @alexfauquette
|
|
111
|
+
- [charts] Split `<DrawingProvider />` into `<DrawingAreaProvider />` and `<SvgRefProvider />` (#15417) @JCQuintas
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-charts-pro@v8.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-charts@v8.0.0-alpha.1`.
|
|
116
|
+
|
|
117
|
+
### Tree View
|
|
118
|
+
|
|
119
|
+
#### Breaking changes
|
|
120
|
+
|
|
121
|
+
- The Tree Item component can no longer use `publicAPI` methods in the `render` because they are now memoized — [Learn more](https://next.mui.com/x/migration/migration-tree-view-v7/#stop-using-publicapi-methods-in-the-render).
|
|
122
|
+
|
|
123
|
+
#### `@mui/x-tree-view@v8.0.0-alpha.1`
|
|
124
|
+
|
|
125
|
+
- [TreeView] React 19 support (#15342) @arminmeh
|
|
126
|
+
- [TreeView] Do not re-render every Tree Item when the Rich Tree View re-renders (introduce selectors) (#14210) @flaviendelangle
|
|
127
|
+
- [TreeView] Remove `treeId` from the item context (#15542) @flaviendelangle
|
|
128
|
+
- [TreeView] Remove state mutation in `moveItemInTree()` (#15539) @flaviendelangle
|
|
129
|
+
- [TreeItem] Correct the typing of `slotProps.groupTransition` (#15534) @flaviendelangle
|
|
130
|
+
|
|
131
|
+
### Docs
|
|
132
|
+
|
|
133
|
+
- [docs] Fix some migration typos (#15422) @LukasTy
|
|
134
|
+
- [docs] Fix typo in migration guide (#15508) @flaviendelangle
|
|
135
|
+
- [docs] Fix 301 redirection in docs @oliviertassinari
|
|
136
|
+
- [docs] Polish Server-side data section (#15330) @oliviertassinari
|
|
137
|
+
- [docs] Use loading state in the demos (#15512) @cherniavskii
|
|
138
|
+
|
|
139
|
+
### Core
|
|
140
|
+
|
|
141
|
+
- [core] Keep OpenSSF badge up-to-date @oliviertassinari
|
|
142
|
+
- [code-infra] Add `'DensitySelectorGrid'` to time-sensitive argos tests (#15425) @JCQuintas
|
|
143
|
+
- [code-infra] Add documentation to internal types (#15540) @JCQuintas
|
|
144
|
+
- [code-infra] Prevent relative imports across packages (#15437) @JCQuintas
|
|
145
|
+
- [code-infra] Update renovate config to merge `action` pins (#15462) @LukasTy
|
|
146
|
+
- [docs-infra] Fix version tooltip (#15468) @alexfauquette
|
|
147
|
+
- [docs-infra] Transpile `.ts` demo files (#15345) @KenanYusuf
|
|
148
|
+
- [infra] Remove cherry-pick issue write permission (#15456) @oliviertassinari
|
|
149
|
+
|
|
8
150
|
## 8.0.0-alpha.0
|
|
9
151
|
|
|
10
152
|
<img width="100%" alt="MUI X v8 Alpha is live" src="https://github.com/user-attachments/assets/114cf615-b617-435f-8499-76ac3c26c57b">
|
|
@@ -105,15 +247,15 @@ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.0`.
|
|
|
105
247
|
|
|
106
248
|
#### Breaking changes
|
|
107
249
|
|
|
108
|
-
- The `legend` prop
|
|
250
|
+
- The `legend` prop has been removed. To pass props to the legend, use `slotProps={{ legend: { ... } }}` instead. This can be automatically done with the codemod as long as the `legend` prop does not come from a destructured object — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#legend-props-propagation-✅).
|
|
109
251
|
|
|
110
252
|
- The `slots.legend` does not receive the `drawingArea` prop. You can still access your custom legend with the `useDrawingArea()` hook if your custom legend needs it.
|
|
111
253
|
|
|
112
254
|
- Removed or renamed multiple props from Series — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#series-properties-renaming).
|
|
113
255
|
|
|
114
|
-
- The `highlighted` and `faded` properties of highlightScope
|
|
256
|
+
- The `highlighted` and `faded` properties of highlightScope have been deprecated in favor of `highlight` and `fade`.
|
|
115
257
|
The deprecated ones are now removed.
|
|
116
|
-
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties
|
|
258
|
+
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties have been deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.
|
|
117
259
|
|
|
118
260
|
- The Pie Chart lost all props and renderer linked to axes because pie chart does not need cartesian axes. If you used it, you can still add them back with composition. Please consider opening an issue to share your use case with us — [Learn more](https://next.mui.com/x/migration/migration-charts-v7/#remove-pie-chart-axes).
|
|
119
261
|
|
|
@@ -196,6 +338,288 @@ Same changes as in `@mui/x-charts@8.0.0-alpha.0`.
|
|
|
196
338
|
- [release] v8 preparation (#15054) @michelengelen
|
|
197
339
|
- [test] Fix advanced list view regression test snapshot (#15260) @KenanYusuf
|
|
198
340
|
|
|
341
|
+
## v7.22.3
|
|
342
|
+
|
|
343
|
+
_Nov 21, 2024_
|
|
344
|
+
|
|
345
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
346
|
+
|
|
347
|
+
- 📊 Charts Pro get stable. The [zoom](https://mui.com/x/react-charts/zoom-and-pan/) and [Heatmap](https://mui.com/x/react-charts/heatmap/) are now stable.
|
|
348
|
+
- 🌍 Improve Chinese, Spanish, Swedish, and Turkish locales on the Data Grid
|
|
349
|
+
- 🐞 Bugfixes
|
|
350
|
+
|
|
351
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
352
|
+
@CarlosLopezLg, @headironc, @viktormelin, @qerkules, @DungTiger, @hendrikpeilke, @k-rajat19.
|
|
353
|
+
Following are all team members who have contributed to this release:
|
|
354
|
+
@alexfauquette, @LukasTy, @MBilalShafi, @flaviendelangle.
|
|
355
|
+
|
|
356
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
357
|
+
|
|
358
|
+
### Data Grid
|
|
359
|
+
|
|
360
|
+
#### `@mui/x-data-grid@7.22.3`
|
|
361
|
+
|
|
362
|
+
- [DataGrid] Add prop to override search input props in `GridColumnsManagement` (#15476) @k-rajat19
|
|
363
|
+
- [DataGrid] Add test coverage for issues fixed in #15184 @MBilalShafi
|
|
364
|
+
- [DataGrid] Fix memoized selectors with arguments (#15336) @MBilalShafi
|
|
365
|
+
- [DataGrid] Fix right column group header border with virtualization (#15503) @hendrikpeilke
|
|
366
|
+
- [DataGrid] Pass reason to `onPaginationModelChange` (#15402) @DungTiger
|
|
367
|
+
- [DataGrid] Set default overlay height in flex parent layout (#15535) @cherniavskii
|
|
368
|
+
- [l10n] Improve Chinese (zh-CN) locale (#15365) @headironc
|
|
369
|
+
- [l10n] Improve Spanish (es-ES) locale (#15369) @CarlosLopezLg
|
|
370
|
+
- [l10n] Improve Swedish (sv-SE) locale (#15371) @viktormelin
|
|
371
|
+
- [l10n] Improve Turkish (tr-TR) locale (#15414) @qerkules
|
|
372
|
+
|
|
373
|
+
#### `@mui/x-data-grid-pro@7.22.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
374
|
+
|
|
375
|
+
Same changes as in `@mui/x-data-grid@7.22.3`.
|
|
376
|
+
|
|
377
|
+
#### `@mui/x-data-grid-premium@7.22.3` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
378
|
+
|
|
379
|
+
Same changes as in `@mui/x-data-grid-pro@7.22.3`.
|
|
380
|
+
|
|
381
|
+
### Date and Time Pickers
|
|
382
|
+
|
|
383
|
+
#### `@mui/x-date-pickers@7.22.3`
|
|
384
|
+
|
|
385
|
+
- [pickers] Always use `props.value` when it changes (#15500) @flaviendelangle
|
|
386
|
+
- [pickers] Ensure internal value timezone is updated (#15491) @LukasTy
|
|
387
|
+
- [pickers] Fix `DateTimeRangePicker` error when using format without time (#15341) @fxnoob
|
|
388
|
+
- [pickers] Fix unused code in `PickersToolbar` component (#15525) @LukasTy
|
|
389
|
+
|
|
390
|
+
#### `@mui/x-date-pickers-pro@7.22.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
391
|
+
|
|
392
|
+
Same changes as in `@mui/x-date-pickers@7.22.3`, plus:
|
|
393
|
+
|
|
394
|
+
- [DateTimeRangePicker] Use time in `referenceDate` when selecting date (#15431) @LukasTy
|
|
395
|
+
|
|
396
|
+
### Charts
|
|
397
|
+
|
|
398
|
+
#### `@mui/x-charts@7.22.3`
|
|
399
|
+
|
|
400
|
+
No changes since `@mui/x-charts@7.22.2`.
|
|
401
|
+
|
|
402
|
+
#### `@mui/x-charts-pro@7.22.3` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
403
|
+
|
|
404
|
+
- [charts-pro] Fix missing typeOverload (#15400) @alexfauquette
|
|
405
|
+
|
|
406
|
+
### Docs
|
|
407
|
+
|
|
408
|
+
- [docs] Add `PickersPopper` component to customization playground (#15397) @LukasTy
|
|
409
|
+
- [docs] Add `next` version links (#15423) @LukasTy
|
|
410
|
+
- [docs] Use the `loading` state in the demos (#15538) @cherniavskii
|
|
411
|
+
- [docs] Add data caching to lazy loaded detail panel demo (#15506) @cherniavskii
|
|
412
|
+
|
|
413
|
+
- [code-infra] Tentative fix for Argos flaky screenshot tests (#15399) @JCQuintas
|
|
414
|
+
- [docs-infra] Transpile `.ts` demo files (#15421) @KenanYusuf
|
|
415
|
+
- [core] Clarify release version bump strategy (#15536) @cherniavskii
|
|
416
|
+
|
|
417
|
+
## 7.22.2
|
|
418
|
+
|
|
419
|
+
_Nov 8, 2024_
|
|
420
|
+
|
|
421
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
422
|
+
|
|
423
|
+
- 👨🏽💻 API enhancements
|
|
424
|
+
- 🐞 Bugfixes
|
|
425
|
+
|
|
426
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
427
|
+
@clins1994, @GuillaumeMeheut, @k-rajat19.
|
|
428
|
+
Following are all team members who have contributed to this release:
|
|
429
|
+
@LukasTy, @MBilalShafi, @KenanYusuf, @arminmeh.
|
|
430
|
+
|
|
431
|
+
### Upcoming alpha
|
|
432
|
+
|
|
433
|
+
Keep an eye out for the MUI⠀X `v8.0.0-aplha.0` release soon. It will follow a weekly release schedule as always until it is stable.
|
|
434
|
+
|
|
435
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
436
|
+
|
|
437
|
+
### Data Grid
|
|
438
|
+
|
|
439
|
+
#### `@mui/x-data-grid@7.22.2`
|
|
440
|
+
|
|
441
|
+
- [DataGrid] Fix `null` reference error in `GridVirtualScrollbar` (#15289) @MBilalShafi
|
|
442
|
+
- [DataGrid] Fix filtering with `boolean` column type (#15257) @k-rajat19
|
|
443
|
+
- [DataGrid] Improve row selection propagation trigger (#15274) @MBilalShafi
|
|
444
|
+
- [DataGrid] Preprocess edit cell props on backspace/delete (#15223) @KenanYusuf
|
|
445
|
+
- [DataGrid] Add a recipe to persist column width and order (#15309) @MBilalShafi
|
|
446
|
+
|
|
447
|
+
#### `@mui/x-data-grid-pro@7.22.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
448
|
+
|
|
449
|
+
Same changes as in `@mui/x-data-grid@7.22.2`, plus:
|
|
450
|
+
|
|
451
|
+
- [DataGridPro] Apply default properties if they are not passed in a reorder column (#15320) @k-rajat19
|
|
452
|
+
- [DataGridPro] Toggle row expansion with `Enter` key in Tree data (#15313) @k-rajat19
|
|
453
|
+
|
|
454
|
+
#### `@mui/x-data-grid-premium@7.22.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
455
|
+
|
|
456
|
+
Same changes as in `@mui/x-data-grid-pro@7.22.2`, plus:
|
|
457
|
+
|
|
458
|
+
- [DataGridPremium] Fix incorrect rows selection count when selection propagation is enabled with row grouping (#15222) @arminmeh
|
|
459
|
+
|
|
460
|
+
### Date and Time Pickers
|
|
461
|
+
|
|
462
|
+
#### `@mui/x-date-pickers@7.22.2`
|
|
463
|
+
|
|
464
|
+
- [pickers] Add support for `moment-hijri@3.0.0` (#15248) @LukasTy
|
|
465
|
+
|
|
466
|
+
#### `@mui/x-date-pickers-pro@7.22.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
467
|
+
|
|
468
|
+
Same changes as in `@mui/x-date-pickers@7.22.2`.
|
|
469
|
+
|
|
470
|
+
### Charts
|
|
471
|
+
|
|
472
|
+
#### `@mui/x-charts@7.22.2`
|
|
473
|
+
|
|
474
|
+
- [charts] Allow `SeriesValueFormatter` to return `null` value (#15295) @clins1994
|
|
475
|
+
- [charts] Allow configuring the `domainLimit` for each axis. (#15325) @GuillaumeMeheut
|
|
476
|
+
|
|
477
|
+
#### `@mui/x-charts-pro@7.0.0-beta.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
478
|
+
|
|
479
|
+
Same changes as in `@mui/x-charts@7.22.2`.
|
|
480
|
+
|
|
481
|
+
## 7.22.1
|
|
482
|
+
|
|
483
|
+
_Nov 1, 2024_
|
|
484
|
+
|
|
485
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
486
|
+
|
|
487
|
+
- 🐞 Bugfixes
|
|
488
|
+
- 📚 Documentation improvements
|
|
489
|
+
- 🌍 Improve Polish (pl-PL) locale on the Date Pickers
|
|
490
|
+
|
|
491
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
492
|
+
@wojtkolos, @dpak-maurya, @k-rajat19.
|
|
493
|
+
Following are all team members who have contributed to this release:
|
|
494
|
+
@LukasTy, @arminmeh, @MBilalShafi, @KenanYusuf, @flaviendelangle.
|
|
495
|
+
|
|
496
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
497
|
+
|
|
498
|
+
### Data Grid
|
|
499
|
+
|
|
500
|
+
#### `@mui/x-data-grid@7.22.1`
|
|
501
|
+
|
|
502
|
+
- [DataGrid] Fix right column group header border (#15152) @KenanYusuf
|
|
503
|
+
- [DataGrid] Fix scroll jump when holding down arrow keys (#15167) @arminmeh
|
|
504
|
+
- [DataGrid] Move `rowGroupingModelChange` handler to respective hook (#15127) @MBilalShafi
|
|
505
|
+
- [DataGrid] Prevent error when deleting the last row (#15153) @dpak-maurya
|
|
506
|
+
- [DataGrid] Fix overlay height in autoHeight mode (#15205) @cherniavskii
|
|
507
|
+
|
|
508
|
+
#### `@mui/x-data-grid-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
509
|
+
|
|
510
|
+
Same changes as in `@mui/x-data-grid@7.22.1`, plus:
|
|
511
|
+
|
|
512
|
+
- [DataGridPro] Add list view tests (#15166) @KenanYusuf
|
|
513
|
+
|
|
514
|
+
#### `@mui/x-data-grid-premium@7.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
515
|
+
|
|
516
|
+
- [DataGridPremium] Keep focus on the grouping cell on space bar press #15155 @k-rajat19
|
|
517
|
+
|
|
518
|
+
### Date and Time Pickers
|
|
519
|
+
|
|
520
|
+
#### `@mui/x-date-pickers@7.22.1`
|
|
521
|
+
|
|
522
|
+
- [l10n] Improve Polish (pl-PL) locale (#15177) @wojtkolos
|
|
523
|
+
|
|
524
|
+
#### `@mui/x-date-pickers-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
525
|
+
|
|
526
|
+
Same changes as in `@mui/x-date-pickers@7.22.1`.
|
|
527
|
+
|
|
528
|
+
### Tree View
|
|
529
|
+
|
|
530
|
+
#### `@mui/x-tree-view@7.22.1`
|
|
531
|
+
|
|
532
|
+
- [TreeView] Export `TreeItem2DragAndDropOverlay` and `TreeItem2LabelInput` from the root of each package (#15208) @flaviendelangle
|
|
533
|
+
- [TreeView] Fix drag and drop color usage (#15149) @LukasTy
|
|
534
|
+
|
|
535
|
+
#### `@mui/x-tree-view-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
536
|
+
|
|
537
|
+
Same changes as in `@mui/x-tree-view@7.22.1`.
|
|
538
|
+
|
|
539
|
+
### Docs
|
|
540
|
+
|
|
541
|
+
- [docs] Add section explaining how to keep the selection while filtering in Data grid docs (#15199) @arminmeh
|
|
542
|
+
|
|
543
|
+
## 7.22.0
|
|
544
|
+
|
|
545
|
+
_Oct 25, 2024_
|
|
546
|
+
|
|
547
|
+
We'd like to offer a big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
548
|
+
|
|
549
|
+
- 🛰 Introduce [server-side support for Data Grid row grouping](https://mui.com/x/react-data-grid/server-side-data/row-grouping/)
|
|
550
|
+
- 🐞 Bugfixes
|
|
551
|
+
- 📚 Documentation improvements
|
|
552
|
+
- 🌍 Improve Portuguese (pt-BR) locale on the Data Grid component
|
|
553
|
+
|
|
554
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
555
|
+
@clins1994, @GITPHLAP, @k-rajat19, @kalyan90, @merotosc, @yash49.
|
|
556
|
+
Following are all team members who have contributed to this release:
|
|
557
|
+
@cherniavskii, @flaviendelangle, @LukasTy, @MBilalShafi, @romgrk.
|
|
558
|
+
|
|
559
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
560
|
+
|
|
561
|
+
### Data Grid
|
|
562
|
+
|
|
563
|
+
#### `@mui/x-data-grid@7.22.0`
|
|
564
|
+
|
|
565
|
+
- [DataGrid] Fix `GridPanelAnchor` positioning (#15022) @k-rajat19
|
|
566
|
+
- [DataGrid] Fix ugly prop-types for the `pageStyle` prop of the `GridPrintExportMenuItem` component (#15015) @flaviendelangle
|
|
567
|
+
- [DataGrid] Fix value type in filter model for number and boolean column type (#14733) @k-rajat19
|
|
568
|
+
- [DataGrid] Focus next row when the focused row is deleted (#15067) @cherniavskii
|
|
569
|
+
- [DataGrid] Remove some usages of `<Box />` and `<Badge />` (#15013) @romgrk
|
|
570
|
+
- [DataGrid] Fix number of rows to display for page size options with negative value (#14890) @kalyan90
|
|
571
|
+
- [l10n] Improve Portuguese (pt-BR) locale (#15021) @k-rajat19
|
|
572
|
+
|
|
573
|
+
#### `@mui/x-data-grid-pro@7.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
574
|
+
|
|
575
|
+
Same changes as in `@mui/x-data-grid@7.22.0`, plus:
|
|
576
|
+
|
|
577
|
+
- [DataGridPro] Fix column pinning layout (#15073) @cherniavskii
|
|
578
|
+
|
|
579
|
+
#### `@mui/x-data-grid-premium@7.22.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
580
|
+
|
|
581
|
+
Same changes as in `@mui/x-data-grid-pro@7.22.0`, plus:
|
|
582
|
+
|
|
583
|
+
- [DataGridPremium] Server-side data source with row grouping (#15109) @MBilalShafi
|
|
584
|
+
|
|
585
|
+
### Date and Time Pickers
|
|
586
|
+
|
|
587
|
+
#### `@mui/x-date-pickers@7.22.0`
|
|
588
|
+
|
|
589
|
+
- [pickers] Fix `DateCalendar` timezone management (#15119) @LukasTy
|
|
590
|
+
- [pickers] Fix `DigitalClock` time options on a `DST` switch day (#15092) @LukasTy
|
|
591
|
+
|
|
592
|
+
#### `@mui/x-date-pickers-pro@7.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
593
|
+
|
|
594
|
+
Same changes as in `@mui/x-date-pickers@7.22.0`.
|
|
595
|
+
|
|
596
|
+
### Charts
|
|
597
|
+
|
|
598
|
+
#### `@mui/x-charts@7.22.0`
|
|
599
|
+
|
|
600
|
+
- [charts] Export data type in `onAxisClick(_, data)` callback (#15038) @clins1994
|
|
601
|
+
|
|
602
|
+
#### `@mui/x-charts-pro@7.0.0-beta.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
603
|
+
|
|
604
|
+
Same changes as in `@mui/x-charts@7.22.0`.
|
|
605
|
+
|
|
606
|
+
### Tree View
|
|
607
|
+
|
|
608
|
+
#### `@mui/x-tree-view@7.22.0`
|
|
609
|
+
|
|
610
|
+
- [TreeView] Make the cancellable event types public (#14992) @flaviendelangle
|
|
611
|
+
|
|
612
|
+
### Docs
|
|
613
|
+
|
|
614
|
+
- [docs] Fix typo in Tree View docs (#15047) @yash49
|
|
615
|
+
|
|
616
|
+
### Core
|
|
617
|
+
|
|
618
|
+
- [core] Adjust cherry-pick GH actions (#15101) @LukasTy
|
|
619
|
+
- [core] Update prettier target branch (#15100) @MBilalShafi
|
|
620
|
+
- [core] Update some `default-branch-switch` instances for `v7.x` (#15085) @MBilalShafi
|
|
621
|
+
- [test] Revert to using `fireEvent` instead of `userEvent` (#14927) @LukasTy
|
|
622
|
+
|
|
199
623
|
## 7.21.0
|
|
200
624
|
|
|
201
625
|
_Oct 17, 2024_
|
|
@@ -4310,7 +4734,7 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.5`.
|
|
|
4310
4734
|
|
|
4311
4735
|
#### Breaking changes
|
|
4312
4736
|
|
|
4313
|
-
- The slot interfaces
|
|
4737
|
+
- The slot interfaces have been renamed to match with `@mui/base` naming.
|
|
4314
4738
|
The `SlotsComponent` suffix has been replaced with `Slots` and `SlotsComponentsProps` with `SlotProps`.
|
|
4315
4739
|
|
|
4316
4740
|
```diff
|
|
@@ -5352,7 +5776,7 @@ Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
|
|
|
5352
5776
|
|
|
5353
5777
|
#### Breaking changes
|
|
5354
5778
|
|
|
5355
|
-
Types for `slots` and `slotProps`
|
|
5779
|
+
Types for `slots` and `slotProps` have been renamed by removing the "Component" which is meaningless for charts.
|
|
5356
5780
|
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
|
|
5357
5781
|
|
|
5358
5782
|
Here is an example of the renaming for the `<ChartsTooltip />` component.
|
package/README.md
CHANGED
|
@@ -16,8 +16,8 @@ This component has the following peer dependencies that you need to install as w
|
|
|
16
16
|
```json
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"@mui/material": "^5.15.14 || ^6.0.0",
|
|
19
|
-
"react": "^17.0.0 || ^18.0.0",
|
|
20
|
-
"react-dom": "^17.0.0 || ^18.0.0"
|
|
19
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
+
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
21
21
|
},
|
|
22
22
|
```
|
|
23
23
|
|
|
@@ -4,12 +4,12 @@ export type GridLoadingOverlayVariant = 'circular-progress' | 'linear-progress'
|
|
|
4
4
|
export interface GridLoadingOverlayProps extends GridOverlayProps {
|
|
5
5
|
/**
|
|
6
6
|
* The variant of the overlay.
|
|
7
|
-
* @default '
|
|
7
|
+
* @default 'linear-progress'
|
|
8
8
|
*/
|
|
9
9
|
variant?: GridLoadingOverlayVariant;
|
|
10
10
|
/**
|
|
11
11
|
* The variant of the overlay when no rows are displayed.
|
|
12
|
-
* @default '
|
|
12
|
+
* @default 'skeleton'
|
|
13
13
|
*/
|
|
14
14
|
noRowsVariant?: GridLoadingOverlayVariant;
|
|
15
15
|
}
|
|
@@ -30,8 +30,8 @@ const LOADING_VARIANTS = {
|
|
|
30
30
|
};
|
|
31
31
|
const GridLoadingOverlay = /*#__PURE__*/React.forwardRef(function GridLoadingOverlay(props, ref) {
|
|
32
32
|
const {
|
|
33
|
-
variant = '
|
|
34
|
-
noRowsVariant = '
|
|
33
|
+
variant = 'linear-progress',
|
|
34
|
+
noRowsVariant = 'skeleton',
|
|
35
35
|
style
|
|
36
36
|
} = props,
|
|
37
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -52,13 +52,13 @@ process.env.NODE_ENV !== "production" ? GridLoadingOverlay.propTypes = {
|
|
|
52
52
|
// ----------------------------------------------------------------------
|
|
53
53
|
/**
|
|
54
54
|
* The variant of the overlay when no rows are displayed.
|
|
55
|
-
* @default '
|
|
55
|
+
* @default 'skeleton'
|
|
56
56
|
*/
|
|
57
57
|
noRowsVariant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton']),
|
|
58
58
|
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
59
59
|
/**
|
|
60
60
|
* The variant of the overlay.
|
|
61
|
-
* @default '
|
|
61
|
+
* @default 'linear-progress'
|
|
62
62
|
*/
|
|
63
63
|
variant: PropTypes.oneOf(['circular-progress', 'linear-progress', 'skeleton'])
|
|
64
64
|
} : void 0;
|
|
@@ -229,6 +229,9 @@ const GridCell = /*#__PURE__*/React.forwardRef(function GridCell(props, ref) {
|
|
|
229
229
|
if (rowSpan > 1) {
|
|
230
230
|
cellStyle.height = `calc(var(--height) * ${rowSpan})`;
|
|
231
231
|
cellStyle.zIndex = 5;
|
|
232
|
+
if (isLeftPinned || isRightPinned) {
|
|
233
|
+
cellStyle.zIndex = 6;
|
|
234
|
+
}
|
|
232
235
|
}
|
|
233
236
|
return cellStyle;
|
|
234
237
|
}, [width, isNotVisible, styleProp, pinnedOffset, pinnedPosition, isRtl, rowSpan]);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { TextFieldProps } from '@mui/material/TextField';
|
|
2
3
|
import type { GridColDef } from '../../models/colDef/gridColDef';
|
|
3
4
|
export interface GridColumnsManagementProps {
|
|
4
5
|
sort?: 'asc' | 'desc';
|
|
5
6
|
searchPredicate?: (column: GridColDef, searchValue: string) => boolean;
|
|
7
|
+
searchInputProps?: Partial<TextFieldProps>;
|
|
6
8
|
/**
|
|
7
9
|
* If `true`, the column search field will be focused automatically.
|
|
8
10
|
* If `false`, the first column switch input will be focused automatically.
|
|
@@ -5,6 +5,8 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
6
|
import FormControlLabel from '@mui/material/FormControlLabel';
|
|
7
7
|
import { styled } from '@mui/material/styles';
|
|
8
|
+
import TextField from '@mui/material/TextField';
|
|
9
|
+
import { inputBaseClasses } from '@mui/material/InputBase';
|
|
8
10
|
import { gridColumnDefinitionsSelector, gridColumnVisibilityModelSelector } from "../../hooks/features/columns/gridColumnsSelector.js";
|
|
9
11
|
import { useGridSelector } from "../../hooks/utils/useGridSelector.js";
|
|
10
12
|
import { useGridApiContext } from "../../hooks/utils/useGridApiContext.js";
|
|
@@ -20,6 +22,7 @@ const useUtilityClasses = ownerState => {
|
|
|
20
22
|
const slots = {
|
|
21
23
|
root: ['columnsManagement'],
|
|
22
24
|
header: ['columnsManagementHeader'],
|
|
25
|
+
searchInput: ['columnsManagementSearchInput'],
|
|
23
26
|
footer: ['columnsManagementFooter'],
|
|
24
27
|
row: ['columnsManagementRow']
|
|
25
28
|
};
|
|
@@ -42,7 +45,8 @@ function GridColumnsManagement(props) {
|
|
|
42
45
|
disableShowHideToggle = false,
|
|
43
46
|
disableResetButton = false,
|
|
44
47
|
toggleAllMode = 'all',
|
|
45
|
-
getTogglableColumns
|
|
48
|
+
getTogglableColumns,
|
|
49
|
+
searchInputProps
|
|
46
50
|
} = props;
|
|
47
51
|
const isResetDisabled = React.useMemo(() => checkColumnVisibilityModelsSame(columnVisibilityModel, initialColumnVisibilityModel), [columnVisibilityModel, initialColumnVisibilityModel]);
|
|
48
52
|
const sortedColumns = React.useMemo(() => {
|
|
@@ -109,28 +113,52 @@ function GridColumnsManagement(props) {
|
|
|
109
113
|
}
|
|
110
114
|
return false;
|
|
111
115
|
};
|
|
116
|
+
const handleSearchReset = React.useCallback(() => {
|
|
117
|
+
setSearchValue('');
|
|
118
|
+
searchInputRef.current.focus();
|
|
119
|
+
}, []);
|
|
112
120
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
113
121
|
children: [/*#__PURE__*/_jsx(GridColumnsManagementHeader, {
|
|
114
122
|
className: classes.header,
|
|
115
123
|
ownerState: rootProps,
|
|
116
|
-
children: /*#__PURE__*/_jsx(
|
|
124
|
+
children: /*#__PURE__*/_jsx(SearchInput, _extends({
|
|
125
|
+
as: rootProps.slots.baseTextField,
|
|
126
|
+
ownerState: rootProps,
|
|
117
127
|
placeholder: apiRef.current.getLocaleText('columnsManagementSearchTitle'),
|
|
118
128
|
inputRef: searchInputRef,
|
|
129
|
+
className: classes.searchInput,
|
|
119
130
|
value: searchValue,
|
|
120
131
|
onChange: handleSearchValueChange,
|
|
121
132
|
variant: "outlined",
|
|
122
133
|
size: "small",
|
|
134
|
+
type: "search",
|
|
123
135
|
InputProps: {
|
|
124
136
|
startAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseInputAdornment, {
|
|
125
137
|
position: "start",
|
|
126
138
|
children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterIcon, {})
|
|
127
139
|
}),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
endAdornment: /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
141
|
+
"aria-label": apiRef.current.getLocaleText('columnsManagementDeleteIconLabel'),
|
|
142
|
+
size: "small",
|
|
143
|
+
sx: [searchValue ? {
|
|
144
|
+
visibility: 'visible'
|
|
145
|
+
} : {
|
|
146
|
+
visibility: 'hidden'
|
|
147
|
+
}],
|
|
148
|
+
tabIndex: -1,
|
|
149
|
+
onClick: handleSearchReset
|
|
150
|
+
}, rootProps.slotProps?.baseIconButton, {
|
|
151
|
+
children: /*#__PURE__*/_jsx(rootProps.slots.quickFilterClearIcon, {
|
|
152
|
+
fontSize: "small"
|
|
153
|
+
})
|
|
154
|
+
}))
|
|
155
|
+
},
|
|
156
|
+
inputProps: {
|
|
157
|
+
'aria-label': apiRef.current.getLocaleText('columnsManagementSearchTitle')
|
|
131
158
|
},
|
|
159
|
+
autoComplete: "off",
|
|
132
160
|
fullWidth: true
|
|
133
|
-
}, rootProps.slotProps?.baseTextField))
|
|
161
|
+
}, rootProps.slotProps?.baseTextField, searchInputProps))
|
|
134
162
|
}), /*#__PURE__*/_jsxs(GridColumnsManagementBody, {
|
|
135
163
|
className: classes.root,
|
|
136
164
|
ownerState: rootProps,
|
|
@@ -205,6 +233,7 @@ process.env.NODE_ENV !== "production" ? GridColumnsManagement.propTypes = {
|
|
|
205
233
|
* @returns {GridColDef['field'][]} The list of togglable columns' field names.
|
|
206
234
|
*/
|
|
207
235
|
getTogglableColumns: PropTypes.func,
|
|
236
|
+
searchInputProps: PropTypes.object,
|
|
208
237
|
searchPredicate: PropTypes.func,
|
|
209
238
|
sort: PropTypes.oneOf(['asc', 'desc']),
|
|
210
239
|
/**
|
|
@@ -239,6 +268,24 @@ const GridColumnsManagementHeader = styled('div', {
|
|
|
239
268
|
}) => ({
|
|
240
269
|
padding: theme.spacing(1.5, 3)
|
|
241
270
|
}));
|
|
271
|
+
const SearchInput = styled(TextField, {
|
|
272
|
+
name: 'MuiDataGrid',
|
|
273
|
+
slot: 'ColumnsManagementSearchInput',
|
|
274
|
+
overridesResolver: (props, styles) => styles.columnsManagementSearchInput
|
|
275
|
+
})(({
|
|
276
|
+
theme
|
|
277
|
+
}) => ({
|
|
278
|
+
[`& .${inputBaseClasses.root}`]: {
|
|
279
|
+
padding: theme.spacing(0, 1.5, 0, 1.5)
|
|
280
|
+
},
|
|
281
|
+
[`& .${inputBaseClasses.input}::-webkit-search-decoration,
|
|
282
|
+
& .${inputBaseClasses.input}::-webkit-search-cancel-button,
|
|
283
|
+
& .${inputBaseClasses.input}::-webkit-search-results-button,
|
|
284
|
+
& .${inputBaseClasses.input}::-webkit-search-results-decoration`]: {
|
|
285
|
+
/* clears the 'X' icon from Chrome */
|
|
286
|
+
display: 'none'
|
|
287
|
+
}
|
|
288
|
+
}));
|
|
242
289
|
const GridColumnsManagementFooter = styled('div', {
|
|
243
290
|
name: 'MuiDataGrid',
|
|
244
291
|
slot: 'ColumnsManagementFooter',
|