@mui/x-data-grid 5.0.0-beta.7 → 5.2.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 CHANGED
@@ -3,6 +3,322 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 5.2.0
7
+
8
+ _Dec 9, 2021_
9
+
10
+ A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ ### `@mui/x-data-grid@v5.2.0` / `@mui/x-data-grid-pro@v5.2.0`
13
+
14
+ - 🚀 Introduce the [column pinning](https://mui.com/components/data-grid/columns/#column-pinning) feature (#2946) @m4theushw
15
+
16
+ <img src="https://user-images.githubusercontent.com/42154031/145425635-b6314fbe-2f1e-4b73-908f-33ee1fda20c7.gif" width="964" height="657">
17
+
18
+ - 🔥 Add ability to disable export options (#3270) @alexfauquette
19
+
20
+ You can disable either export options by setting `disableToolbarButton` to `true`.
21
+
22
+ ```tsx
23
+ <GridToolbarExport csvOptions={{ disableToolbarButton: true }} />
24
+ ```
25
+
26
+ ```tsx
27
+ <GridToolbarExport printOptions={{ disableToolbarButton: true }} />
28
+ ```
29
+
30
+ - 🙈 Add a new option to hide the amount of descendant on the grouping cells of the Tree Data (#3368) @flaviendelangle
31
+
32
+ ```tsx
33
+ <DataGridPro
34
+ treeData
35
+ rows={rows}
36
+ columns={columns}
37
+ groupingColDef={{ hideDescendantCount }}
38
+ />
39
+ ```
40
+
41
+ - ⚠️ Deprecate the `getValue` param for the `valueGetter` callback (#3314) @flaviendelangle
42
+
43
+ Instead, you can access directly the row in the params
44
+
45
+ ```diff
46
+ -valueGetter: (params) => `${params.getValue(params.id, 'firstName') || ''} ${params.getValue(params.id, 'lastName') || ''}`
47
+ +valueGetter: (params) => `${params.row.firstName || ''} ${params.row.lastName || ''}`
48
+ ```
49
+
50
+ - 📚 Documentation improvements
51
+ - 🐞 Bugfixes
52
+
53
+ #### Changes
54
+
55
+ - [DataGridPro] Add column pinning (#2946) @m4theushw
56
+ - [DataGridPro] Add `hideDescendantCount` option to Tree Data (#3368) @flaviendelangle
57
+ - [DataGridPro] Do not expand row children with <kbd>Shift</kbd> + Space (#3380) @flaviendelangle
58
+ - [DataGridPro] Pass a list of `fields` to the callback version of `groupingColDef` (#3316) @flaviendelangle
59
+ - [DataGrid] Deprecate the `getValue` param for the `valueGetter` callback (#3314) @flaviendelangle
60
+ - [DataGrid] Add ability to disable export options (#3270) @alexfauquette
61
+ - [DataGrid] Filter value are conserved when possible (#3198) @alexfauquette
62
+ - [DataGrid] Fix `DatePicker` bug by limiting years to 4 digits (#3222) @alexfauquette
63
+ - [DataGrid] Fix column menu position when closing (#3289) @m4theushw
64
+ - [DataGrid] Fix to not crash when a sort item uses a non-existing column (#3224) @flaviendelangle
65
+
66
+ ### Core
67
+
68
+ - [core] Add funding field (#3331) @oliviertassinari
69
+ - [core] Fix missing LICENSE file (#3330) @oliviertassinari
70
+ - [core] Fix release month in CHANGELOG (#3367) @m4theushw
71
+ - [core] Fix `yarn prettier` script (#3292) @oliviertassinari
72
+ - [core] Improve tests for Tree Data (#3366) @flaviendelangle
73
+ - [core] Never import directly from the `__modules__` folder in the `x-data-grid-generator` package (#3379) @flaviendelangle
74
+ - [core] Transition to a new StackOverflow tag (#3308) @oliviertassinari
75
+ - [core] Type the `api` param in callback interfaces (#3315) @flaviendelangle
76
+ - [core] Update monorepo (#3370) @flaviendelangle
77
+ - [core] Use pre-processors for sorting and filtering (#3318) @flaviendelangle
78
+ - [test] Replace `useFakeTimers` (#3323) @m4theushw
79
+
80
+ ### Docs
81
+
82
+ - [docs] Always use auto-generated `apiRef` documentation (#3266) @flaviendelangle
83
+ - [docs] Avoid 301 links (#3329) @oliviertassinari
84
+ - [docs] Disable the ad when not MIT (#3334) @oliviertassinari
85
+ - [docs] Fix 404 link to Zendesk @oliviertassinari
86
+ - [docs] Fix dead link on the overview page (#3326) @flaviendelangle
87
+ - [docs] Fix double MUI in the title (#3332) @oliviertassinari
88
+ - [docs] Fix duplicate "the" (#3365) @noam-honig
89
+ - [docs] Update branch to deploy docs (#3321) @m4theushw
90
+
91
+ ## 5.1.0
92
+
93
+ _Dec 2, 2021_
94
+
95
+ A big thanks to the 11 contributors who made this release possible. Here are some highlights ✨:
96
+
97
+ ### `@mui/x-data-grid@v5.1.0` / `@mui/x-data-grid-pro@v5.1.0`
98
+
99
+ - 🚀 Introduce the [tree data](https://mui.com/components/data-grid/group-pivot/#tree-data) feature (#2725) @flaviendelangle
100
+
101
+ <img src="https://user-images.githubusercontent.com/42154031/144259216-fc4f90ac-4d8b-4253-bc95-009204349a4c.gif" width="854" height="453" />
102
+
103
+ - 💅 Add support for `sx` prop in the DataGrid and DataGridPro (#3281) @m4theushw
104
+ - 🔦 Improve focus management in the filter panel (#3004) @alexfauquette
105
+ - 🎁 Add strict typing to the event publisher and listener (#3022) (@flaviendelangle)
106
+
107
+ The `apiRef.current.subscribeEvent`, `apiRef.current.publishEvent` and `useGridApiEventHandler` are now fully typed and gives you the correct arguments based on the event you are listening to or emitting.
108
+
109
+ ```ts
110
+ const handleRowClick: GridEventListener<'rowClick'> = (
111
+ params, // has type `GridRowParams`
112
+ event, // has type `MuiEvent<React.MouseEvent<HTMLElement>>
113
+ details, // has type `GridCallbackDetails
114
+ ) => {
115
+ /* ... */
116
+ };
117
+
118
+ // with string event name
119
+ apiRef.current.subscribeEvent('rowClick', handleRowClick);
120
+ useGridApiEventHandler(apiRef, 'rowClick', handleRowClick);
121
+
122
+ // or with enum event name
123
+ apiRef.current.subscribeEvent(GridEvents.rowClick, handleRowClick);
124
+ useGridApiEventHandler(apiRef, GridEvents.rowClick, handleRowClick);
125
+ ```
126
+
127
+ - 🌎 Translation updates for many locales
128
+
129
+ If you are using DataGrid or DataGridPro in another language, check [this issue](https://github.com/mui-org/material-ui-x/issues/3211) to discover which translations are missing.
130
+
131
+ - 📚 Documentation improvements
132
+ - 🐞 Bugfixes
133
+
134
+ #### Changes
135
+
136
+ - [DataGridPro] Add tree data (#2725) @flaviendelangle
137
+ - [DataGridPro] Remove the callback version of the `groupigColDef` prop (#3317) @flaviendelangle
138
+ - [DataGridPro] Improve license file (#3278) @oliviertassinari
139
+ - [DataGridPro] Add types for event publishers and listeners (#3022) @flaviendelangle
140
+ - [DataGrid] Add support for `sx` prop (#3281) @m4theushw
141
+ - [DataGrid] Do not debounce the initial resizing of the grid (#3213) @flaviendelangle
142
+ - [DataGrid] Fix usage of dynamic columns (#3204) @flaviendelangle
143
+ - [DataGrid] Move focus when selecting option with <kbd>Enter</kbd> in the `singleSelect` (#3220) @m4theushw
144
+ - [DataGrid] Focus on the last value input when a filter is added or removed (#3004) @alexfauquette
145
+ - [DataGrid] Prepare the tree structure for grouping sorting / filtering (#3301) @flaviendelangle
146
+ - [DataGrid] Rework keyboard navigation (#3193) @flaviendelangle
147
+ - [DataGrid] Set minimum dimensions to `GridOverlay` when no row is provided (#3261) @flaviendelangle
148
+ - [DataGrid] Improve German (deDE) locale (#3271, #3230, #3293) @sebastianfrey
149
+ - [DataGrid] Improve Hebrew (heIL) locale (#3294) @ColdAtNight
150
+ - [DataGrid] Improve Russian (ruRU) locale (#3290, #3288) @Alim-El
151
+ - [DataGrid] Improve Korean (koKR) locale (#3232, #3273) @zzossig
152
+ - [DataGrid] Improve Greek (elGR) locale (#3169) @clytras
153
+
154
+ ### Core
155
+
156
+ - [core] Add script to sync translation files (#3201) @m4theushw
157
+ - [core] Create dedicated `InputComponent` for `singleSelect` and `date` columns #3227 @alexfauquette
158
+ - [core] Fix `EventManager` to not run listeners removed after registration #3206 @flaviendelangle
159
+ - [core] Group Renovate updates (#3263) @flaviendelangle
160
+ - [core] Reflect the change of default branch (#3235) @oliviertassinari
161
+ - [core] Replace @mui/core with @mui/base (#3217) @m4theushw
162
+ - [core] Split docs generation script (#3189) @flaviendelangle
163
+ - [core] Update monorepo (#3303) @m4theushw
164
+ - [test] Improve testing of the keyboard navigation (#3187) @flaviendelangle
165
+ - [test] Force effect to run on location change (#3283) @m4theushw
166
+ - [core] Rework columns state management (#3264) @flaviendelangle
167
+
168
+ ### Docs
169
+
170
+ - [docs] Improve demo to allow to experiment with `autoHeight` (#3216) @alexfauquette
171
+ - [docs] Fix broken images (#3300) @oliviertassinari
172
+ - [docs] Fix the wrong release date (#3269) @DanailH
173
+ - [docs] Fix typo in CHANGELOG.md (#3214) @gjoseph
174
+ - [docs] Improve plan icon placement (#3298) @oliviertassinari
175
+ - [docs] Improve rows documentation (#3209) @flaviendelangle
176
+ - [docs] Include row pinning (#3191) @oliviertassinari
177
+ - [docs] Fix presentation of key combinations (#3297) @oliviertassinari
178
+ - [docs] Replace @mui/styles on demos (#3274) @m4theushw
179
+ - [docs] Add demos using cell/row editing with server-side persistence (#3124) @flaviendelangle
180
+ - [docs] Use relative links (#3299) @oliviertassinari
181
+
182
+ ## 5.0.1
183
+
184
+ _Nov 23, 2021_
185
+
186
+ A big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
187
+
188
+ - 🎁 New API to validate the editing values (#3006) @m4theushw
189
+
190
+ You can now use the `preProcessEditCellProps` key in `GridColDef` to synchronously or asynchronously validate the values committed.
191
+
192
+ ```ts
193
+ const columns: GridColDef[] = [
194
+ {
195
+ field: 'firstName',
196
+ preProcessEditCellProps: (params: GridEditCellPropsChangeParams) => {
197
+ const hasError = params.props.value.length < 3;
198
+ return { ...params.props, error: hasError };
199
+ },
200
+ },
201
+ {
202
+ field: 'email',
203
+ preProcessEditCellProps: async (params: GridEditCellPropsChangeParams) => {
204
+ const userWithEmail = await fetchUserByEmail(params.value);
205
+ const hasError = !!userWithEmail;
206
+ return { ...params.props, error: hasError };
207
+ }
208
+ }
209
+ ];
210
+ ```
211
+
212
+ - ✨ New method `getRootDimensions` to access the size of the grid (#3007) @flaviendelangle
213
+
214
+ It contains the size of the viewport (which is the scrollable container containing the rows and columns) considering scrollbars or not.
215
+
216
+ ```ts
217
+ const dimensions = apiRef.current.getRootDimensions();
218
+ ```
219
+
220
+ ### `@mui/x-data-grid@v5.0.1` / `@mui/x-data-grid-pro@v5.0.1`
221
+
222
+ #### Changes
223
+
224
+ - [DataGrid] New API to validate the editing values (#3006) @m4theushw
225
+ - [DataGrid] Use color-scheme to set dark mode on native components (#3146) @alexfauquette
226
+ - [DataGrid] Fix the `@mui/x-data-grid` type entrypoint (#3196) @flaviendelangle
227
+
228
+ ### Core
229
+
230
+ - [core] Drop `useGridContainerProps` (#3007) @flaviendelangle
231
+ - [core] Move `getRowIdFromRowIndex` and `getRowIndex` to the sorting API (#3126) @flaviendelangle
232
+ - [core] Polish v5 CHANGELOG (#3194) @oliviertassinari
233
+ - [core] Remove the `index.ts` of the export hooks (#3165) @flaviendelangle
234
+ - [core] Set the correct release date for v5.0.0 in the CHANGELOG.md (#3192) @flaviendelangle
235
+
236
+ ### Docs
237
+
238
+ - [docs] Move sentence about disabling multi rows selection (#3167) @alexfauquette
239
+
240
+ ## 5.0.0
241
+
242
+ _Nov 23, 2021_
243
+
244
+ 🎉 We are excited to introduce [MUI X v5.0.0](https://mui.com/blog/mui-x-v5/) 🎉!
245
+
246
+ If you want to migrate the DataGrid or DataGridPro from v4 to v5, take a look at the [migration guide](https://mui.com/components/data-grid/migration-v4/).
247
+ This version is fully compatible with `@mui/material@5.X` and can be used with `@material-ui/core@4.x` with some [additional steps](https://mui.com/components/data-grid/migration-v4/#using-mui-x-v5-with-mui-core-v4).
248
+
249
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
250
+
251
+ - ⌨️ Enhance keyboard navigation when pagination is enabled
252
+ - 👁 Better support for flex columns
253
+ - 📚 Documentation improvements
254
+ - 🐞 Bugfixes
255
+
256
+ ### `@mui/x-data-grid@v5.0.0` / `@mui/x-data-grid-pro@v5.0.0`
257
+
258
+ #### Breaking changes
259
+
260
+ - [DataGrid] The following CSS classes were renamed to follow the internal convention:
261
+
262
+ - `MuiDataGrid-columnsContainer` was renamed to `MuiDataGrid-columnHeaders`
263
+ - `MuiDataGrid-columnHeaderWrapper` was renamed to `MuiDataGrid-columnHeadersInner`
264
+ - The `scroll` class applied to `MuiDataGrid-columnHeaderWrapper` was renamed to `MuiDataGrid-columnHeadersInner--scrollable`
265
+
266
+ - [DataGrid] The `props.components.Checkbox` and `props.componentsProps.checkbox` props were renamed to `props.components.BaseCheckbox` and `props.componentsProps.baseCheckbox` respectively.
267
+
268
+ As a first step for [#3066](https://github.com/mui-org/material-ui-x/issues/3066), these slots were renamed to clearly indicate that they are meant to replace a core component.
269
+
270
+ ```diff
271
+ <DataGrid
272
+ components={{
273
+ - checkbox: MyCustomCheckbox,
274
+ + BaseCheckbox: MyCustomCheckbox,
275
+ }}
276
+ componentsProps={{
277
+ - checkbox: {},
278
+ + baseCheckbox: {},
279
+ }}
280
+ />
281
+ ```
282
+
283
+ **Note**: these changes apply to both the `DataGrid` and `DataGridPro` components.
284
+
285
+ #### Changes
286
+
287
+ - [DataGrid] Block multi-rows updates in `apiRef.current.updateRows` on the Community plan (#3095) @flaviendelangle
288
+ - [DataGrid] Fix filter not working after deleting the value (#3018) @m4theushw
289
+ - [DataGrid] Fix performance regression when selecting 100k rows (#3077) @m4theushw
290
+ - [DataGrid] Fix `apiRef.current.updateRows` to not share rows from other instances (#3127) @m4theushw
291
+ - [DataGrid] Fix flex space allocation to not cause a horizontal scroll when there is enough space (#3099) @flaviendelangle
292
+ - [DataGrid] Improve the filter panel behaviors (#3080) @flaviendelangle
293
+ - [DataGrid] Fix keyboard navigation between column headers and rows when not on the first page (#3086) @flaviendelangle
294
+ - [DataGrid] Fix keyboard navigation between rows when not on the first page (#3074) @flaviendelangle
295
+ - [DataGrid] Prevents bubbling in menu header (#3000) @alexfauquette
296
+ - [DataGrid] Remove unused rendering state and selectors (#3133) @flaviendelangle
297
+ - [DataGrid] Rename `Checkbox` component and props slots to `BaseCheckbox` (#3142) @DanailH
298
+
299
+ ### Core
300
+
301
+ - [core] Adapt changelog script to GitHub DOM modification (#3087) @alexfauquette
302
+ - [core] Automatically close issues that are incomplete and inactive (#3029) @oliviertassinari
303
+ - [core] Improve the typing of `LicenseStatus` (#3141) @Himself65
304
+ - [core] Make `useGridColumnsPreProcessing` generic (#3092) @m4theushw
305
+ - [core] Move column headers virtualization to hook (#3078) @m4theushw
306
+ - [core] Move virtualization logic to hook (#3079) @m4theushw
307
+ - [core] Rename directories to match new packages new names (#3088) @flaviendelangle
308
+ - [core] Replace `createClientRender` with new `createRenderer` API (#3125) @flaviendelangle
309
+ - [core] Store the event manager in a key of `GridApi` instead of making the whole `GridApi` extend it (#3069) @flaviendelangle
310
+ - [core] Update monorepo (#3139) @m4theushw
311
+ - [core] Use `unstable_` prefix instead of `unsafe_` for private APIs (#3090) @flaviendelangle
312
+ - [core] Use official MUI repo as monorepo (#3084) @m4theushw
313
+
314
+ ### Docs
315
+
316
+ - [docs] Fix broken example in the component slot example (#3123) @Himself65
317
+ - [docs] Fix inline previews (#3081) @DanailH
318
+ - [docs] Fix the client-side validation link clarity (#3100) @oliviertassinari
319
+ - [docs] Improve `rowCount` CSS class description (#3072) @ZeeshanTamboli
320
+ - [docs] Use core repo constants for doc internationalization (#3143) @flaviendelangle
321
+
6
322
  ## 5.0.0-beta.7
7
323
 
8
324
  _Nov 4, 2021_
@@ -243,7 +559,7 @@ A big thanks to the 5 contributors who made this release possible. Here are some
243
559
  - [DataGrid] Remove the `state` prop and use the `initialState` prop (#2848) @flaviendelangle
244
560
 
245
561
  Note that `initialState` only allows the `preferencePanel`, `filter.filterModel` and `sort.sortModel` keys.
246
- To fully control the state, use the the feature's model prop and change callback (e.g. `filterModel` and `onFilterModelChange`).
562
+ To fully control the state, use the feature's model prop and change callback (e.g. `filterModel` and `onFilterModelChange`).
247
563
 
248
564
  ```diff
249
565
  <DataGrid