@mui/x-data-grid 6.11.1 → 6.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +154 -31
- package/DataGrid/DataGrid.d.ts +10 -0
- package/DataGrid/DataGrid.js +24 -1
- package/DataGrid/useDataGridProps.js +2 -0
- package/README.md +1 -1
- package/components/cell/GridActionsCell.js +1 -1
- package/components/cell/GridEditSingleSelectCell.js +1 -1
- package/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -1
- package/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/components/panel/GridPanel.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/components/panel/filterPanel/GridFilterInputDate.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/components/panel/filterPanel/GridFilterInputValue.d.ts +0 -1
- package/components/panel/filterPanel/GridFilterInputValue.js +16 -18
- package/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/components/toolbar/GridToolbarExport.js +2 -2
- package/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/components/toolbar/GridToolbarQuickFilter.d.ts +1 -1
- package/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/hooks/features/export/useGridPrintExport.js +11 -8
- package/hooks/features/export/utils.js +7 -1
- package/hooks/features/filter/gridFilterUtils.d.ts +2 -2
- package/hooks/features/filter/gridFilterUtils.js +23 -19
- package/hooks/features/filter/useGridFilter.d.ts +1 -1
- package/hooks/features/filter/useGridFilter.js +2 -2
- package/hooks/features/pagination/useGridPagination.d.ts +5 -0
- package/hooks/features/pagination/useGridPagination.js +1 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/hooks/features/rows/useGridRows.js +11 -0
- package/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/hooks/utils/useGridApiEventHandler.js +5 -5
- package/hooks/utils/useLazyRef.js +2 -0
- package/hooks/utils/useTimeout.d.ts +9 -0
- package/hooks/utils/useTimeout.js +28 -0
- package/index.js +1 -1
- package/joy/joySlots.js +2 -2
- package/legacy/DataGrid/DataGrid.js +24 -1
- package/legacy/DataGrid/useDataGridProps.js +2 -0
- package/legacy/components/cell/GridActionsCell.js +1 -1
- package/legacy/components/cell/GridEditSingleSelectCell.js +1 -1
- package/legacy/components/columnHeaders/GridColumnGroupHeader.js +1 -1
- package/legacy/components/columnHeaders/GridColumnHeaderItem.js +1 -1
- package/legacy/components/columnHeaders/GridGenericColumnHeaderItem.js +1 -1
- package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterForm.js +1 -1
- package/legacy/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/legacy/components/panel/filterPanel/GridFilterInputValue.js +16 -18
- package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/legacy/components/toolbar/GridToolbarColumnsButton.js +1 -1
- package/legacy/components/toolbar/GridToolbarDensitySelector.js +1 -1
- package/legacy/components/toolbar/GridToolbarExport.js +2 -2
- package/legacy/components/toolbar/GridToolbarExportContainer.js +1 -1
- package/legacy/components/toolbar/GridToolbarFilterButton.js +1 -1
- package/legacy/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/legacy/hooks/features/export/useGridPrintExport.js +12 -9
- package/legacy/hooks/features/export/utils.js +8 -6
- package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
- package/legacy/hooks/features/filter/useGridFilter.js +2 -2
- package/legacy/hooks/features/pagination/useGridPagination.js +1 -1
- package/legacy/hooks/features/rowSelection/useGridRowSelection.js +1 -1
- package/legacy/hooks/features/rows/useGridRows.js +11 -0
- package/legacy/hooks/features/rows/useGridRowsMeta.js +2 -2
- package/legacy/hooks/utils/useGridApiEventHandler.js +5 -5
- package/legacy/hooks/utils/useLazyRef.js +2 -0
- package/legacy/hooks/utils/useTimeout.js +38 -0
- package/legacy/index.js +1 -1
- package/legacy/joy/joySlots.js +2 -2
- package/legacy/locales/esES.js +26 -28
- package/legacy/locales/ukUA.js +25 -27
- package/legacy/locales/zhCN.js +25 -27
- package/legacy/locales/zhTW.js +34 -38
- package/legacy/utils/createSelector.js +1 -1
- package/locales/esES.js +26 -28
- package/locales/ukUA.js +25 -27
- package/locales/zhCN.js +25 -27
- package/locales/zhTW.js +34 -38
- package/models/api/gridRowApi.d.ts +6 -0
- package/models/props/DataGridProps.d.ts +11 -0
- package/modern/DataGrid/DataGrid.js +24 -1
- package/modern/DataGrid/useDataGridProps.js +2 -0
- package/modern/components/panel/filterPanel/GridFilterInputDate.js +5 -11
- package/modern/components/panel/filterPanel/GridFilterInputValue.js +15 -17
- package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/modern/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/modern/hooks/features/export/useGridPrintExport.js +9 -6
- package/modern/hooks/features/export/utils.js +7 -1
- package/modern/hooks/features/filter/gridFilterUtils.js +23 -19
- package/modern/hooks/features/filter/useGridFilter.js +2 -2
- package/modern/hooks/features/pagination/useGridPagination.js +1 -1
- package/modern/hooks/features/rows/useGridRows.js +11 -0
- package/modern/hooks/utils/useLazyRef.js +2 -0
- package/modern/hooks/utils/useTimeout.js +28 -0
- package/modern/index.js +1 -1
- package/modern/locales/esES.js +26 -28
- package/modern/locales/ukUA.js +25 -27
- package/modern/locales/zhCN.js +25 -27
- package/modern/locales/zhTW.js +34 -38
- package/node/DataGrid/DataGrid.js +26 -1
- package/node/DataGrid/useDataGridProps.js +2 -0
- package/node/components/panel/filterPanel/GridFilterInputDate.js +5 -13
- package/node/components/panel/filterPanel/GridFilterInputValue.js +15 -19
- package/node/components/panel/filterPanel/GridFilterPanel.js +1 -3
- package/node/components/toolbar/GridToolbarQuickFilter.js +5 -5
- package/node/hooks/features/export/useGridPrintExport.js +9 -6
- package/node/hooks/features/export/utils.js +7 -1
- package/node/hooks/features/filter/gridFilterUtils.js +23 -19
- package/node/hooks/features/filter/useGridFilter.js +2 -2
- package/node/hooks/features/pagination/useGridPagination.js +2 -1
- package/node/hooks/features/rows/useGridRows.js +11 -0
- package/node/hooks/utils/useLazyRef.js +2 -0
- package/node/hooks/utils/useTimeout.js +34 -0
- package/node/index.js +1 -1
- package/node/locales/esES.js +26 -28
- package/node/locales/ukUA.js +25 -27
- package/node/locales/zhCN.js +25 -27
- package/node/locales/zhTW.js +34 -38
- package/package.json +3 -3
- package/utils/createSelector.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,129 @@
|
|
|
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.12.0
|
|
7
|
+
|
|
8
|
+
_Aug 25, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 📊 Support horizontal bar chart
|
|
13
|
+
- 💫 Improved animations on Android devices
|
|
14
|
+
- 🌍 Improve Ukrainian (uk-UA) locale on the data grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
### Data Grid
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid@v6.12.0`
|
|
21
|
+
|
|
22
|
+
- [DataGrid] Allow print export for more than 100 rows (#10045) @MBilalShafi
|
|
23
|
+
- [l10n] Improve Ukrainian (uk-UA) locale (#10076) @mkundos
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid-pro@v6.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
26
|
+
|
|
27
|
+
Same changes as in `@mui/x-data-grid@v6.12.0`.
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-premium@v6.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid-pro@v6.12.0`.
|
|
32
|
+
|
|
33
|
+
### Date Pickers
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-date-pickers@v6.12.0`
|
|
36
|
+
|
|
37
|
+
- [fields] Do not clamp day of month (#9973) @flaviendelangle
|
|
38
|
+
- [pickers] Fix `ownerState` on `desktopPaper` slot props (#10103) @LukasTy
|
|
39
|
+
- [pickers] Fix to `transform-origin` when popper opens to `top` (#10069) @LukasTy
|
|
40
|
+
- [pickers] Fix `YearCalendar` scrolling (#10135) @LukasTy
|
|
41
|
+
- [pickers] Improve the typing of the adapter `dateWithTimezone` method (#10029) @flaviendelangle
|
|
42
|
+
- [pickers] Make `openPickerButton` toggle picker (#10109) @noraleonte
|
|
43
|
+
- [pickers] Update `reduceAnimations` default rule (#9864) @LukasTy
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers-pro@v6.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
46
|
+
|
|
47
|
+
Same changes as in `@mui/x-date-pickers@v6.12.0`.
|
|
48
|
+
|
|
49
|
+
### Charts / `@mui/x-charts@6.12.0`
|
|
50
|
+
|
|
51
|
+
- [charts] Fix import issue (#10111) @alexfauquette
|
|
52
|
+
- [charts] Fix `slotProps` propagation (#10105) @alexfauquette
|
|
53
|
+
- [charts] Support horizontal bar chart (#9992) @alexfauquette
|
|
54
|
+
|
|
55
|
+
### Docs
|
|
56
|
+
|
|
57
|
+
- [docs] Address charts docs feedback (#10119) @alexfauquette
|
|
58
|
+
- [docs] Capitalization convention pickers @oliviertassinari
|
|
59
|
+
- [docs] Fix a11y issue on plan links (#10026) @oliviertassinari
|
|
60
|
+
- [docs] Fix some charts horizontal overflow on mobile devices (#10082) @cupok
|
|
61
|
+
- [docs] Fix typo in quick filter @oliviertassinari
|
|
62
|
+
- [docs] Fix typo in the timezone page (#10073) @flaviendelangle
|
|
63
|
+
|
|
64
|
+
### Core
|
|
65
|
+
|
|
66
|
+
- [core] Bump monorepo (#10129) @LukasTy
|
|
67
|
+
- [core] Document a bit `useLazyRef` @oliviertassinari
|
|
68
|
+
- [core] Enable strict type checking options in the top-level tsconfig (#9925) @cherniavskii
|
|
69
|
+
- [core] Increase global e2e timeout (#10134) @LukasTy
|
|
70
|
+
- [core] Remove outdated link (#10125) @oliviertassinari
|
|
71
|
+
- [core] Update `no-response` workflow (#10102) @DanailH
|
|
72
|
+
|
|
73
|
+
## 6.11.2
|
|
74
|
+
|
|
75
|
+
_Aug 17, 2023_
|
|
76
|
+
|
|
77
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
78
|
+
|
|
79
|
+
- 🏎️ Lower the filtering delay in the grid
|
|
80
|
+
- 🌍 Improve Spanish (es-ES) locale on the data grid
|
|
81
|
+
- 🐞 Bugfixes
|
|
82
|
+
- 📚 Documentation improvements
|
|
83
|
+
|
|
84
|
+
### Data Grid
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-data-grid@v6.11.2`
|
|
87
|
+
|
|
88
|
+
- [DataGrid] Fix `eval` blocked by CSP (#9863) @romgrk
|
|
89
|
+
- [DataGrid] Fix row id bug (#10051) @romgrk
|
|
90
|
+
- [DataGrid] Honor `disableExport` flag in Print Export (#10044) @MBilalShafi
|
|
91
|
+
- [DataGrid] Lower filter debounce delay (#9712) @romgrk
|
|
92
|
+
- [DataGrid] Unhide potential ref binding issue (#9965) @oliviertassinari
|
|
93
|
+
- [l10n] Improve Chinese (zh-CN) and Chinese(traditional) (zh-TW) locales (#9999) @MyNameIsTakenOMG
|
|
94
|
+
- [l10n] Improve Spanish (es-ES) locale (#10037) @Macampu420
|
|
95
|
+
|
|
96
|
+
#### `@mui/x-data-grid-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
97
|
+
|
|
98
|
+
Same changes as in `@mui/x-data-grid@v6.11.2`.
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-data-grid-premium@v6.11.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-data-grid-pro@v6.11.2`.
|
|
103
|
+
|
|
104
|
+
### Date Pickers
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-date-pickers@v6.11.2`
|
|
107
|
+
|
|
108
|
+
- [pickers] Fix month switcher RTL (#10003) @alexfauquette
|
|
109
|
+
- [pickers] Follow-up on using device motion reduction preference (#9858) @LukasTy
|
|
110
|
+
- [pickers] Pass the shortcut information in the `onChange` context (#9985) @flaviendelangle
|
|
111
|
+
- [pickers] Replace `Grid` toolbar component with a styled `div` (#10052) @LukasTy
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-date-pickers-pro@v6.11.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-date-pickers@v6.11.2`.
|
|
116
|
+
|
|
117
|
+
### Docs
|
|
118
|
+
|
|
119
|
+
- [docs] Add migration guide for the Tree View (#9987) @flaviendelangle
|
|
120
|
+
- [docs] Fix en-US changelog @oliviertassinari
|
|
121
|
+
- [docs] Update column types (#10040) @romgrk
|
|
122
|
+
|
|
123
|
+
### Core
|
|
124
|
+
|
|
125
|
+
- [core] Remove unnecessary Box (#9831) @oliviertassinari
|
|
126
|
+
- [core] Set GitHub Action top level permission @oliviertassinari
|
|
127
|
+
- [core] Split the pickers test utils (#9976) @flaviendelangle
|
|
128
|
+
|
|
6
129
|
## 6.11.1
|
|
7
130
|
|
|
8
131
|
_Aug 11, 2023_
|
|
@@ -21,11 +144,11 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
21
144
|
|
|
22
145
|
- [DataGrid] `getCellAggregationResult`: Handle `null` `rowNode` case (#9915) @romgrk
|
|
23
146
|
|
|
24
|
-
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
147
|
+
#### `@mui/x-data-grid-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
25
148
|
|
|
26
149
|
Same changes as in `@mui/x-data-grid@6.11.1`.
|
|
27
150
|
|
|
28
|
-
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link)
|
|
151
|
+
#### `@mui/x-data-grid-premium@6.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
29
152
|
|
|
30
153
|
Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
31
154
|
|
|
@@ -40,7 +163,7 @@ Same changes as in `@mui/x-data-grid-pro@6.11.1`.
|
|
|
40
163
|
- [l10n] Improve Finnish (fi-FI) locale (#9795) @kurkle
|
|
41
164
|
- [l10n] Improve Icelandic (is-IS) locale (#9639) @magnimarels
|
|
42
165
|
|
|
43
|
-
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link)
|
|
166
|
+
#### `@mui/x-date-pickers-pro@6.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
44
167
|
|
|
45
168
|
Same changes as in `@mui/x-date-pickers@6.11.1`.
|
|
46
169
|
|
|
@@ -90,11 +213,11 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
90
213
|
- [l10n] Improve Finnish (fi-FI) locale (#9848) @sambbaahh
|
|
91
214
|
- [l10n] Improve Italian (it-IT) locale (#9627) @fabio-rizzello-omnia
|
|
92
215
|
|
|
93
|
-
#### `@mui/x-data-grid-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link)
|
|
216
|
+
#### `@mui/x-data-grid-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
94
217
|
|
|
95
218
|
Same changes as in `@mui/x-data-grid@v6.11.0`.
|
|
96
219
|
|
|
97
|
-
#### `@mui/x-data-grid-premium@v6.11.0` [](https://mui.com/r/x-premium-svg-link)
|
|
220
|
+
#### `@mui/x-data-grid-premium@v6.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
98
221
|
|
|
99
222
|
Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
100
223
|
|
|
@@ -113,7 +236,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.11.0`.
|
|
|
113
236
|
- [pickers] Fix offset management on dayjs adapter (#9884) @flaviendelangle
|
|
114
237
|
- [pickers] Use device motion reduction preference (#9823) @LukasTy
|
|
115
238
|
|
|
116
|
-
#### `@mui/x-date-pickers-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link)
|
|
239
|
+
#### `@mui/x-date-pickers-pro@v6.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
240
|
|
|
118
241
|
Same changes as in `@mui/x-date-pickers@v6.11.0`.
|
|
119
242
|
|
|
@@ -176,11 +299,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
176
299
|
- [DataGrid] Keep focused cell in the DOM (#7357) @yaredtsy
|
|
177
300
|
- [l10n] Improve Finnish (fi-FI) locale (#9746) @sambbaahh
|
|
178
301
|
|
|
179
|
-
#### `@mui/x-data-grid-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
302
|
+
#### `@mui/x-data-grid-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
180
303
|
|
|
181
304
|
Same changes as in `@mui/x-data-grid@v6.10.2`.
|
|
182
305
|
|
|
183
|
-
#### `@mui/x-data-grid-premium@v6.10.2` [](https://mui.com/r/x-premium-svg-link)
|
|
306
|
+
#### `@mui/x-data-grid-premium@v6.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
184
307
|
|
|
185
308
|
Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
186
309
|
|
|
@@ -192,7 +315,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.2`, plus:
|
|
|
192
315
|
|
|
193
316
|
- [pickers] Remove the `endOfDate` from `DigitalClock` timeOptions (#9800) @noraleonte
|
|
194
317
|
|
|
195
|
-
#### `@mui/x-date-pickers-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link)
|
|
318
|
+
#### `@mui/x-date-pickers-pro@v6.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
196
319
|
|
|
197
320
|
Same changes as in `@mui/x-date-pickers@v6.10.2`.
|
|
198
321
|
|
|
@@ -244,14 +367,14 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
244
367
|
- [DataGrid] Update focused cell on page change via keyboard (#9203) @m4theushw
|
|
245
368
|
- [DataGrid] Wait for remote stylesheets to load before print (#9665) @cherniavskii
|
|
246
369
|
|
|
247
|
-
#### `@mui/x-data-grid-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
370
|
+
#### `@mui/x-data-grid-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
248
371
|
|
|
249
372
|
Same changes as in `@mui/x-data-grid@v6.10.1`, plus:
|
|
250
373
|
|
|
251
374
|
- [DataGridPro] Improve tree data performance (#9682) @cherniavskii
|
|
252
375
|
- [DataGridPro] Prevent affecting cells from child DataGrid when resizing a column (#9670) @m4theushw
|
|
253
376
|
|
|
254
|
-
#### `@mui/x-data-grid-premium@v6.10.1` [](https://mui.com/r/x-premium-svg-link)
|
|
377
|
+
#### `@mui/x-data-grid-premium@v6.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
255
378
|
|
|
256
379
|
Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
257
380
|
|
|
@@ -262,7 +385,7 @@ Same changes as in `@mui/x-data-grid-pro@v6.10.1`.
|
|
|
262
385
|
- [fields] Fix `format` and `value` update order (#9715) @LukasTy
|
|
263
386
|
- [pickers] Remove `require` usage in comment (#9675) @LukasTy
|
|
264
387
|
|
|
265
|
-
#### `@mui/x-date-pickers-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link)
|
|
388
|
+
#### `@mui/x-date-pickers-pro@v6.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
266
389
|
|
|
267
390
|
Same changes as in `@mui/x-date-pickers@v6.10.1`.
|
|
268
391
|
|
|
@@ -313,11 +436,11 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
|
|
|
313
436
|
- [DataGrid] Make `rowExpansionChange` event public (#9611) @MBilalShafi
|
|
314
437
|
- [l10n] Improve Polish (pl-PL) locale (#9625) @ch1llysense
|
|
315
438
|
|
|
316
|
-
#### `@mui/x-data-grid-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
439
|
+
#### `@mui/x-data-grid-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
317
440
|
|
|
318
441
|
Same changes as in `@mui/x-data-grid@6.10.0`.
|
|
319
442
|
|
|
320
|
-
#### `@mui/x-data-grid-premium@6.10.0` [](https://mui.com/r/x-premium-svg-link)
|
|
443
|
+
#### `@mui/x-data-grid-premium@6.10.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
321
444
|
|
|
322
445
|
Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
323
446
|
|
|
@@ -328,7 +451,7 @@ Same changes as in `@mui/x-data-grid-pro@6.10.0`.
|
|
|
328
451
|
- [pickers] Fix date calendar issues (#9652) @LukasTy
|
|
329
452
|
- [l10n] Improve Norwegian (nb-NO) locale (#9608) @JosteinBrevik
|
|
330
453
|
|
|
331
|
-
#### `@mui/x-date-pickers-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link)
|
|
454
|
+
#### `@mui/x-date-pickers-pro@6.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
332
455
|
|
|
333
456
|
Same changes as in `@mui/x-date-pickers@6.10.0`.
|
|
334
457
|
|
|
@@ -381,11 +504,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
381
504
|
- [DataGrid] Correctly reflect `TablePagination`'s `rowsPerPageOptions` shape to `pageSizeOptions` (#9438) @burakkgunduzz
|
|
382
505
|
- [l10n] Improve Spanish (es-ES) locale (#9500) @fufex
|
|
383
506
|
|
|
384
|
-
#### `@mui/x-data-grid-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link)
|
|
507
|
+
#### `@mui/x-data-grid-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
385
508
|
|
|
386
509
|
Same changes as in `@mui/x-data-grid@6.9.2`.
|
|
387
510
|
|
|
388
|
-
#### `@mui/x-data-grid-premium@6.9.2` [](https://mui.com/r/x-premium-svg-link)
|
|
511
|
+
#### `@mui/x-data-grid-premium@6.9.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
389
512
|
|
|
390
513
|
Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
391
514
|
|
|
@@ -398,7 +521,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.2`, plus:
|
|
|
398
521
|
- [pickers] Forward digital clock classes (#9555) @YoonjiJang
|
|
399
522
|
- [pickers] Rename `internal` folder to `internals` on `@mui/x-date-picker-pro` (#9571) @flaviendelangle
|
|
400
523
|
|
|
401
|
-
#### `@mui/x-date-pickers-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link)
|
|
524
|
+
#### `@mui/x-date-pickers-pro@6.9.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
402
525
|
|
|
403
526
|
Same changes as in `@mui/x-date-pickers@6.9.2`.
|
|
404
527
|
|
|
@@ -446,14 +569,14 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
446
569
|
- [DataGrid] Fix `Maximum call stack size exceeded` error when using fractional width (#9516) @cherniavskii
|
|
447
570
|
- [l10n] Improve Romanian (ro-RO) and Hungarian (hu-HU) translations (#9436) @noraleonte
|
|
448
571
|
|
|
449
|
-
#### `@mui/x-data-grid-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link)
|
|
572
|
+
#### `@mui/x-data-grid-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
450
573
|
|
|
451
574
|
Same changes as in `@mui/x-data-grid@6.9.1`, plus:
|
|
452
575
|
|
|
453
576
|
- [DataGridPro] Don't throw error in column pinning (#9507) @romgrk
|
|
454
577
|
- [DataGridPro] Fix bug with `checkboxSelection` and treeData/grouping (#9418) @romgrk
|
|
455
578
|
|
|
456
|
-
#### `@mui/x-data-grid-premium@6.9.1` [](https://mui.com/r/x-premium-svg-link)
|
|
579
|
+
#### `@mui/x-data-grid-premium@6.9.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
457
580
|
|
|
458
581
|
Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
459
582
|
|
|
@@ -467,7 +590,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.1`.
|
|
|
467
590
|
- [l10n] Add Chinese (Hong Kong) (zh-HK) locale (#9468) @samchiu90
|
|
468
591
|
- [l10n] Improve Romanian (ro-RO) translations (#9436) @noraleonte
|
|
469
592
|
|
|
470
|
-
#### `@mui/x-date-pickers-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link)
|
|
593
|
+
#### `@mui/x-date-pickers-pro@6.9.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
471
594
|
|
|
472
595
|
Same changes as in `@mui/x-date-pickers@6.9.1`.
|
|
473
596
|
|
|
@@ -531,11 +654,11 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
531
654
|
- [DataGrid] Use container dimensions from `getComputedStyle` (#9236) @m4theushw
|
|
532
655
|
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#9404) @julioAz
|
|
533
656
|
|
|
534
|
-
#### `@mui/x-data-grid-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link)
|
|
657
|
+
#### `@mui/x-data-grid-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
535
658
|
|
|
536
659
|
Same changes as in `@mui/x-data-grid@6.9.0`.
|
|
537
660
|
|
|
538
|
-
#### `@mui/x-data-grid-premium@6.9.0` [](https://mui.com/r/x-premium-svg-link)
|
|
661
|
+
#### `@mui/x-data-grid-premium@6.9.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
539
662
|
|
|
540
663
|
Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
541
664
|
|
|
@@ -551,7 +674,7 @@ Same changes as in `@mui/x-data-grid-pro@6.9.0`.
|
|
|
551
674
|
- [pickers] Reduce date range calendar vertical border width (#9368) @oliviertassinari
|
|
552
675
|
- [pickers] Reset fields internal state when pasting value (#9385) @alexfauquette
|
|
553
676
|
|
|
554
|
-
#### `@mui/x-date-pickers-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link)
|
|
677
|
+
#### `@mui/x-date-pickers-pro@6.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
555
678
|
|
|
556
679
|
Same changes as in `@mui/x-date-pickers@6.9.0`.
|
|
557
680
|
|
|
@@ -607,11 +730,11 @@ We'd like to offer a big thanks to the 13 contributors who made this release pos
|
|
|
607
730
|
- [DataGrid] Scroll performance improvements (#9037) @romgrk
|
|
608
731
|
- [l10n] Improve Greek (el-GR) locale (#9292) @clytras
|
|
609
732
|
|
|
610
|
-
#### `@mui/x-data-grid-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link)
|
|
733
|
+
#### `@mui/x-data-grid-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
611
734
|
|
|
612
735
|
Same changes as in `@mui/x-data-grid@6.8.0`.
|
|
613
736
|
|
|
614
|
-
#### `@mui/x-data-grid-premium@6.8.0` [](https://mui.com/r/x-premium-svg-link)
|
|
737
|
+
#### `@mui/x-data-grid-premium@6.8.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
615
738
|
|
|
616
739
|
Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
617
740
|
|
|
@@ -624,7 +747,7 @@ Same changes as in `@mui/x-data-grid-pro@6.8.0`.
|
|
|
624
747
|
- [pickers] Close the calendar when a shortcut is selected (#9080) @flaviendelangle
|
|
625
748
|
- [pickers] Fix disabling for digital clock (#9300) @alexfauquette
|
|
626
749
|
|
|
627
|
-
#### `@mui/x-date-pickers-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link)
|
|
750
|
+
#### `@mui/x-date-pickers-pro@6.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
628
751
|
|
|
629
752
|
Same changes as in `@mui/x-date-pickers@6.8.0`.
|
|
630
753
|
|
|
@@ -700,13 +823,13 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
700
823
|
- [l10n] Improve German (de-DE) locale (#9259) @ximex
|
|
701
824
|
- [l10n] Improve Turkish (tr-TR) locale (#9237) @MCErtan
|
|
702
825
|
|
|
703
|
-
#### `@mui/x-data-grid-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link)
|
|
826
|
+
#### `@mui/x-data-grid-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
704
827
|
|
|
705
828
|
Same changes as in `@mui/x-data-grid@6.7.0`, plus:
|
|
706
829
|
|
|
707
830
|
- [DataGridPro] Improve header filter menu visuals (#9181) @MBilalShafi
|
|
708
831
|
|
|
709
|
-
#### `@mui/x-data-grid-premium@6.7.0` [](https://mui.com/r/x-premium-svg-link)
|
|
832
|
+
#### `@mui/x-data-grid-premium@6.7.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
710
833
|
|
|
711
834
|
Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
712
835
|
|
|
@@ -720,7 +843,7 @@ Same changes as in `@mui/x-data-grid-pro@6.7.0`, plus:
|
|
|
720
843
|
- [l10n] Improve German (de-DE) locale (#9258) @ximex
|
|
721
844
|
- [pickers] Apply dynamic default format depending on views for all desktop and mobile pickers (#9126) @flaviendelangle
|
|
722
845
|
|
|
723
|
-
#### `@mui/x-date-pickers-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link)
|
|
846
|
+
#### `@mui/x-date-pickers-pro@6.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
724
847
|
|
|
725
848
|
Same changes as in `@mui/x-date-pickers@6.7.0`, plus:
|
|
726
849
|
|
|
@@ -2872,7 +2995,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
|
|
|
2872
2995
|
|
|
2873
2996
|
#### Changes
|
|
2874
2997
|
|
|
2875
|
-
- [DateRangePicker] Fix input focused style and mobile
|
|
2998
|
+
- [DateRangePicker] Fix input focused style and mobile behavior (#6645) @LukasTy
|
|
2876
2999
|
- [fields] Update sections when the locale changes (#6649) @flaviendelangle
|
|
2877
3000
|
- [pickers] Add Ukrainian (uk-UA) locale (#6661) @Dufran
|
|
2878
3001
|
- [pickers] Allow non-controlled usage of the calendar components (#6643) @flaviendelangle
|
package/DataGrid/DataGrid.d.ts
CHANGED
|
@@ -6,4 +6,14 @@ interface DataGridComponent {
|
|
|
6
6
|
propTypes?: any;
|
|
7
7
|
}
|
|
8
8
|
export declare const DataGrid: DataGridComponent;
|
|
9
|
+
/**
|
|
10
|
+
* Remove at v7
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
export declare const SUBMIT_FILTER_STROKE_TIME: number;
|
|
14
|
+
/**
|
|
15
|
+
* Remove at v7
|
|
16
|
+
* @deprecated
|
|
17
|
+
*/
|
|
18
|
+
export declare const SUBMIT_FILTER_DATE_STROKE_TIME: number;
|
|
9
19
|
export {};
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -5,7 +5,7 @@ import { chainPropTypes } from '@mui/utils';
|
|
|
5
5
|
import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot } from '../components';
|
|
6
6
|
import { GridContextProvider } from '../context/GridContextProvider';
|
|
7
7
|
import { useDataGridComponent } from './useDataGridComponent';
|
|
8
|
-
import { useDataGridProps } from './useDataGridProps';
|
|
8
|
+
import { useDataGridProps, DATA_GRID_PROPS_DEFAULT_VALUES } from './useDataGridProps';
|
|
9
9
|
import { DataGridVirtualScroller } from '../components/DataGridVirtualScroller';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -28,6 +28,18 @@ const DataGridRaw = /*#__PURE__*/React.forwardRef(function DataGrid(inProps, ref
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
export const DataGrid = /*#__PURE__*/React.memo(DataGridRaw);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Remove at v7
|
|
34
|
+
* @deprecated
|
|
35
|
+
*/
|
|
36
|
+
export const SUBMIT_FILTER_STROKE_TIME = DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Remove at v7
|
|
40
|
+
* @deprecated
|
|
41
|
+
*/
|
|
42
|
+
export const SUBMIT_FILTER_DATE_STROKE_TIME = DATA_GRID_PROPS_DEFAULT_VALUES.filterDebounceMs;
|
|
31
43
|
DataGridRaw.propTypes = {
|
|
32
44
|
// ----------------------------- Warning --------------------------------
|
|
33
45
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -141,6 +153,12 @@ DataGridRaw.propTypes = {
|
|
|
141
153
|
* @default false
|
|
142
154
|
*/
|
|
143
155
|
disableDensitySelector: PropTypes.bool,
|
|
156
|
+
/**
|
|
157
|
+
* If `true`, `eval()` is not used for performance optimization.
|
|
158
|
+
* @default false
|
|
159
|
+
* @ignore - do not document
|
|
160
|
+
*/
|
|
161
|
+
disableEval: PropTypes.bool,
|
|
144
162
|
/**
|
|
145
163
|
* If `true`, the selection on click on a row or cell is disabled.
|
|
146
164
|
* @default false
|
|
@@ -165,6 +183,11 @@ DataGridRaw.propTypes = {
|
|
|
165
183
|
columnGrouping: PropTypes.bool,
|
|
166
184
|
warnIfFocusStateIsNotSynced: PropTypes.bool
|
|
167
185
|
}),
|
|
186
|
+
/**
|
|
187
|
+
* The milliseconds delay to wait after a keystroke before triggering filtering.
|
|
188
|
+
* @default 150
|
|
189
|
+
*/
|
|
190
|
+
filterDebounceMs: PropTypes.number,
|
|
168
191
|
/**
|
|
169
192
|
* Filtering can be processed on the server or client-side.
|
|
170
193
|
* Set it to 'server' if you would like to handle filtering on the server-side.
|
|
@@ -37,6 +37,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
37
37
|
disableColumnMenu: false,
|
|
38
38
|
disableColumnSelector: false,
|
|
39
39
|
disableDensitySelector: false,
|
|
40
|
+
disableEval: false,
|
|
40
41
|
disableMultipleColumnsFiltering: false,
|
|
41
42
|
disableMultipleRowSelection: false,
|
|
42
43
|
disableMultipleColumnsSorting: false,
|
|
@@ -44,6 +45,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
44
45
|
disableVirtualization: false,
|
|
45
46
|
editMode: GridEditModes.Cell,
|
|
46
47
|
filterMode: 'client',
|
|
48
|
+
filterDebounceMs: 150,
|
|
47
49
|
columnHeaderHeight: 56,
|
|
48
50
|
hideFooter: false,
|
|
49
51
|
hideFooterPagination: false,
|
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ function GridActionsCell(props) {
|
|
|
45
45
|
React.useLayoutEffect(() => {
|
|
46
46
|
if (!hasFocus) {
|
|
47
47
|
Object.entries(touchRippleRefs.current).forEach(([index, ref]) => {
|
|
48
|
-
ref == null
|
|
48
|
+
ref == null || ref.stop({}, () => {
|
|
49
49
|
delete touchRippleRefs.current[index];
|
|
50
50
|
});
|
|
51
51
|
});
|
|
@@ -47,7 +47,7 @@ function GridEditSingleSelectCell(props) {
|
|
|
47
47
|
useEnhancedEffect(() => {
|
|
48
48
|
if (hasFocus) {
|
|
49
49
|
var _inputRef$current;
|
|
50
|
-
(_inputRef$current = inputRef.current) == null
|
|
50
|
+
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
51
51
|
}
|
|
52
52
|
}, [hasFocus]);
|
|
53
53
|
if (!isSingleSelectColDef(colDef)) {
|
|
@@ -79,7 +79,7 @@ function GridColumnGroupHeader(props) {
|
|
|
79
79
|
if (hasFocus) {
|
|
80
80
|
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
81
81
|
const elementToFocus = focusableElement || headerCellRef.current;
|
|
82
|
-
elementToFocus == null
|
|
82
|
+
elementToFocus == null || elementToFocus.focus();
|
|
83
83
|
}
|
|
84
84
|
}, [apiRef, hasFocus]);
|
|
85
85
|
const publish = React.useCallback(eventName => event => {
|
|
@@ -138,7 +138,7 @@ function GridColumnHeaderItem(props) {
|
|
|
138
138
|
if (hasFocus && !columnMenuState.open) {
|
|
139
139
|
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
140
140
|
const elementToFocus = focusableElement || headerCellRef.current;
|
|
141
|
-
elementToFocus == null
|
|
141
|
+
elementToFocus == null || elementToFocus.focus();
|
|
142
142
|
apiRef.current.columnHeadersContainerElementRef.current.scrollLeft = 0;
|
|
143
143
|
}
|
|
144
144
|
}, [apiRef, hasFocus]);
|
|
@@ -54,7 +54,7 @@ const GridGenericColumnHeaderItem = /*#__PURE__*/React.forwardRef(function GridG
|
|
|
54
54
|
if (hasFocus && !columnMenuState.open) {
|
|
55
55
|
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
56
56
|
const elementToFocus = focusableElement || headerCellRef.current;
|
|
57
|
-
elementToFocus == null
|
|
57
|
+
elementToFocus == null || elementToFocus.focus();
|
|
58
58
|
apiRef.current.columnHeadersContainerElementRef.current.scrollLeft = 0;
|
|
59
59
|
}
|
|
60
60
|
}, [apiRef, hasFocus]);
|
|
@@ -55,7 +55,7 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
|
|
|
55
55
|
if (hasFocus) {
|
|
56
56
|
var _checkboxElement$curr;
|
|
57
57
|
const input = (_checkboxElement$curr = checkboxElement.current) == null ? void 0 : _checkboxElement$curr.querySelector('input');
|
|
58
|
-
input == null
|
|
58
|
+
input == null || input.focus({
|
|
59
59
|
preventScroll: true
|
|
60
60
|
});
|
|
61
61
|
} else if (rippleRef.current) {
|
|
@@ -16,7 +16,7 @@ export interface GridPanelProps extends Partial<React.ComponentProps<typeof Grid
|
|
|
16
16
|
open: boolean;
|
|
17
17
|
}
|
|
18
18
|
export declare const gridPanelClasses: Record<keyof GridPanelClasses, string>;
|
|
19
|
-
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit<import("@mui/base").PopperProps
|
|
19
|
+
declare const GridPanelRoot: import("@emotion/styled").StyledComponent<Pick<Omit<import("@mui/base").PopperProps, "direction"> & {
|
|
20
20
|
component?: React.ElementType<any> | undefined;
|
|
21
21
|
components?: {
|
|
22
22
|
Root?: React.ElementType<any> | undefined;
|
|
@@ -217,7 +217,7 @@ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(pro
|
|
|
217
217
|
focus: () => {
|
|
218
218
|
if (currentOperator != null && currentOperator.InputComponent) {
|
|
219
219
|
var _valueRef$current;
|
|
220
|
-
valueRef == null || (_valueRef$current = valueRef.current) == null
|
|
220
|
+
valueRef == null || (_valueRef$current = valueRef.current) == null || _valueRef$current.focus();
|
|
221
221
|
} else {
|
|
222
222
|
filterSelectorRef.current.focus();
|
|
223
223
|
}
|
|
@@ -10,7 +10,6 @@ export type GridFilterInputDateProps = GridFilterInputValueProps & TextFieldProp
|
|
|
10
10
|
*/
|
|
11
11
|
isFilterActive?: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare const SUBMIT_FILTER_DATE_STROKE_TIME = 500;
|
|
14
13
|
declare function GridFilterInputDate(props: GridFilterInputDateProps): React.JSX.Element;
|
|
15
14
|
declare namespace GridFilterInputDate {
|
|
16
15
|
var propTypes: any;
|
|
@@ -4,9 +4,9 @@ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "I
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { unstable_useId as useId } from '@mui/utils';
|
|
7
|
+
import { useTimeout } from '../../../hooks/utils/useTimeout';
|
|
7
8
|
import { useGridRootProps } from '../../../hooks/utils/useGridRootProps';
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
export const SUBMIT_FILTER_DATE_STROKE_TIME = 500;
|
|
10
10
|
function GridFilterInputDate(props) {
|
|
11
11
|
var _item$value, _rootProps$slotProps;
|
|
12
12
|
const {
|
|
@@ -21,28 +21,22 @@ function GridFilterInputDate(props) {
|
|
|
21
21
|
disabled
|
|
22
22
|
} = props,
|
|
23
23
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
24
|
-
const filterTimeout =
|
|
24
|
+
const filterTimeout = useTimeout();
|
|
25
25
|
const [filterValueState, setFilterValueState] = React.useState((_item$value = item.value) != null ? _item$value : '');
|
|
26
26
|
const [applying, setIsApplying] = React.useState(false);
|
|
27
27
|
const id = useId();
|
|
28
28
|
const rootProps = useGridRootProps();
|
|
29
29
|
const onFilterChange = React.useCallback(event => {
|
|
30
30
|
const value = event.target.value;
|
|
31
|
-
clearTimeout(filterTimeout.current);
|
|
32
31
|
setFilterValueState(String(value));
|
|
33
32
|
setIsApplying(true);
|
|
34
|
-
filterTimeout.
|
|
33
|
+
filterTimeout.start(rootProps.filterDebounceMs, () => {
|
|
35
34
|
applyValue(_extends({}, item, {
|
|
36
35
|
value
|
|
37
36
|
}));
|
|
38
37
|
setIsApplying(false);
|
|
39
|
-
}
|
|
40
|
-
}, [applyValue, item]);
|
|
41
|
-
React.useEffect(() => {
|
|
42
|
-
return () => {
|
|
43
|
-
clearTimeout(filterTimeout.current);
|
|
44
|
-
};
|
|
45
|
-
}, []);
|
|
38
|
+
});
|
|
39
|
+
}, [applyValue, item, rootProps.filterDebounceMs, filterTimeout]);
|
|
46
40
|
React.useEffect(() => {
|
|
47
41
|
var _item$value2;
|
|
48
42
|
const itemValue = (_item$value2 = item.value) != null ? _item$value2 : '';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
3
|
import { GridFilterInputValueProps } from './GridFilterInputValueProps';
|
|
4
|
-
export declare const SUBMIT_FILTER_STROKE_TIME = 500;
|
|
5
4
|
export type GridTypeFilterInputValueProps = GridFilterInputValueProps & TextFieldProps & {
|
|
6
5
|
type?: 'text' | 'number' | 'date' | 'datetime-local';
|
|
7
6
|
clearButton?: React.ReactNode | null;
|