@mui/x-data-grid 5.0.0-beta.2 → 5.0.0-beta.6

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,495 @@
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.0.0-beta.6
7
+
8
+ _Oct 29, 2021_
9
+
10
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - ✨ Allow `valueOptions` from `GridColDef` to accept a function (#2850) @alexfauquette
13
+ - 💅 Prefix undocumented `apiRef` methods with `unsafe_` (#2985) @flaviendelangle
14
+ - 👁 Unify filtering, sorting, and rows selectors names (#2942) @flaviendelangle
15
+ - 💡 Support style overrides added in the theme (#2995) @DanailH
16
+ - 📚 Documentation improvements
17
+ - 🐞 Bugfixes
18
+
19
+ ### `@mui/x-data-grid@v5.0.0-beta.6` / `@mui/x-data-grid-pro@v5.0.0-beta.6`
20
+
21
+ #### Breaking changes
22
+
23
+ - [DataGridPro] The following methods from `apiRef` were renamed. Use the provided alternatives. (#2870) @flaviendelangle
24
+
25
+ 1. `apiRef.current.applyFilters` was renamed to `apiRef.current.unsafe_applyFilters`
26
+ 2. `apiRef.current.applyFilterLinkOperator` was renamed to `apiRef.current.setFilterLinkOperator`
27
+ 3. `apiRef.current.upsertFilter` was renamed to `apiRef.current.upsertFilterItem`
28
+ 4. `apiRef.current.deleteFilter` was renamed to `apiRef.current.deleteFilterItem`
29
+
30
+ - [DataGridPro] The `apiRef.current.applyFilter` method was removed. (#2870) @flaviendelangle
31
+ You should never have to call it directly since the filters are already applied when the `filterModel` prop changes.
32
+ To manually apply the filters, use `apiRef.current.unsafe_applyFilters`.
33
+
34
+ ```diff
35
+ -apiRef.current.applyFilter
36
+ +apiRef.current.unsafe_applyFilters
37
+ ```
38
+
39
+ - [DataGridPro] Rename filtering, sorting, and rows selectors to match the naming convention (#2942) @flaviendelangle
40
+
41
+ 1. `unorderedGridRowIdsSelector` was renamed to `gridRowIdsSelector`
42
+ 2. `sortingGridStateSelector` was renamed to `gridSortingStateSelector`
43
+ 3. `sortedGridRowIdsSelector` was renamed to `gridSortedRowIdsSelector`
44
+ 4. `visibleSortedGridRowIdsSelector` was renamed to `gridVisibleSortedRowIdsSelector`
45
+ 5. `visibleGridRowCountSelector` was renamed to `gridVisibleRowCountSelector`
46
+ 6. `filterGridColumnLookupSelector` was renamed to `gridFilterActiveItemsSelector`
47
+
48
+ - [DataGridPro] The `sortedGridRowsSelector` was renamed to `gridSortedRowEntriesSelector` (#2942) @flaviendelangle
49
+
50
+ The return value was also changed as below:
51
+
52
+ ```diff
53
+ -sortedGridRowsSelector: (state: GridState) => Map<GridRowId, GridRowModel>
54
+ -const map = sortedGridRowsSelector(state);
55
+ +gridSortedRowEntriesSelector: (state: GridState) => GridRowEntry[]
56
+ +const map = new Map(gridSortedRowEntriesSelector(state).map(row => [row.id, row.model]));
57
+ ```
58
+
59
+ - [DataGridPro] The `visibleSortedGridRowsSelector` was replaced with `gridVisibleSortedRowEntriesSelector` (#2942) @flaviendelangle
60
+
61
+ The return value was also changed as below:
62
+
63
+ ```diff
64
+ -visibleSortedGridRowsSelector: (state: GridState) => Map<GridRowId, GridRowModel>;
65
+ -const map = visibleSortedGridRowsSelector(state);
66
+ +gridVisibleSortedRowEntriesSelector: (state: GridState) => GridRowEntry[]
67
+ +const map = new Map(gridVisibleSortedRowEntriesSelector(state).map(row => [row.id, row.model]));
68
+ ```
69
+
70
+ - [DataGridPro] The `visibleSortedGridRowsAsArraySelector` was replaced with `gridVisibleSortedRowEntriesSelector` (#2942) @flaviendelangle
71
+
72
+ The return value was also changed as below:
73
+
74
+ ```diff
75
+ -visibleSortedGridRowsAsArraySelector: (state: GridState) => [GridRowId, GridRowData][];
76
+ +gridVisibleSortedRowEntriesSelector: (state: GridState) => GridRowEntry[]
77
+ ```
78
+
79
+ - [DataGridPro] The `filterGridItemsCounterSelector` selector was removed. (#2942) @flaviendelangle
80
+ Use `gridFilterActiveItemsSelector` as replacement.
81
+
82
+ ```diff
83
+ -const filterCount = filterGridItemsCounterSelector(state);
84
+ +const filterCount = gridFilterActiveItemsSelector(state).length;
85
+ ```
86
+
87
+ - [DataGridPro] The `unorderedGridRowModelsSelector` selector was removed. (#2942) @flaviendelangle
88
+ Use `apiRef.current.getRowModels` or `gridRowIdsSelector` and `gridRowsLookupSelector`.
89
+
90
+ #### Changes
91
+
92
+ - [DataGrid] Allow `valueOptions` to accept a function (#2850) @alexfauquette
93
+ - [DataGrid] Add `overridesResolver` (#2995) @DanailH
94
+ - [DataGrid] Unify filtering, sorting, and rows selectors names (#2942) @flaviendelangle
95
+ - [DataGridPro] Prefix undocumented `apiRef` methods with `unsafe_` (#2985) @flaviendelangle
96
+
97
+ ### Docs
98
+
99
+ - [docs] Explain how to use MUI X v5 with MUI Core v4 (#2846) @m4theushw
100
+ - [docs] Generate docs for components (#2465) @m4theushw
101
+ - [docs] Improve `scrollEndThreshold` API docs (#3001) @ZeeshanTamboli
102
+ - [docs] Fix CodeSandbox and feature request templates (#2986) @flaviendelangle
103
+
104
+ ### Core
105
+
106
+ - [core] Add step for announcing the releases on Twitter (#2997) @DanailH
107
+ - [core] Apply all filters to a row before moving to the next one (#2870) @flaviendelangle
108
+ - [core] Change monorepo repository URL (#2983) @m4theushw
109
+ - [core] Clean Storybook examples (#2805) @flaviendelangle
110
+ - [core] Generate list of all grid exports (#2801) @flaviendelangle
111
+ - [core] Improve typing of `buildApi.ts` (#2922) @flaviendelangle
112
+ - [core] Add additional test for `checkboxSelection` toggling (#2979) @flaviendelangle
113
+ - [test] Fix flaky visual regression test (#2981) @m4theushw
114
+
115
+ ## 5.0.0-beta.5
116
+
117
+ _Oct 22, 2021_
118
+
119
+ A big thanks to the 5 contributors who made this release possible. Here are some highlights ✨:
120
+
121
+ - 💅 Remove dependency on `@mui/styles` and use the same styling solution from MUI Core (#2784) @DanailH
122
+ - ✨ Add support for generics in `GridRowParams`, `GridCellParams` and `GridRenderCellParams` (#2436) @ZeeshanTamboli
123
+ - 👁 Rework the virtualization engine (#2673) @m4theushw
124
+ - 💡 Enhance internal code structure
125
+ - 🐞 Bugfixes
126
+
127
+ ### `@mui/x-data-grid@v5.0.0-beta.5` / `@mui/x-data-grid-pro@v5.0.0-beta.5`
128
+
129
+ #### Breaking changes
130
+
131
+ - The `DataGrid` and `DataGridPro` no longer depends on `@mui/styles`. Use `styled` to provide custom styling. (#2784) @DanailH
132
+
133
+ ```diff
134
+ -import { createTheme } from '@mui/material/styles';
135
+ -import { makeStyles } from '@mui/styles';
136
+ +import { styled } from '@mui/material/styles';
137
+ ```
138
+
139
+ The following CSS classes were renamed:
140
+
141
+ - `.MuiDataGrid-gridMenuList` was renamed to `.MuiDataGrid-menuList`
142
+ - `.MuiGridToolbarContainer-root` was renamed to `.MuiDataGrid-toolbarContainer`
143
+ - `.MuiGridMenu-root` was renamed to `.MuiDataGrid-menu`
144
+ - `.MuiDataGridColumnsPanel-root` was renamed to `.MuiDataGrid-columnsPanel`
145
+ - `.MuiGridPanel-root` was renamed to `.MuiDataGrid-panel`
146
+ - `.MuiGridPanelContent-root` was renamed to `.MuiDataGrid-panelContent`
147
+ - `.MuiGridPanelFooter-root` was renamed to `.MuiDataGrid-panelFooter`
148
+ - `.MuiDataGridPanelHeader-root` was renamed to `.MuiDataGrid-panelHeader`
149
+ - `.MuiGridPanelWrapper-root` was renamed to `.MuiDataGrid-panelWrapper`
150
+ - `.MuiGridFilterForm-root` was renamed to `.MuiDataGrid-filterForm`
151
+ - `.MuiGridToolbarFilterButton-root` was renamed to `.MuiDataGrid-toolbarFilterList`
152
+
153
+ - [DataGrid] The CSS classes `.MuiDataGrid-window` and `.MuiDataGrid-windowContainer` were removed (#2673) @m4theushw
154
+
155
+ The following CSS classes were renamed:
156
+
157
+ - `.MuiDataGrid-viewport` was renamed to `.MuiDataGrid-virtualScroller`
158
+ - `.MuiDataGrid-dataContainer` was renamed to `.MuiDataGrid-virtualScrollerContent`
159
+ - `.MuiDataGrid-renderingZone` was renamed to `.MuiDataGrid-virtualScrollerRenderZone`
160
+
161
+ - [DataGrid] Remove the `useGridSlotComponentProps` hook and replace it as below: (#2856) @flaviendelangle
162
+
163
+ ```diff
164
+ -const { apiRef, state, rootElement } = useGridSlotComponentProps();
165
+ +const apiRef = useGridApiContext();
166
+ +const [state] = useGridState(apiRef);
167
+ +const rootElement = apiRef.current.rootElementRef;
168
+ ```
169
+
170
+ - [DataGrid] Remove the `state` prop and use the `initialState` prop (#2848) @flaviendelangle
171
+
172
+ Note that `initialState` only allows the `preferencePanel`, `filter.filterModel` and `sort.sortModel` keys.
173
+ To fully control the state, use the the feature's model prop and change callback (e.g. `filterModel` and `onFilterModelChange`).
174
+
175
+ ```diff
176
+ <DataGrid
177
+ - state={{
178
+ + initialState={{
179
+ preferencePanel: {
180
+ open: true,
181
+ openedPanelValue: GridPreferencePanelsValue.filters,
182
+ },
183
+ }}
184
+ />
185
+ ```
186
+
187
+ - [DataGridPro] Remove the `onViewportRowsChange` prop and the `viewportRowsChange` event (#2673) @m4theushw
188
+
189
+ A listener on the `rowsScroll` event, as shown below, can be used to replace the prop:
190
+
191
+ ```tsx
192
+ const apiRef = useGridApiRef();
193
+ const prevRenderContext = React.useRef(null);
194
+
195
+ React.useEffect(() => {
196
+ return apiRef.current.subscribeEvent("rowsScroll", ({ renderContext }) => {
197
+ if (
198
+ !prevRenderContext.current ||
199
+ renderContext.firstRowIdx !== prevRenderContext.current.firstRowIndex ||
200
+ renderContext.lastRowIdx !== prevRenderContext.current.lastRowIndex
201
+ ) {
202
+ prevRenderContext.current = renderContext;
203
+ const params = {
204
+ firstRowIndex: renderContext.firstRowIndex,
205
+ lastRowIndex: renderContext.lastRowIndex
206
+ };
207
+ }
208
+ });
209
+ }, [apiRef]);
210
+
211
+ <DataGridPro apiRef={apiRef} />
212
+ ```
213
+
214
+ #### Changes
215
+
216
+ - [DataGrid] Add `valueSetter` (#2876) @m4theushw
217
+ - [DataGrid] Add support for generic types in `GridRowParams`, `GridCellParams`, `GridRenderCellParams` (#2436) @ZeeshanTamboli
218
+ - [DataGrid] Fix `actions` column type to not select the row when clicking on an item (#2862) @m4theushw
219
+ - [DataGrid] Fix column headers misalignment when the render context changes (#2937) @m4theushw
220
+ - [DataGrid] Rework virtualization (#2673) @m4theushw
221
+ - [DataGrid] Remove `@mui/styles` dependency (#2784) @DanailH
222
+ - [DataGrid] Remove `useGridSlotComponentProps` (#2856) @flaviendelangle
223
+ - [DataGrid] Replace `prop.state` with `prop.initialState` (#2848) @flaviendelangle
224
+ - [DataGrid] Use true content height to dispatch `rowsScrollEnd` (#2938) @m4theushw
225
+ - [DataGrid] Fix the typing of `GridToolbarFilterButton` (#2841) @alexfauquette
226
+
227
+ ### Docs
228
+
229
+ - [docs] Improve the README for releases (#2908) @flaviendelangle
230
+ - [docs] Re-add Pro icon (#2928) @m4theushw
231
+ - [docs] Fix to not commit changes when clicking outside the cell (#2906) @ZeeshanTamboli
232
+ - [docs] Update link to Quick Filter issue (#2909) @m4theushw
233
+
234
+ ### Core
235
+
236
+ - [core] Small fixes on the Components page (#2877) @flaviendelangle
237
+ - [core] Make each feature hook responsible for its column pre-processing (#2839) @flaviendelangle
238
+ - [core] Add `useGridRowGroupsPreProcessing` internal hook (#2840) @flaviendelangle
239
+ - [core] Register events async if not registered (#2916) @m4theushw
240
+ - [core] Remove `material-ui-utils.ts` (#2872) @DanailH
241
+ - [core] Remove outdated hooks requirements (#2939) @flaviendelangle
242
+ - [core] Remove test event (#2912) @m4theushw
243
+ - [core] Remove unused `GridSlotComponentProps` interface (#2911) @flaviendelangle
244
+ - [core] Rename 'UNSTABLE_' prefix to 'unstable_' (#2931) @flaviendelangle
245
+ - [core] Replace usage of `GridRowData` with `GridRowModel` (#2936) @flaviendelangle
246
+ - [core] Revert hardcoded typings (#2907) @DanailH
247
+ - [core] Simplify the CSV export (#2941) @flaviendelangle
248
+ - [core] Update monorepo version (#2927) @m4theushw
249
+ - [test] Take screenshot of the print export (#2881) @m4theushw
250
+
251
+ ## 5.0.0-beta.4
252
+
253
+ _Oct 14, 2021_
254
+
255
+ A big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
256
+
257
+ - 🎁 Add the ability to print the grid (#2519) @DanailH
258
+
259
+ This new feature adds a button to the toolbar to generate a printer-friendly layout. Check the [documentation](https://mui.com/components/data-grid/export/#print) about it.
260
+
261
+ - 💡 Enhance internal code structure
262
+ - ✨ New slots for `row` and `cell` (#2753) @m4theushw
263
+ - 📚 Documentation improvements
264
+ - 🐞 Bugfixes
265
+
266
+ ### `@mui/x-data-grid@v5.0.0-beta.4` / `@mui/x-data-grid-pro@v5.0.0-beta.4`
267
+
268
+ #### Breaking changes
269
+
270
+ - [DataGrid] Remove unused event listeners and redundant DOM attributes on `GridCell` and `GridRow` (#2810) @m4theushw
271
+
272
+ The following props were removed. If you depend on them, use `componentsProps.row` and `componentsProps.cell` to pass custom props to the row or cell.
273
+
274
+ - `onCellBlur`
275
+ - `onCellOver`
276
+ - `onCellOut`
277
+ - `onCellEnter`
278
+ - `onCellLeave`
279
+ - `onRowOver`
280
+ - `onRowOut`
281
+ - `onRowEnter`
282
+ - `onRowLeave`
283
+
284
+ For more information, check [this page](https://mui.com/components/data-grid/components/#row). Example:
285
+
286
+ ```diff
287
+ -<DataGrid onRowOver={handleRowOver} />;
288
+ +<DataGrid
289
+ + componentsProps={{
290
+ + row: { onMouseOver: handleRowOver },
291
+ + }}
292
+ +/>;
293
+ ```
294
+
295
+ The `data-rowindex` and `data-rowselected` attributes were removed from the cell element. Equivalent attributes can be found in the row element.
296
+
297
+ The `data-editable` attribute was removed from the cell element. Use the `.MuiDataGrid-cell--editable` CSS class.
298
+
299
+ The `data-mode` attribute was removed from the cell element. Use the `.MuiDataGrid-cell--editing` CSS class.
300
+
301
+ - [DataGrid] The `state.filter` and `state.visibleRows` were merged into a single `state.filter` sub-state (#2782) @flaviendelangle
302
+
303
+ To still access this information, use `state.filter` or the selectors as below:
304
+
305
+ ```diff
306
+ -const filterModel = state.filter
307
+ -const filterModel = gridFilterStateSelector(state)
308
+ +const filterModel = state.filter.filterModel
309
+ +const filterModel = gridFilterModelSelector(state) // preferred method
310
+
311
+ -const visibleRowsLookup = state.visibleRows.visibleRowsLookup
312
+ -const visibleRowsLookup = visibleGridRowsStateSelector(state).visibleRowsLookup
313
+ +const visibleRowsLookup = state.filter.visibleRowsLookup
314
+ +const visibleRowsLookup = gridVisibleRowsLookupSelector(state).visibleRowsLookup // preferred method
315
+
316
+ -const visibleRows = state.visibleRows.visibleRows
317
+ +const visibleRows = state.filter.visibleRows
318
+ +const visibleRows = gridVisibleRowsLookupSelector(state).visibleRows // preferred method
319
+ ```
320
+
321
+ - [DataGrid] The CSS classes constants are not exported anymore. Use `gridClasses` instead. (#2788) @flaviendelangle
322
+
323
+ ```diff
324
+ -const columnHeaderClass = GRID_COLUMN_HEADER_CSS_CLASS
325
+ +const columnHeaderClass = gridClasses.columnHeader
326
+
327
+ -const rowClass = GRID_ROW_CSS_CLASS
328
+ +const rowClass = gridClasses.row
329
+
330
+ -const cellClass = GRID_CELL_CSS_CLASS
331
+ +const cellClass = gridClasses.cell
332
+
333
+ -const columnSeparatorClass = GRID_COLUMN_HEADER_SEPARATOR_RESIZABLE_CSS_CLASS
334
+ +const columnSeparatorClass = gridClasses['columnSeparator--resizable']
335
+
336
+ -const columnHeaderTitleClass = GRID_COLUMN_HEADER_TITLE_CSS_CLASS
337
+ +const columnHeaderTitleClass = gridClasses.columnHeaderTitle
338
+
339
+ -const columnHeaderDropZoneClass = GRID_COLUMN_HEADER_DROP_ZONE_CSS_CLASS
340
+ +const columnHeaderDropZoneClass = gridClasses.columnHeaderDropZone
341
+
342
+ -const columnHeaderDraggingClass = GRID_COLUMN_HEADER_DRAGGING_CSS_CLASS
343
+ +const columnHeaderDraggingClass = gridClasses["columnHeader--dragging"]
344
+ ```
345
+
346
+ - [DataGrid] Rename `gridCheckboxSelectionColDef` to `GRID_CHECKBOX_SELECTION_COL_DEF` (#2793) @flaviendelangle
347
+
348
+ ```diff
349
+ - gridCheckboxSelectionColDef
350
+ + GRID_CHECKBOX_SELECTION_COL_DEF
351
+ ```
352
+
353
+ - [DataGrid] The constants referring to the column types were removed (#2791) @flaviendelangle
354
+ Replace them as below:
355
+
356
+ ```diff
357
+ -const isColumnString = column.type === GRID_STRING_COLUMN_TYPE;
358
+ +const isColumnString = col.type === 'string';
359
+
360
+ -const isColumnNumber = col.type === GRID_NUMBER_COLUMN_TYPE;
361
+ +const isColumnNumber = col.type === 'number';
362
+
363
+ -const isColumnDate = col.type === GRID_DATE_COLUMN_TYPE;
364
+ +const isColumnDate = col.type === 'date';
365
+
366
+ -const isColumnDateTime = col.type === GRID_DATETIME_COLUMN_TYPE;
367
+ +const isColumnDateTime = col.type === 'dateTime';
368
+
369
+ -const isColumnBoolean = col.type === GRID_BOOLEAN_COLUMN_TYPE;
370
+ +const isColumnBoolean = col.type === 'boolean';
371
+ ```
372
+
373
+ - [DataGrid] The state initializers were removed (#2782) @flaviendelangle
374
+
375
+ Use `getDefaultGridFilterModel` instead of `getInitialGridFilterState`:
376
+
377
+ ```diff
378
+ -const [filterModel, setFilterModel] = React.useState(getInitialGridFilterState);
379
+ +const [filterModel, setFilterModel] = React.useState(getDefaultGridFilterModel);
380
+ ```
381
+
382
+ For the other methods, you can hardcode the value you want to apply:
383
+
384
+ ```diff
385
+ -const [sortModel, setSortModel] = React.useState(() => getInitialGridSortingState().sortModel);
386
+ +const [sortModel, setSortModel] React.useState([]);
387
+
388
+ -getInitialGridColumnReorderState
389
+ -getInitialGridColumnResizeState
390
+ -getInitialGridColumnsState
391
+ -getInitialGridRenderingState
392
+ -getInitialGridRowState
393
+ -getInitialGridState
394
+ -getInitialVisibleGridRowsState
395
+ -getInitialGridState
396
+ ```
397
+
398
+ #### Changes
399
+
400
+ - [DataGrid] Add `row` and `cell` component slots (#2753) @m4theushw
401
+ - [DataGrid] Rename `gridCheckboxSelectionColDef` to `GRID_CHECKBOX_SELECTION_COL_DEF` (#2793) @flaviendelangle
402
+ - [DataGrid] Clean hook folder structure and stop exporting internal hooks (#2789) @flaviendelangle
403
+ - [DataGrid] Add support for Print export (#2519) @DanailH
404
+ - [DataGrid] Remove internal localization and column type constant exports (#2791) @flaviendelangle
405
+ - [DataGrid] Remove `GridRowCells` component (#2811) @m4theushw
406
+ - [DataGrid] Remove class constants exports (#2788) @flaviendelangle
407
+ - [DataGrid] Remove unused event listeners on `GridCell` and `GridRow` (#2810) @m4theushw
408
+ - [DataGrid] Fix the header selection checkbox to work with `prop.checkboxSelectionVisibleOnly` (#2781) @flaviendelangle
409
+
410
+ ### Docs
411
+
412
+ - [docs] Add link to installation page (#2778) @MostafaKMilly
413
+ - [docs] Add redirect from docs home page to `DataGrid` home page (#2737) @flaviendelangle
414
+ - [docs] Fix JSX closing tag in `getActions` example (#2847) @dstarner
415
+ - [docs] Fix pagination in Ant Design demo (#2787) @ZeeshanTamboli
416
+ - [docs] Update the `page` prop docs (#2812) @m4theushw
417
+
418
+ ### Core
419
+
420
+ - [core] Update hooks to initialize their state synchronously (#2782) @flaviendelangle
421
+ - [core] Fix rollup external warnings (#2736) @eps1lon
422
+
423
+ ## 5.0.0-beta.3
424
+
425
+ _Oct 7, 2021_
426
+
427
+ A big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
428
+
429
+ - 🌎 Add Persian (faIR) locale (#2712) @devlifeX
430
+ - 🎁 Allow to select range of rows with Shift + click (#2456) @flaviendelangle
431
+ - 🚀 Allow to throttle the row updates with the `throttleRowsMs` prop on `DataGridPro` and remove the default 100ms row update delay (#2561) @flaviendelangle
432
+ - 💡 Enhance internal code structure
433
+ - 📚 Documentation improvements
434
+ - 🐞 Bugfixes
435
+
436
+ ### `@mui/x-data-grid@v5.0.0-beta.3` / `@mui/x-data-grid-pro@v5.0.0-beta.3`
437
+
438
+ #### Breaking changes
439
+
440
+ - [DataGrid] Rename some selectors and interfaces to follow the codebase naming conventions (#2723) @flaviendelangle
441
+
442
+ The following selectors were renamed:
443
+
444
+ ```diff
445
+ -const filterModel = filterGridStateSelector(state);
446
+ +const filterModel = gridFilterModelSelector(state);
447
+ ```
448
+
449
+ ```diff
450
+ -const density: GridGridDensity = densitySelector(state);
451
+ +const density: GridDensityState = gridDensitySelector(state);
452
+ ```
453
+
454
+ ```diff
455
+ -const rendering: InternalRenderingState = gridRenderingSelector(state);
456
+ +const rendering: GridRenderingState = gridRenderingSelector(state);
457
+ ```
458
+
459
+ #### Changes
460
+
461
+ - [DataGrid] Add Persian (faIR) locale (#2712) @devlifeX
462
+ - [DataGrid] Allow to select range of rows using Shift + click (#2456) @flaviendelangle
463
+ - [DataGrid] Fix numeric column filter to not run when value is empty (#2780) @m4theushw
464
+ - [DataGrid] Export `singleSelect` operators (#2666) @jeremyalan
465
+ - [DataGrid] Fix Italian localization (#2717) @destegabry
466
+ - [DataGrid] Fix `undefined` in filter panel (#2715) @DanailH
467
+ - [DataGrid] Fix the fade-out transition of the `GridMenu` (#2734) @flaviendelangle
468
+ - [DataGrid] Pass row `id` to `valueFormatter` (#2738) @m4theushw
469
+ - [DataGrid] Fix `onSortModelChange` to not be called during initialization (#2724) @flaviendelangle
470
+ - [DataGridPro] Stop drag event propagation (#2802) @DanailH
471
+ - [DataGridPro] Fix keyboard navigation to work with filtered rows (#2800) @flaviendelangle
472
+
473
+ ### Docs
474
+
475
+ - [docs] Add missing fonts (#2745) @m4theushw
476
+ - [docs] Add page for scrolling API (#2634) @m4theushw
477
+ - [docs] Add type to `onChange` event argument (#2669) @jayariglesias
478
+ - [docs] Add explanation about the `id` usage in multiple filters in DataGridPro (#2783) @ZeeshanTamboli
479
+ - [docs] Fix demo throwing error (#2719) @m4theushw
480
+ - [docs] Fix index and improve playground page (#2755) @oliviertassinari
481
+
482
+ ### Core
483
+
484
+ - [core] Add benchmark script (#2683) @m4theushw
485
+ - [core] Clean error messages prefix (#2676) @flaviendelangle
486
+ - [core] Do not regenerate columns of `useDemoData` on each render (#2747) @flaviendelangle
487
+ - [core] Don't run benchmark on cached files (#2786) @m4theushw
488
+ - [core] Drop localization v4 format (#2792) @flaviendelangle
489
+ - [core] Remove useless state update in `useGridColumnMenu` (#2722) @flaviendelangle
490
+ - [core] Remove v4 conditional code (#2575) @flaviendelangle
491
+ - [core] Rework `useGridRows` high frequency update (#2561) @flaviendelangle
492
+ - [core] Set up `eps1lon/actions-label-merge-conflict` action (#2751) @m4theushw
493
+ - [core] Stop using selectors for Pro features on React components (#2716) @flaviendelangle
494
+
6
495
  ## 5.0.0-beta.2
7
496
 
8
497
  _Sep 24, 2021_
@@ -212,14 +701,14 @@ _Aug 27, 2021_
212
701
 
213
702
  🎉 This is the first stable release of the data grid component 🎉!
214
703
 
215
- We have been iterating on the component for [18 months](https://github.com/mui-org/material-ui-x/commit/705cb0f387b5f3aa056bf40c4183a2342b317447). With the introduction of the [row edit](https://material-ui.com/components/data-grid/editing/#row-editing) feature, many bug fixes, and polishing of the documentation, we believe the component is ready for a stable release.
704
+ We have been iterating on the component for [18 months](https://github.com/mui-org/material-ui-x/commit/705cb0f387b5f3aa056bf40c4183a2342b317447). With the introduction of the [row edit](https://mui.com/components/data-grid/editing/#row-editing) feature, many bug fixes, and polishing of the documentation, we believe the component is ready for a stable release.
216
705
 
217
706
  The MUI X v4.0.0 release supports [MUI Core](https://github.com/mui-org/material-ui) v4 and has partial support for v5-beta. With the soon-to-be-released v5 version of the core components, we are moving ongoing work to the v5 release line (Core and X).
218
707
  The support for existing projects on MUI v4 won't be a priority going forward. We encourage you to migrate to MUI Core v5-beta and soon MUI X v5-beta. We don't patch, fix, or alter older versions. Using MUI Core v4 with MUI X v5 might lead to extra bundle size and configuration.
219
708
 
220
709
  A big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
221
710
 
222
- - 🚀 Introduce the [row editing](https://material-ui.com/components/data-grid/editing/#row-editing) feature (#2098) @m4theushw
711
+ - 🚀 Introduce the [row editing](https://mui.com/components/data-grid/editing/#row-editing) feature (#2098) @m4theushw
223
712
 
224
713
  <img src="https://user-images.githubusercontent.com/3165635/130665023-3c0730ab-502e-4da1-8bc1-d572427ad2d6.gif" width="851" height="382" />
225
714
 
@@ -388,7 +877,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h
388
877
  ```
389
878
 
390
879
  - [XGrid] The `setEditCellProps` API call is not available anymore.
391
- Use the [controlled editing](https://material-ui.com/components/data-grid/editing/#controlled-editing) or `setEditRowsModel`.
880
+ Use the [controlled editing](https://mui.com/components/data-grid/editing/#controlled-editing) or `setEditRowsModel`.
392
881
 
393
882
  ```diff
394
883
  -apiRef.current.setEditCellProps({ id, field, props: { ...props, error: true } });
@@ -473,7 +962,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
473
962
 
474
963
  - [DataGrid] Improve controllable pagination (#2099) @flaviendelangle
475
964
 
476
- - The `pageSize` is now a controlled prop. If you set a value, you also need to handle updates with onPageSizeChange. See [the documentation](https://material-ui.com/components/data-grid/pagination/#page-size).
965
+ - The `pageSize` is now a controlled prop. If you set a value, you also need to handle updates with onPageSizeChange. See [the documentation](https://mui.com/components/data-grid/pagination/#page-size).
477
966
  - Change the controllable API signature:
478
967
 
479
968
  ```diff
@@ -719,7 +1208,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h
719
1208
  - 🐛 We have fixed the `Select all` checkbox. When triggered, it should only select the filtered rows (#1879) @ZeeshanTamboli
720
1209
  - ⚡️ We have added a new `singleSelect` column type (#1956) @DanailH
721
1210
 
722
- Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://material-ui.com/components/data-grid/columns/#column-types).
1211
+ Using the column `type: 'singleSelect'` defaults to `Select` component when the cell is in `edit` mode. You can find the documentation [following this link](https://mui.com/components/data-grid/columns/#column-types).
723
1212
 
724
1213
  ```jsx
725
1214
  <DataGrid
@@ -917,7 +1406,7 @@ Big thanks to the 6 contributors who made this release possible. Here are some h
917
1406
  - 💅 Allow to customize GridToolbarExport's CSV export (#1695) @michallukowski
918
1407
  - 🐛 Allow to deselect rows with <kbd>CTRL</kbd> + click (#1813) @ZeeshanTamboli
919
1408
  - ⚡️ Refactor scroll size detector (#1703) @dtassone
920
- - 📖 Add [documentation](https://material-ui.com/api/data-grid/) for interfaces and events (#1529) @m4theushw
1409
+ - 📖 Add [documentation](https://mui.com/api/data-grid/) for interfaces and events (#1529) @m4theushw
921
1410
  - 🐞 Bugfixes
922
1411
 
923
1412
  ### @material-ui/x-grid@v4.0.0-alpha.31 / @material-ui/data-grid@v4.0.0-alpha.31
@@ -1089,7 +1578,7 @@ Big thanks to the 11 contributors who made this release possible. Here are some
1089
1578
  - 💅 Add `columnHeader`, `row` and `cell` to the `classes` prop (#1660) @DanailH
1090
1579
  - ✅ Add the `isRowSelectable` prop to disable selection on certain rows (#1659) @m4theushw
1091
1580
 
1092
- See the documentation for [more details](https://material-ui.com/components/data-grid/selection/#disable-selection-on-certain-rows).
1581
+ See the documentation for [more details](https://mui.com/components/data-grid/selection/#disable-selection-on-certain-rows).
1093
1582
 
1094
1583
  - ⚡️ Add new icon slot to be displayed when the column is unsorted (#1415) @m4theushw
1095
1584
  - ⚙ Improve consistency of the API to prepare for the first beta release
@@ -1337,7 +1826,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
1337
1826
 
1338
1827
  - 💄 Release the cell editing feature (#1287) @dtassone
1339
1828
 
1340
- This is the first release of the Cell editing feature. You can find the documentation [following this link](https://material-ui.com/components/data-grid/editing/#cell-editing). We have spent the last three months working on it.
1829
+ This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/components/data-grid/editing/#cell-editing). We have spent the last three months working on it.
1341
1830
 
1342
1831
  ![cell edit](https://user-images.githubusercontent.com/3165635/115632215-87994700-a307-11eb-91d9-9f5537df0911.gif)
1343
1832
 
@@ -1464,7 +1953,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
1464
1953
  - [DataGrid] Rename `useGridBaseComponentProps` hook to `useGridSlotComponentProps` (#1252) @DanailH
1465
1954
  - [DataGrid] Rename modules (#1292) @DanailH
1466
1955
  - [DataGrid] Rename all events related to column reordering, e.g. `GRID_COL_REORDER_START` -> `GRID_COLUMN_REORDER_START` (#1299) @m4theushw
1467
- - [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://material-ui.com/components/data-grid/columns/#column-reorder) (#1299) @m4theushw
1956
+ - [DataGrid] Methods `onColItemDragStart`, `onColHeaderDragOver`, `onColItemDragOver`, `onColItemDragEnter` removed from the grid API. Prefer listening to [column reordering events](https://mui.com/components/data-grid/columns/#column-reorder) (#1299) @m4theushw
1468
1957
  - [DataGrid] Calling `apiRef.current.getColumnHeaderParams` returns a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
1469
1958
  - [DataGrid] Events that follow the pattern `GRID_COLUMN_HEADER_xxx` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
1470
1959
  - [DataGrid] The `renderHeader` will be called with a `GridColumnHeaderParams` instead of `GridColParams` (#1299) @m4theushw
@@ -1490,7 +1979,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
1490
1979
  - 🎁 Add `onRowsScrollEnd` to support infinite loading (#1199) @DanailH
1491
1980
  This is an XGrid feature. Provides the ability to tap into the `onRowsScrollEnd` which is called when the scroll reaches the bottom of the grid viewport allowing developers to load additional data. It can be used with a combination of `scrollBottomThreshold` to control the area in which the `onRowsScrollEnd` is called.
1492
1981
 
1493
- See the documentation for [more details](https://material-ui.com/components/data-grid/rows/#infinite-loading).
1982
+ See the documentation for [more details](https://mui.com/components/data-grid/rows/#infinite-loading).
1494
1983
 
1495
1984
  - 🕹 Provide the ability to sort by multiple columns using Shift+click (#1203) @dtassone
1496
1985
  - 🇵🇱 Added plPL locale (#1117) @LarsKumbier
@@ -1562,7 +2051,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
1562
2051
  - 🎁 Add support for CSV export (#1030) @DanailH.
1563
2052
  This is the first iteration of the feature. You can either render the `GridToolbarExport` component in the toolbar or use the apiRef `exportDataAsCsv`/`getDataAsCsv` methods.
1564
2053
 
1565
- See the documentation for [more details](https://material-ui.com/components/data-grid/export/#csv-export).
2054
+ See the documentation for [more details](https://mui.com/components/data-grid/export/#csv-export).
1566
2055
 
1567
2056
  - 🌏 Improve the support for custom locales (#1096, #1079, #1109, #1077)
1568
2057
  - ♿️ Fix a couple of accessibility issues with the popups (#1105, #1102)
@@ -1613,9 +2102,9 @@ _Feb 17, 2021_
1613
2102
  Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
1614
2103
 
1615
2104
  - 📍 Add support for default locales (#983) @DanailH
1616
- We have built the infrastructure to support around 100 [default locales](https://material-ui.com/components/data-grid/localization/#supported-locales). If you have localized the data grid in your application. Please do consider contributing new translations back to Material-UI by opening a pull request.
2105
+ We have built the infrastructure to support around 100 [default locales](https://mui.com/components/data-grid/localization/#supported-locales). If you have localized the data grid in your application. Please do consider contributing new translations back to Material-UI by opening a pull request.
1617
2106
  - 🎁 Add new `selectionModel` prop (#986) @dtassone
1618
- The prop can be used to control the selected rows in the data grid. [See the docs](https://material-ui.com/components/data-grid/selection/#controlled-selection).
2107
+ The prop can be used to control the selected rows in the data grid. [See the docs](https://mui.com/components/data-grid/selection/#controlled-selection).
1619
2108
  - 💅 Add support for default props from theme (#1019) @DanailH
1620
2109
  - 🙌 Fix scrollbar size on windows (#1061) @dtassone
1621
2110
  - 🐛 Polish existing features, fix 9 issues.
@@ -1832,7 +2321,7 @@ Big thanks to the 5 contributors who made this release possible. Here are some h
1832
2321
  Big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
1833
2322
 
1834
2323
  - 🎛 Add support for Column selector (#837) @DanailH @dtassone.
1835
- The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://material-ui.com/components/data-grid/columns/#column-selector).
2324
+ The feature can be triggered from the toolbar or the column menu. Check [the documentation](https://mui.com/components/data-grid/columns/#column-selector).
1836
2325
 
1837
2326
  ![column selector](https://user-images.githubusercontent.com/3165635/104791267-6ff77300-579a-11eb-9338-11a8fde83258.gif)
1838
2327
 
@@ -1887,11 +2376,11 @@ Big thanks to the 5 contributors who made this release possible. Here are some h
1887
2376
  - 🌎 Add support for internationalization (#718) @DanailH
1888
2377
 
1889
2378
  You can use the `localeText` prop to provide custom wordings in the data grid.
1890
- Check the documentation for [a demo](https://material-ui.com/components/data-grid/localization/#translation-keys).
2379
+ Check the documentation for [a demo](https://mui.com/components/data-grid/localization/#translation-keys).
1891
2380
 
1892
2381
  - 📚 Start documenting the filtering feature 🧪 (#754) @dtassone
1893
2382
 
1894
- The work in progress filtering feature and documentation can be found following [this link](https://material-ui.com/components/data-grid/filtering/). Early feedback are welcome.
2383
+ The work in progress filtering feature and documentation can be found following [this link](https://mui.com/components/data-grid/filtering/). Early feedback are welcome.
1895
2384
 
1896
2385
  ### @material-ui/x-grid@v4.0.0-alpha.14 / @material-ui/data-grid@v4.0.0-alpha.14
1897
2386
 
@@ -1947,7 +2436,7 @@ Big thanks to the 4 contributors who made this release possible. Here are some h
1947
2436
 
1948
2437
  Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
1949
2438
 
1950
- - 🔍 Add a new data grid [density selector](https://material-ui.com/components/data-grid/rendering/#density) feature (#606) @DanailH.
2439
+ - 🔍 Add a new data grid [density selector](https://mui.com/components/data-grid/rendering/#density) feature (#606) @DanailH.
1951
2440
  - 💄 A first iteration on the data grid's toolbar.
1952
2441
  - 🧪 Continue the iteration on the data grid filtering feature, soon to be released @dtassone.
1953
2442
 
@@ -2171,7 +2660,7 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
2171
2660
 
2172
2661
  This is the first public alpha release of the component after 6 months of development since the initial commit (March 15th 2020).
2173
2662
  `@material-ui/data-grid` is licensed under MIT while `@material-ui/x-grid` is licensed under a commercial license.
2174
- You can find the documentation at this address: https://material-ui.com/components/data-grid/.
2663
+ You can find the documentation at this address: https://mui.com/components/data-grid/.
2175
2664
 
2176
2665
  ### @material-ui/x-grid@v4.0.0-alpha.1 / @material-ui/data-grid@v4.0.0-alpha.1
2177
2666
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Material-UI SAS
3
+ Copyright (c) 2021 Material-UI SAS
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # @mui/x-data-grid
2
2
 
3
3
  This package is the community edition of the data grid component.
4
- It's part of Material-UI X, an open core extension of Material-UI, with advanced components.
4
+ It's part of MUI X, an open core extension of MUI, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
@@ -20,11 +20,10 @@ This component has three peer dependencies that you will need to install as well
20
20
  ```json
21
21
  "peerDependencies": {
22
22
  "@mui/material": "^5.0.0",
23
- "@mui/styles": "^5.0.0",
24
23
  "react": "^17.0.0"
25
24
  },
26
25
  ```
27
26
 
28
27
  ## Documentation
29
28
 
30
- [The documentation](https://material-ui.com/components/data-grid/)
29
+ [The documentation](https://mui.com/components/data-grid/)