@mui/x-data-grid-generator 5.17.5 → 6.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +297 -19
- package/columns/commodities.columns.js +6 -9
- package/columns/employees.columns.js +1 -1
- package/hooks/useDemoData.js +0 -1
- package/hooks/useQuery.d.ts +8 -8
- package/hooks/useQuery.js +2 -2
- package/index.js +1 -1
- package/legacy/columns/commodities.columns.js +6 -9
- package/legacy/columns/employees.columns.js +1 -1
- package/legacy/hooks/useDemoData.js +0 -1
- package/legacy/hooks/useQuery.js +2 -2
- package/legacy/index.js +1 -1
- package/legacy/renderer/renderLink.js +1 -1
- package/legacy/renderer/renderStatus.js +1 -1
- package/modern/columns/commodities.columns.js +6 -9
- package/modern/columns/employees.columns.js +1 -1
- package/modern/hooks/useDemoData.js +0 -1
- package/modern/hooks/useQuery.js +2 -2
- package/modern/index.js +1 -1
- package/modern/renderer/renderLink.js +1 -1
- package/modern/renderer/renderStatus.js +1 -1
- package/node/columns/commodities.columns.js +6 -9
- package/node/columns/employees.columns.js +1 -1
- package/node/hooks/useDemoData.js +0 -1
- package/node/hooks/useQuery.js +2 -2
- package/node/index.js +1 -1
- package/node/renderer/renderLink.js +1 -1
- package/node/renderer/renderStatus.js +1 -1
- package/package.json +4 -4
- package/renderer/renderLink.js +1 -1
- package/renderer/renderStatus.js +1 -1
- package/services/gridColDefGenerator.d.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,37 +3,315 @@
|
|
|
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
|
+
## 6.0.0-alpha.1
|
|
7
7
|
|
|
8
8
|
_Sep 29, 2022_
|
|
9
9
|
|
|
10
|
-
We'd like to offer a big thanks to the
|
|
10
|
+
We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
12
|
+
- 🚀 Better support for custom overlays (#5808) @cherniavskii
|
|
13
|
+
- 🖨️ Improve print export (#6273) @oliviertassinari
|
|
14
|
+
- 🎁 Reduce confusion when initializing pickers with a date value (#6170) @flaviendelangle
|
|
15
|
+
- 📚 Documentation improvements
|
|
15
16
|
- 🐞 Bugfixes
|
|
16
17
|
|
|
17
|
-
### `@mui/x-data-grid@
|
|
18
|
+
### `@mui/x-data-grid@v6.0.0-alpha.1` / `@mui/x-data-grid-pro@v6.0.0-alpha.1` / `@mui/x-data-grid-premium@v6.0.0-alpha.1`
|
|
19
|
+
|
|
20
|
+
#### Breaking changes
|
|
21
|
+
|
|
22
|
+
- New internal rows structure for v6 (#4927) @flaviendelangle
|
|
23
|
+
|
|
24
|
+
Some selectors related to the rows have been renamed to better describe the type of rows they are returning:
|
|
25
|
+
|
|
26
|
+
```diff
|
|
27
|
+
-const result = gridRowsIdToIdLookupSelector(apiRef);
|
|
28
|
+
+const result = gridRowsDataRowIdToIdLookupSelector(apiRef);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```diff
|
|
32
|
+
-const result = gridRowTreeDepthSelector(apiRef);
|
|
33
|
+
+const result = gridRowMaximumTreeDepthSelector(apiRef);
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The format of the tree nodes (the element accessible in `params.node` or with the `apiRef.current.getRowNode` method) have changed.
|
|
37
|
+
You have a new `type` property, which can be useful, for example, to apply custom behavior on groups.
|
|
38
|
+
Here is an example of the old and new approach showing how to apply a custom value formatter in groups for the grouping column:
|
|
39
|
+
|
|
40
|
+
```diff
|
|
41
|
+
<DataGridPremium
|
|
42
|
+
groupingColDef={() => ({
|
|
43
|
+
valueFormatter: (params) => {
|
|
44
|
+
if (params.id == null) {
|
|
45
|
+
return params.value;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const rowNode = apiRef.current.getRowNode(params.id!)!;
|
|
49
|
+
- if (rowNode.children?.length) {
|
|
50
|
+
+ if (rowNode.type === 'group') {
|
|
51
|
+
return `by ${rowNode.groupingKey ?? ''}`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return params.value;
|
|
55
|
+
}
|
|
56
|
+
})}
|
|
57
|
+
/>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- The `GridFeatureModeConstant` constant no longer exists (#6077) @DanailH
|
|
61
|
+
|
|
62
|
+
```diff
|
|
63
|
+
-import { GridFeatureModeConstant } from '@mui/x-data-grid';
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Changes
|
|
67
|
+
|
|
68
|
+
- [DataGrid] Fix `GridPagination` props typing (#6238) @cherniavskii
|
|
69
|
+
- [DataGrid] Fix `GridRow` not forwarding `ref` to the root element (#6274) @cherniavskii
|
|
70
|
+
- [DataGrid] Fix `undefined` value being showed in filter button tooltip text (#6259) @cherniavskii
|
|
71
|
+
- [DataGrid] Fix blank space when changing page with dynamic row height (#6049) @m4theushw
|
|
72
|
+
- [DataGrid] New internal rows structure for v6 (#4927) @flaviendelangle
|
|
73
|
+
- [DataGrid] Revert cell/row mode if `processRowUpdate` fails (#6185) @m4theushw
|
|
74
|
+
- [DataGrid] Rework overlays layout (#5808) @cherniavskii
|
|
75
|
+
- [DataGrid] Improve print support (#6273) @oliviertassinari
|
|
76
|
+
- [DataGridPremium] Add missing `themeAugmentation` module (#6270) @cherniavskii
|
|
77
|
+
|
|
78
|
+
### `@mui/x-date-pickers@v6.0.0-alpha.1` / `@mui/x-date-pickers-pro@v6.0.0-alpha.1`
|
|
79
|
+
|
|
80
|
+
#### Breaking changes
|
|
81
|
+
|
|
82
|
+
- [pickers] Do not support unparsed date formats anymore (#6170) @flaviendelangle
|
|
83
|
+
|
|
84
|
+
The `value` prop of the pickers now expects a parsed value.
|
|
85
|
+
Until now, it was possible to provide any format that your date management library was able to parse.
|
|
86
|
+
For instance, you could pass `value={new Date()}` when using `AdapterDayjs`.
|
|
87
|
+
|
|
88
|
+
This brought a lot of confusion so we decided to remove this behavior.
|
|
89
|
+
The format expected by the `value` prop is now the same as for any other prop holding a date.
|
|
90
|
+
Here is the syntax to initialize a date picker at the current date for each adapter:
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
// Date-fns
|
|
94
|
+
<DatePicker value={new Date()} />
|
|
95
|
+
|
|
96
|
+
// Dayjs
|
|
97
|
+
import dayjs from 'dayjs'
|
|
98
|
+
<DatePicker value={dayjs()} />
|
|
99
|
+
|
|
100
|
+
// Moment
|
|
101
|
+
import moment from 'moment'
|
|
102
|
+
<DatePicker value={moment()} />
|
|
103
|
+
|
|
104
|
+
// Luxon
|
|
105
|
+
import { DateTime } from 'luxon'
|
|
106
|
+
<DatePicker value={DateTime.now()} />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
#### Changes
|
|
110
|
+
|
|
111
|
+
- [DatePicker] Respect `minDate` and `maxDate` when opening a `DatePicker` or `DateTimePicker` (#6309) @alexfauquette
|
|
112
|
+
- [DateTimePicker] Fix validation with `shouldDisableMonth` and `shouldDisableYear` (#6266) @flaviendelangle
|
|
113
|
+
- [TimePicker] Add support for `disablePast` and `disableFuture` validation props (#6226) @LukasTy
|
|
114
|
+
- [CalendarPicker] Prevent getting focus when `autoFocus=false` (#6304) @alexfauquette
|
|
115
|
+
- [DateField] Extend moment adapter to support `expandFormat` and `formatTokenMap` (#6215) @alexfauquette
|
|
116
|
+
- [pickers] Allow to control the selected sections (#6209, #6307) @flaviendelangle
|
|
117
|
+
- [pickers] Do not loose the value of date sections not present in the format in the new field components (#6141) @flaviendelangle
|
|
118
|
+
- [pickers] Do not support unparsed date formats anymore (#6170) @flaviendelangle
|
|
119
|
+
- [pickers] Support slots on the `DateField` component (#6048) @flaviendelangle
|
|
120
|
+
- [pickers] Support Luxon v3 in `AdapterLuxon` (#6069) @alexfauquette
|
|
121
|
+
- [pickers] New components `TimeField` and `DateTimeField` (#6312) @flaviendelangle
|
|
122
|
+
- [pickers] Support basic mobile edition on new field components (#5958) @flaviendelangle
|
|
123
|
+
|
|
124
|
+
### Docs
|
|
125
|
+
|
|
126
|
+
- [docs] Fix issue in DataGrid/DataGridPro row styling demo (#6264) @MBilalShafi
|
|
127
|
+
- [docs] Improve pickers Getting Started examples (#6292) @flaviendelangle
|
|
128
|
+
- [docs] Pass model change callbacks in controlled grid editing demos (#6296) @cherniavskii
|
|
129
|
+
- [docs] Update the CodeSandbox to use the `next` branch (#6275) @oliviertassinari
|
|
130
|
+
|
|
131
|
+
### Core
|
|
132
|
+
|
|
133
|
+
- [core] Fix typing error (#6291) @flaviendelangle
|
|
134
|
+
- [core] Fix typo in the state updater of `useField` (#6311) @flaviendelangle
|
|
135
|
+
- [core] Remove `GridFeatureModeConstant` (#6077) @DanailH
|
|
136
|
+
- [core] Simplify testing architecture (#6043) @flaviendelangle
|
|
137
|
+
- [test] Skip test in Chrome non-headless and Edge (#6318) @m4theushw
|
|
138
|
+
|
|
139
|
+
## 6.0.0-alpha.0
|
|
140
|
+
|
|
141
|
+
_Sep 22, 2022_
|
|
142
|
+
|
|
143
|
+
We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
144
|
+
|
|
145
|
+
- 🌍 Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
|
|
146
|
+
- 🌍 Add Finnish (fi-FI) locale to the pickers (#6219) @PetroSilenius
|
|
147
|
+
- 🌍 Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
148
|
+
- 📚 Documentation improvements
|
|
149
|
+
- 🐞 Bugfixes
|
|
150
|
+
|
|
151
|
+
### `@mui/x-data-grid@v6.0.0-alpha.0` / `@mui/x-data-grid-pro@v6.0.0-alpha.0` / `@mui/x-data-grid-premium@v6.0.0-alpha.0`
|
|
152
|
+
|
|
153
|
+
#### Breaking changes
|
|
154
|
+
|
|
155
|
+
- The deprecated `hide` column property has been removed in favor of the `columnVisibilityModel` prop and initial state.
|
|
156
|
+
|
|
157
|
+
```diff
|
|
158
|
+
<DataGrid
|
|
159
|
+
columns={[
|
|
160
|
+
field: 'id,
|
|
161
|
+
- hide: true,
|
|
162
|
+
]}
|
|
163
|
+
+ initialState={{
|
|
164
|
+
+ columns: {
|
|
165
|
+
+ columnVisibilityModel: { id: false },
|
|
166
|
+
+ }
|
|
167
|
+
+ }}
|
|
168
|
+
/>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
You can find more information about this new API on our [documentation](https://next.mui.com/x/react-data-grid/column-visibility/).
|
|
172
|
+
|
|
173
|
+
- The `GridEvents` enum is now a TypeScript type.
|
|
174
|
+
|
|
175
|
+
```diff
|
|
176
|
+
- apiRef.current.subscribeEvent(GridEvents.rowClick', handleRowClick)
|
|
177
|
+
+ apiRef.current.subscribeEvent('rowClick', handleRowClick)
|
|
178
|
+
```
|
|
18
179
|
|
|
19
180
|
#### Changes
|
|
20
181
|
|
|
21
|
-
- [DataGrid]
|
|
22
|
-
- [DataGrid] Fix
|
|
23
|
-
- [DataGrid]
|
|
24
|
-
- [DataGrid]
|
|
25
|
-
- [DataGrid]
|
|
26
|
-
|
|
182
|
+
- [DataGrid] Do not publish `cellFocusOut` event if the row was removed (#6251) @cherniavskii
|
|
183
|
+
- [DataGrid] Fix scroll anchoring with master details (#6054) @oliviertassinari
|
|
184
|
+
- [DataGrid] Improve Polish (pl-PL) locale on the data grid (#6245) @grzegorz-bach
|
|
185
|
+
- [DataGrid] Remove the `GridEvents` enum (#6003) @flaviendelangle
|
|
186
|
+
- [DataGrid] Remove the deprecated `hide` column property (#5999) @flaviendelangle
|
|
187
|
+
|
|
188
|
+
### `@mui/x-date-pickers@v6.0.0-alpha.0` / `@mui/x-date-pickers-pro@v6.0.0-alpha.0`
|
|
189
|
+
|
|
190
|
+
#### Breaking changes
|
|
191
|
+
|
|
192
|
+
- All the deprecated props that allowed you to set the text displayed in the pickers have been removed.
|
|
193
|
+
|
|
194
|
+
You can now use the `localText` prop available on all picker components:
|
|
195
|
+
|
|
196
|
+
| Removed prop | Property in the new `localText` prop |
|
|
197
|
+
|------------------------------|-----------------------------------------------------------------------------------|
|
|
198
|
+
| `endText` | `end` |
|
|
199
|
+
| `getClockLabelText` | `clockLabelText` |
|
|
200
|
+
| `getHoursClockNumberText` | `hoursClockNumberText` |
|
|
201
|
+
| `getMinutesClockNumberText` | `minutesClockNumberText` |
|
|
202
|
+
| `getSecondsClockNumberText` | `secondsClockNumberText` |
|
|
203
|
+
| `getViewSwitchingButtonText` | `calendarViewSwitchingButtonAriaLabel` |
|
|
204
|
+
| `leftArrowButtonText` | `openPreviousView` (or `previousMonth` when the button changes the visible month) |
|
|
205
|
+
| `rightArrowButtonText` | `openNextView` (or `nextMonth` when the button changes the visible month) |
|
|
206
|
+
| `startText` | `start` |
|
|
207
|
+
|
|
208
|
+
For instance if you want to replace the `startText` / `endText`
|
|
209
|
+
|
|
210
|
+
```diff
|
|
211
|
+
<DateRangePicker
|
|
212
|
+
- startText="From"
|
|
213
|
+
- endText="To"
|
|
214
|
+
+ localeText={{
|
|
215
|
+
+ start: 'From',
|
|
216
|
+
+ end: 'To',
|
|
217
|
+
+ }}
|
|
218
|
+
/>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
You can find more information about the new api, including how to set those translations on all your components at once in the [documentation](https://next.mui.com/x/react-date-pickers/localization/)
|
|
222
|
+
|
|
223
|
+
- The component slots `LeftArrowButton` and `RightArrowButton` have been renamed `PreviousIconButton` and `NextIconButton` to better describe there usage:
|
|
224
|
+
|
|
225
|
+
```diff
|
|
226
|
+
<DatePicker
|
|
227
|
+
components={{
|
|
228
|
+
- LeftArrowButton: CustomButton,
|
|
229
|
+
+ PreviousIconButton: CustomButton,
|
|
230
|
+
|
|
231
|
+
- RightArrowButton: CustomButton,
|
|
232
|
+
+ NextIconButton: CustomButton,
|
|
233
|
+
}}
|
|
234
|
+
|
|
235
|
+
componentsProps={{
|
|
236
|
+
- leftArrowButton: {},
|
|
237
|
+
+ previousIconButton: {},
|
|
238
|
+
|
|
239
|
+
- rightArrowButton: {},
|
|
240
|
+
+ nextIconButton: {},
|
|
241
|
+
}}
|
|
242
|
+
/>
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
- The `date` prop has been renamed `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker`.
|
|
246
|
+
|
|
247
|
+
```diff
|
|
248
|
+
- <MonthPicker date={dayjs()} onChange={handleMonthChange} />
|
|
249
|
+
+ <MonthPicker value={dayjs()} onChange={handleMonthChange} />
|
|
250
|
+
|
|
251
|
+
- <YearPicker date={dayjs()} onChange={handleYearChange} />
|
|
252
|
+
+ <YearPicker value={dayjs()} onChange={handleYearChange} />
|
|
253
|
+
|
|
254
|
+
- <ClockPicker date={dayjs()} onChange={handleTimeChange} />
|
|
255
|
+
+ <ClockPicker value={dayjs()} onChange={handleTimeChange} />
|
|
256
|
+
|
|
257
|
+
- <CalendarPicker date={dayjs()} onChange={handleDateChange} />
|
|
258
|
+
+ <CalendarPicker value={dayjs()} onChange={handleDateChange} />
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Changes
|
|
262
|
+
|
|
263
|
+
- [CalendarPicker] Don't move to closest enabled date when `props.date` contains a disabled date (#6146) @flaviendelangle
|
|
264
|
+
- [DateRangePicker] Switch to new month when changing the value from the outside (#6166) @flaviendelangle
|
|
265
|
+
- [pickers] Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
|
|
266
|
+
- [pickers] Add Finnish (fi-FI) locale to the pickers (#6219) (#6230) @PetroSilenius
|
|
267
|
+
- [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
|
|
268
|
+
- [pickers] Allow nested `LocalizationProvider` (#6011) @flaviendelangle
|
|
269
|
+
- [pickers] Clean slots on `PickersArrowSwitcher` component (#5890) @flaviendelangle
|
|
270
|
+
- [pickers] Fix invalid date error when decreasing `DateField` day (#6071) @alexfauquette
|
|
271
|
+
- [pickers] Fix mobile section selection (#6207) @oliviertassinari
|
|
272
|
+
- [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle
|
|
273
|
+
- [pickers] Improve error message when no adapter context is found (#6211) @flaviendelangle
|
|
274
|
+
- [pickers] Remove `valueStr` from the field state (#6142) @flaviendelangle
|
|
275
|
+
- [pickers] Remove remaining deprecated locale props (#6233) @flaviendelangle
|
|
276
|
+
- [pickers] Rename the `date` prop `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker` (#6128) @flaviendelangle
|
|
277
|
+
- [pickers] Rename the `onClose` prop of `PickersPopper` `onDismiss` to simplify typing (#6155) @flaviendelangle
|
|
278
|
+
- [pickers] Support the `sx` prop on all public component with a root HTML elements (#5944) @flaviendelangle
|
|
279
|
+
- [pickers] Unify `PickersMonth` and `PickersYear` behaviors (#6034) @flaviendelangle
|
|
280
|
+
- [pickers] Use `shouldDisableMonth` and `shouldDisableYear` for date validation (#6066) @flaviendelangle
|
|
281
|
+
- [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette
|
|
27
282
|
|
|
28
283
|
### Docs
|
|
29
284
|
|
|
30
|
-
- [docs]
|
|
285
|
+
- [docs] Add automatic vale check (#5429) @alexfauquette
|
|
286
|
+
- [docs] Add Pro logo in "column ordering" link (#6127) @alexfauquette
|
|
287
|
+
- [docs] Fix 301 link (#6239) @oliviertassinari
|
|
288
|
+
- [docs] Fix broken link (#6163) @alexfauquette
|
|
289
|
+
- [docs] Fix broken links (#6101) @alexfauquette
|
|
290
|
+
- [docs] Fix demonstration date to avoid hydration errors (#6032) @alexfauquette
|
|
291
|
+
- [docs] Fix hidden popper in restore state example (#6191) @heyfirst
|
|
292
|
+
- [docs] Fix invalid links causing 404 & 301 errors (#6105) @oliviertassinari
|
|
293
|
+
- [docs] Fix npm repository url in the pickers `package.json` (#6172) @oliviertassinari
|
|
294
|
+
- [docs] Fix typo in linked issue (#6162) @flaviendelangle
|
|
295
|
+
- [docs] Import `generateUtilityClass` from `@mui/utils` (#6216) @michaldudak
|
|
296
|
+
- [docs] Improve Upgrade plan docs (#6018) @oliviertassinari
|
|
297
|
+
- [docs] Link the OpenSSF Best Practices card (#6171) @oliviertassinari
|
|
31
298
|
|
|
32
299
|
### Core
|
|
33
300
|
|
|
34
|
-
- [core]
|
|
301
|
+
- [core] Add `v5.17.3` changelog to next branch (#6250) @flaviendelangle
|
|
302
|
+
- [core] Add link to the security page on the `README` (#6073) @oliviertassinari
|
|
303
|
+
- [core] Fix scroll restoration in the docs (#5938) @oliviertassinari
|
|
304
|
+
- [core] Remove the Storybook (#6099) @flaviendelangle
|
|
305
|
+
- [core] Tag release as `next` in NPM (#6256) @m4theushw
|
|
306
|
+
- [core] Update monorepo (#6180) @flaviendelangle
|
|
307
|
+
- [core] Use the `next` branch for Prettier (#6097) @flaviendelangle
|
|
308
|
+
- [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
|
|
309
|
+
- [test] Fix logic to skip column pinning tests (#6133) @m4theushw
|
|
310
|
+
- [test] Hide the date on the print regression test (#6120) @flaviendelangle
|
|
311
|
+
- [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
|
|
312
|
+
- [website] Improve security header @oliviertassinari
|
|
35
313
|
|
|
36
|
-
##
|
|
314
|
+
## v5.17.4
|
|
37
315
|
|
|
38
316
|
_Sep 22, 2022_
|
|
39
317
|
|
|
@@ -165,7 +443,7 @@ We'd like to offer a big thanks to the 3 contributors who made this release poss
|
|
|
165
443
|
|
|
166
444
|
_Sep 2, 2022_
|
|
167
445
|
|
|
168
|
-
🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and
|
|
446
|
+
🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
|
|
169
447
|
|
|
170
448
|
If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
|
|
171
449
|
|
|
@@ -1470,7 +1748,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
|
|
|
1470
1748
|
- [DataGrid] Stop checkbox ripple on blur (#3835) @m4theushw
|
|
1471
1749
|
- [DataGrid] Stop calling `onRowClick` when clicking in cells with interactive elements (#3929) @m4theushw
|
|
1472
1750
|
- [DataGrid] Use only `headerName` when available to search column (#3959) @pkratz
|
|
1473
|
-
- [DataGrid] Use the bundling scripts as the packages published by the [https://github.com/mui/material-ui
|
|
1751
|
+
- [DataGrid] Use the bundling scripts as the packages published by the [material-ui](https://github.com/mui/material-ui) repository (#3965) @flaviendelangle
|
|
1474
1752
|
- [DataGridPro] Add `unstable_setRowHeight` method to `apiRef` (#3751) @cherniavskii
|
|
1475
1753
|
- [DataGridPro] Always export the `pageSize` and `page` when it has been initialized or is being controlled (#3908) @flaviendelangle
|
|
1476
1754
|
- [DataGridPro] Disable export for detail panel column (#4057) @gustavhagland
|
|
@@ -4115,7 +4393,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
|
|
|
4115
4393
|
|
|
4116
4394
|
- 💄 Release the cell editing feature (#1287) @dtassone
|
|
4117
4395
|
|
|
4118
|
-
This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing
|
|
4396
|
+
This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing/). We have spent the last three months working on it.
|
|
4119
4397
|
|
|
4120
4398
|

|
|
4121
4399
|
|
|
@@ -4725,7 +5003,7 @@ _Dec 9, 2020_
|
|
|
4725
5003
|
|
|
4726
5004
|
Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
4727
5005
|
|
|
4728
|
-
- 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/
|
|
5006
|
+
- 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/accessibility/#density) feature (#606) @DanailH.
|
|
4729
5007
|
- 💄 A first iteration on the data grid's toolbar.
|
|
4730
5008
|
- 🧪 Continue the iteration on the data grid filtering feature, soon to be released @dtassone.
|
|
4731
5009
|
|
|
@@ -86,9 +86,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
86
86
|
field: 'subTotal',
|
|
87
87
|
headerName: 'Sub Total',
|
|
88
88
|
valueGetter: ({
|
|
89
|
-
row
|
|
90
|
-
|
|
91
|
-
}) => rowNode.isAutoGenerated ? null : row.quantity * row.unitPrice,
|
|
89
|
+
row
|
|
90
|
+
}) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
|
|
92
91
|
type: 'number',
|
|
93
92
|
width: 120
|
|
94
93
|
}, {
|
|
@@ -103,9 +102,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
103
102
|
field: 'feeAmount',
|
|
104
103
|
headerName: 'Fee Amount',
|
|
105
104
|
valueGetter: ({
|
|
106
|
-
row
|
|
107
|
-
|
|
108
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
105
|
+
row
|
|
106
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
109
107
|
type: 'number',
|
|
110
108
|
width: 120
|
|
111
109
|
}, {
|
|
@@ -120,9 +118,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
120
118
|
field: 'totalPrice',
|
|
121
119
|
headerName: 'Total in USD',
|
|
122
120
|
valueGetter: ({
|
|
123
|
-
row
|
|
124
|
-
|
|
125
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
121
|
+
row
|
|
122
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
126
123
|
renderCell: renderTotalPrice,
|
|
127
124
|
type: 'number',
|
|
128
125
|
width: 160
|
|
@@ -11,7 +11,7 @@ export const getEmployeeColumns = () => [{
|
|
|
11
11
|
headerName: 'Avatar',
|
|
12
12
|
generateData: randomColor,
|
|
13
13
|
renderCell: renderAvatar,
|
|
14
|
-
valueGetter: params => params.
|
|
14
|
+
valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
|
|
15
15
|
name: params.row.name,
|
|
16
16
|
color: params.row.avatar
|
|
17
17
|
},
|
package/hooks/useDemoData.js
CHANGED
|
@@ -88,7 +88,6 @@ export const getColumnsFromOptions = options => {
|
|
|
88
88
|
export const getInitialState = (options, columns) => {
|
|
89
89
|
var _options$treeData;
|
|
90
90
|
|
|
91
|
-
// TODO v6: Stop using `GridColDef.hide`
|
|
92
91
|
const columnVisibilityModel = {};
|
|
93
92
|
columns.forEach(col => {
|
|
94
93
|
if (col.hide) {
|
package/hooks/useQuery.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
|
|
|
35
35
|
columnsWithDefaultColDef: {
|
|
36
36
|
generateData?: ((row: any, context: import("..").GridDataGeneratorContext) => any) | undefined;
|
|
37
37
|
dataGeneratorUniquenessEnabled?: boolean | undefined;
|
|
38
|
+
hide?: boolean | undefined;
|
|
38
39
|
field: string;
|
|
39
40
|
headerName?: string | undefined;
|
|
40
41
|
description?: string | undefined;
|
|
@@ -42,7 +43,6 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
|
|
|
42
43
|
flex?: number | undefined;
|
|
43
44
|
minWidth?: number | undefined;
|
|
44
45
|
maxWidth?: number | undefined;
|
|
45
|
-
hide?: boolean | undefined;
|
|
46
46
|
hideable?: boolean | undefined;
|
|
47
47
|
sortable?: boolean | undefined;
|
|
48
48
|
sortingOrder?: import("@mui/x-data-grid-pro").GridSortDirection[] | undefined;
|
|
@@ -54,13 +54,13 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
|
|
|
54
54
|
type?: string | undefined;
|
|
55
55
|
valueOptions?: import("@mui/x-data-grid-pro").ValueOptions[] | ((params: import("@mui/x-data-grid-pro").GridValueOptionsParams<any>) => import("@mui/x-data-grid-pro").ValueOptions[]) | undefined;
|
|
56
56
|
align?: import("@mui/x-data-grid-pro").GridAlignment | undefined;
|
|
57
|
-
valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any>) => any) | undefined;
|
|
57
|
+
valueGetter?: ((params: import("@mui/x-data-grid-pro").GridValueGetterParams<any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => any) | undefined;
|
|
58
58
|
valueSetter?: ((params: import("@mui/x-data-grid-pro").GridValueSetterParams<any, any>) => any) | undefined;
|
|
59
59
|
valueFormatter?: ((params: import("@mui/x-data-grid-pro").GridValueFormatterParams<any>) => any) | undefined;
|
|
60
|
-
valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any> | undefined) => any) | undefined;
|
|
60
|
+
valueParser?: ((value: any, params?: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode> | undefined) => any) | undefined;
|
|
61
61
|
cellClassName?: import("@mui/x-data-grid-pro").GridCellClassNamePropType | undefined;
|
|
62
|
-
renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any>) => React.ReactNode) | undefined;
|
|
63
|
-
renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any>) => React.ReactNode) | undefined;
|
|
62
|
+
renderCell?: ((params: import("@mui/x-data-grid-pro").GridRenderCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
63
|
+
renderEditCell?: ((params: import("@mui/x-data-grid-pro").GridRenderEditCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNodeWithRender>) => React.ReactNode) | undefined;
|
|
64
64
|
preProcessEditCellProps?: ((params: import("@mui/x-data-grid-pro").GridPreProcessEditCellProps<any, any>) => import("@mui/x-data-grid-pro").GridEditCellProps<any> | Promise<import("@mui/x-data-grid-pro").GridEditCellProps<any>>) | undefined;
|
|
65
65
|
headerClassName?: import("@mui/x-data-grid-pro").GridColumnHeaderClassNamePropType | undefined;
|
|
66
66
|
renderHeader?: ((params: import("@mui/x-data-grid-pro").GridColumnHeaderParams<any, any, any>) => React.ReactNode) | undefined;
|
|
@@ -69,10 +69,10 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
|
|
|
69
69
|
disableColumnMenu?: boolean | undefined;
|
|
70
70
|
filterable?: boolean | undefined;
|
|
71
71
|
filterOperators?: GridFilterOperator<any, any, any>[] | undefined;
|
|
72
|
-
getApplyQuickFilterFn?: ((value: any, colDef: import("@mui/x-data-grid-pro").GridStateColDef<any, any, any>, apiRef: React.MutableRefObject<import("@mui/x-data-grid/internals").GridApiCommunity>) => ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any>) => boolean) | null) | undefined;
|
|
72
|
+
getApplyQuickFilterFn?: ((value: any, colDef: import("@mui/x-data-grid-pro").GridStateColDef<any, any, any>, apiRef: React.MutableRefObject<import("@mui/x-data-grid/internals").GridApiCommunity>) => ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => boolean) | null) | undefined;
|
|
73
73
|
disableReorder?: boolean | undefined;
|
|
74
74
|
disableExport?: boolean | undefined;
|
|
75
|
-
colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any>) => number | undefined) | undefined;
|
|
75
|
+
colSpan?: number | ((params: import("@mui/x-data-grid-pro").GridCellParams<any, any, any, import("@mui/x-data-grid-pro").GridTreeNode>) => number | undefined) | undefined;
|
|
76
76
|
aggregable?: boolean | undefined;
|
|
77
77
|
availableAggregationFunctions?: string[] | undefined;
|
|
78
78
|
groupingValueGetter?: ((params: import("@mui/x-data-grid-premium").GridGroupingValueGetterParams<any, any>) => import("@mui/x-data-grid-pro").GridKeyValue | null | undefined) | undefined;
|
|
@@ -85,7 +85,7 @@ export declare const createFakeServer: (dataSetOptions?: Partial<UseDemoDataOpti
|
|
|
85
85
|
};
|
|
86
86
|
useQuery: (queryOptions: QueryOptions) => {
|
|
87
87
|
pageInfo: PageInfo;
|
|
88
|
-
|
|
88
|
+
rows: GridRowModel[];
|
|
89
89
|
isLoading: boolean;
|
|
90
90
|
};
|
|
91
91
|
};
|
package/hooks/useQuery.js
CHANGED
|
@@ -192,7 +192,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
192
192
|
const queryOptionsRef = React.useRef(queryOptions);
|
|
193
193
|
const [response, setResponse] = React.useState({
|
|
194
194
|
pageInfo: {},
|
|
195
|
-
|
|
195
|
+
rows: []
|
|
196
196
|
});
|
|
197
197
|
const [isLoading, setIsLoading] = React.useState(dataGenerationIsLoading);
|
|
198
198
|
React.useEffect(() => {
|
|
@@ -220,7 +220,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
const newRep = {
|
|
223
|
-
|
|
223
|
+
rows: returnedRows,
|
|
224
224
|
pageInfo: {
|
|
225
225
|
totalRowCount,
|
|
226
226
|
nextCursor,
|
package/index.js
CHANGED
|
@@ -92,9 +92,8 @@ export var getCommodityColumns = function getCommodityColumns() {
|
|
|
92
92
|
field: 'subTotal',
|
|
93
93
|
headerName: 'Sub Total',
|
|
94
94
|
valueGetter: function valueGetter(_ref) {
|
|
95
|
-
var row = _ref.row
|
|
96
|
-
|
|
97
|
-
return rowNode.isAutoGenerated ? null : row.quantity * row.unitPrice;
|
|
95
|
+
var row = _ref.row;
|
|
96
|
+
return row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice;
|
|
98
97
|
},
|
|
99
98
|
type: 'number',
|
|
100
99
|
width: 120
|
|
@@ -112,9 +111,8 @@ export var getCommodityColumns = function getCommodityColumns() {
|
|
|
112
111
|
field: 'feeAmount',
|
|
113
112
|
headerName: 'Fee Amount',
|
|
114
113
|
valueGetter: function valueGetter(_ref2) {
|
|
115
|
-
var row = _ref2.row
|
|
116
|
-
|
|
117
|
-
return rowNode.isAutoGenerated ? null : row.feeRate * row.quantity * row.unitPrice;
|
|
114
|
+
var row = _ref2.row;
|
|
115
|
+
return row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice;
|
|
118
116
|
},
|
|
119
117
|
type: 'number',
|
|
120
118
|
width: 120
|
|
@@ -130,9 +128,8 @@ export var getCommodityColumns = function getCommodityColumns() {
|
|
|
130
128
|
field: 'totalPrice',
|
|
131
129
|
headerName: 'Total in USD',
|
|
132
130
|
valueGetter: function valueGetter(_ref3) {
|
|
133
|
-
var row = _ref3.row
|
|
134
|
-
|
|
135
|
-
return rowNode.isAutoGenerated ? null : row.feeRate + row.quantity * row.unitPrice;
|
|
131
|
+
var row = _ref3.row;
|
|
132
|
+
return row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice;
|
|
136
133
|
},
|
|
137
134
|
renderCell: renderTotalPrice,
|
|
138
135
|
type: 'number',
|
|
@@ -13,7 +13,7 @@ export var getEmployeeColumns = function getEmployeeColumns() {
|
|
|
13
13
|
generateData: randomColor,
|
|
14
14
|
renderCell: renderAvatar,
|
|
15
15
|
valueGetter: function valueGetter(params) {
|
|
16
|
-
return params.
|
|
16
|
+
return params.row.name == null || params.row.avatar == null ? null : {
|
|
17
17
|
name: params.row.name,
|
|
18
18
|
color: params.row.avatar
|
|
19
19
|
};
|
|
@@ -129,7 +129,6 @@ export var getColumnsFromOptions = function getColumnsFromOptions(options) {
|
|
|
129
129
|
export var getInitialState = function getInitialState(options, columns) {
|
|
130
130
|
var _options$treeData;
|
|
131
131
|
|
|
132
|
-
// TODO v6: Stop using `GridColDef.hide`
|
|
133
132
|
var columnVisibilityModel = {};
|
|
134
133
|
columns.forEach(function (col) {
|
|
135
134
|
if (col.hide) {
|
package/legacy/hooks/useQuery.js
CHANGED
|
@@ -212,7 +212,7 @@ export var createFakeServer = function createFakeServer(dataSetOptions, serverOp
|
|
|
212
212
|
|
|
213
213
|
var _React$useState = React.useState({
|
|
214
214
|
pageInfo: {},
|
|
215
|
-
|
|
215
|
+
rows: []
|
|
216
216
|
}),
|
|
217
217
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
218
218
|
response = _React$useState2[0],
|
|
@@ -263,7 +263,7 @@ export var createFakeServer = function createFakeServer(dataSetOptions, serverOp
|
|
|
263
263
|
|
|
264
264
|
case 8:
|
|
265
265
|
newRep = {
|
|
266
|
-
|
|
266
|
+
rows: returnedRows,
|
|
267
267
|
pageInfo: {
|
|
268
268
|
totalRowCount: totalRowCount,
|
|
269
269
|
nextCursor: nextCursor,
|
package/legacy/index.js
CHANGED
|
@@ -86,9 +86,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
86
86
|
field: 'subTotal',
|
|
87
87
|
headerName: 'Sub Total',
|
|
88
88
|
valueGetter: ({
|
|
89
|
-
row
|
|
90
|
-
|
|
91
|
-
}) => rowNode.isAutoGenerated ? null : row.quantity * row.unitPrice,
|
|
89
|
+
row
|
|
90
|
+
}) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
|
|
92
91
|
type: 'number',
|
|
93
92
|
width: 120
|
|
94
93
|
}, {
|
|
@@ -103,9 +102,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
103
102
|
field: 'feeAmount',
|
|
104
103
|
headerName: 'Fee Amount',
|
|
105
104
|
valueGetter: ({
|
|
106
|
-
row
|
|
107
|
-
|
|
108
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
105
|
+
row
|
|
106
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
109
107
|
type: 'number',
|
|
110
108
|
width: 120
|
|
111
109
|
}, {
|
|
@@ -120,9 +118,8 @@ export const getCommodityColumns = (editable = false) => [{
|
|
|
120
118
|
field: 'totalPrice',
|
|
121
119
|
headerName: 'Total in USD',
|
|
122
120
|
valueGetter: ({
|
|
123
|
-
row
|
|
124
|
-
|
|
125
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
121
|
+
row
|
|
122
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
126
123
|
renderCell: renderTotalPrice,
|
|
127
124
|
type: 'number',
|
|
128
125
|
width: 160
|
|
@@ -11,7 +11,7 @@ export const getEmployeeColumns = () => [{
|
|
|
11
11
|
headerName: 'Avatar',
|
|
12
12
|
generateData: randomColor,
|
|
13
13
|
renderCell: renderAvatar,
|
|
14
|
-
valueGetter: params => params.
|
|
14
|
+
valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
|
|
15
15
|
name: params.row.name,
|
|
16
16
|
color: params.row.avatar
|
|
17
17
|
},
|
package/modern/hooks/useQuery.js
CHANGED
|
@@ -188,7 +188,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
188
188
|
const queryOptionsRef = React.useRef(queryOptions);
|
|
189
189
|
const [response, setResponse] = React.useState({
|
|
190
190
|
pageInfo: {},
|
|
191
|
-
|
|
191
|
+
rows: []
|
|
192
192
|
});
|
|
193
193
|
const [isLoading, setIsLoading] = React.useState(dataGenerationIsLoading);
|
|
194
194
|
React.useEffect(() => {
|
|
@@ -216,7 +216,7 @@ export const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
const newRep = {
|
|
219
|
-
|
|
219
|
+
rows: returnedRows,
|
|
220
220
|
pageInfo: {
|
|
221
221
|
totalRowCount,
|
|
222
222
|
nextCursor,
|
package/modern/index.js
CHANGED
|
@@ -97,9 +97,8 @@ const getCommodityColumns = (editable = false) => [{
|
|
|
97
97
|
field: 'subTotal',
|
|
98
98
|
headerName: 'Sub Total',
|
|
99
99
|
valueGetter: ({
|
|
100
|
-
row
|
|
101
|
-
|
|
102
|
-
}) => rowNode.isAutoGenerated ? null : row.quantity * row.unitPrice,
|
|
100
|
+
row
|
|
101
|
+
}) => row.quantity == null || row.unitPrice == null ? null : row.quantity * row.unitPrice,
|
|
103
102
|
type: 'number',
|
|
104
103
|
width: 120
|
|
105
104
|
}, {
|
|
@@ -114,9 +113,8 @@ const getCommodityColumns = (editable = false) => [{
|
|
|
114
113
|
field: 'feeAmount',
|
|
115
114
|
headerName: 'Fee Amount',
|
|
116
115
|
valueGetter: ({
|
|
117
|
-
row
|
|
118
|
-
|
|
119
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
116
|
+
row
|
|
117
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate * row.quantity * row.unitPrice,
|
|
120
118
|
type: 'number',
|
|
121
119
|
width: 120
|
|
122
120
|
}, {
|
|
@@ -131,9 +129,8 @@ const getCommodityColumns = (editable = false) => [{
|
|
|
131
129
|
field: 'totalPrice',
|
|
132
130
|
headerName: 'Total in USD',
|
|
133
131
|
valueGetter: ({
|
|
134
|
-
row
|
|
135
|
-
|
|
136
|
-
}) => rowNode.isAutoGenerated ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
132
|
+
row
|
|
133
|
+
}) => row.feeRate == null || row.quantity == null || row.unitPrice == null ? null : row.feeRate + row.quantity * row.unitPrice,
|
|
137
134
|
renderCell: _renderer.renderTotalPrice,
|
|
138
135
|
type: 'number',
|
|
139
136
|
width: 160
|
|
@@ -22,7 +22,7 @@ const getEmployeeColumns = () => [{
|
|
|
22
22
|
headerName: 'Avatar',
|
|
23
23
|
generateData: _services.randomColor,
|
|
24
24
|
renderCell: _renderer.renderAvatar,
|
|
25
|
-
valueGetter: params => params.
|
|
25
|
+
valueGetter: params => params.row.name == null || params.row.avatar == null ? null : {
|
|
26
26
|
name: params.row.name,
|
|
27
27
|
color: params.row.avatar
|
|
28
28
|
},
|
|
@@ -112,7 +112,6 @@ exports.getColumnsFromOptions = getColumnsFromOptions;
|
|
|
112
112
|
const getInitialState = (options, columns) => {
|
|
113
113
|
var _options$treeData;
|
|
114
114
|
|
|
115
|
-
// TODO v6: Stop using `GridColDef.hide`
|
|
116
115
|
const columnVisibilityModel = {};
|
|
117
116
|
columns.forEach(col => {
|
|
118
117
|
if (col.hide) {
|
package/node/hooks/useQuery.js
CHANGED
|
@@ -210,7 +210,7 @@ const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
210
210
|
const queryOptionsRef = React.useRef(queryOptions);
|
|
211
211
|
const [response, setResponse] = React.useState({
|
|
212
212
|
pageInfo: {},
|
|
213
|
-
|
|
213
|
+
rows: []
|
|
214
214
|
});
|
|
215
215
|
const [isLoading, setIsLoading] = React.useState(dataGenerationIsLoading);
|
|
216
216
|
React.useEffect(() => {
|
|
@@ -238,7 +238,7 @@ const createFakeServer = (dataSetOptions, serverOptions) => {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
const newRep = {
|
|
241
|
-
|
|
241
|
+
rows: returnedRows,
|
|
242
242
|
pageInfo: {
|
|
243
243
|
totalRowCount,
|
|
244
244
|
nextCursor,
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-generator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-alpha.1",
|
|
4
4
|
"description": "Generate fake data for demo purposes only.",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"directory": "packages/grid/x-data-grid-generator"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@babel/runtime": "^7.
|
|
23
|
-
"@mui/base": "^5.0.0-alpha.
|
|
24
|
-
"@mui/x-data-grid-premium": "
|
|
22
|
+
"@babel/runtime": "^7.19.0",
|
|
23
|
+
"@mui/base": "^5.0.0-alpha.98",
|
|
24
|
+
"@mui/x-data-grid-premium": "6.0.0-alpha.1",
|
|
25
25
|
"chance": "^1.1.8",
|
|
26
26
|
"clsx": "^1.2.1",
|
|
27
27
|
"lru-cache": "^7.14.0"
|
package/renderer/renderLink.js
CHANGED
package/renderer/renderStatus.js
CHANGED