@mui/x-data-grid 6.18.1 → 7.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 +558 -1
- package/DataGrid/DataGrid.js +0 -10
- package/DataGrid/useDataGridProps.js +9 -14
- package/colDef/gridActionsColDef.js +1 -2
- package/colDef/gridBooleanColDef.js +0 -1
- package/colDef/gridBooleanOperators.js +3 -4
- package/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/colDef/gridDateOperators.js +10 -11
- package/colDef/gridNumericColDef.js +1 -3
- package/colDef/gridNumericOperators.d.ts +2 -2
- package/colDef/gridNumericOperators.js +13 -14
- package/colDef/gridSingleSelectOperators.js +5 -6
- package/colDef/gridStringColDef.js +1 -3
- package/colDef/gridStringOperators.d.ts +2 -2
- package/colDef/gridStringOperators.js +11 -12
- package/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/constants/defaultGridSlotsComponents.js +17 -17
- package/hooks/features/export/useGridPrintExport.js +7 -10
- package/hooks/features/filter/gridFilterUtils.js +14 -68
- package/hooks/features/rows/useGridRows.js +4 -1
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +0 -1
- package/internals/utils/computeSlots.d.ts +4 -6
- package/internals/utils/computeSlots.js +2 -8
- package/internals/utils/index.d.ts +0 -1
- package/internals/utils/index.js +0 -1
- package/internals/utils/useProps.d.ts +1 -8
- package/internals/utils/useProps.js +5 -8
- package/joy/icons.d.ts +1 -2
- package/joy/joySlots.d.ts +1 -2
- package/legacy/DataGrid/DataGrid.js +0 -10
- package/legacy/DataGrid/useDataGridProps.js +10 -18
- package/legacy/colDef/gridActionsColDef.js +1 -2
- package/legacy/colDef/gridBooleanColDef.js +0 -1
- package/legacy/colDef/gridBooleanOperators.js +3 -4
- package/legacy/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/legacy/colDef/gridDateOperators.js +10 -11
- package/legacy/colDef/gridNumericColDef.js +1 -3
- package/legacy/colDef/gridNumericOperators.js +13 -14
- package/legacy/colDef/gridSingleSelectOperators.js +5 -6
- package/legacy/colDef/gridStringColDef.js +1 -3
- package/legacy/colDef/gridStringOperators.js +11 -12
- package/legacy/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/legacy/constants/defaultGridSlotsComponents.js +17 -17
- package/legacy/hooks/features/export/useGridPrintExport.js +7 -10
- package/legacy/hooks/features/filter/gridFilterUtils.js +14 -68
- package/legacy/hooks/features/rows/useGridRows.js +2 -1
- package/legacy/index.js +1 -1
- package/legacy/internals/index.js +0 -1
- package/legacy/internals/utils/computeSlots.js +2 -8
- package/legacy/internals/utils/index.js +0 -1
- package/legacy/internals/utils/useProps.js +5 -6
- package/legacy/locales/csCZ.js +2 -2
- package/legacy/material/index.js +48 -48
- package/locales/csCZ.js +2 -2
- package/material/index.js +48 -48
- package/models/colDef/gridColDef.d.ts +4 -14
- package/models/colDef/index.d.ts +1 -1
- package/models/gridFilterOperator.d.ts +4 -16
- package/models/gridIconSlotsComponent.d.ts +35 -36
- package/models/gridSlotsComponent.d.ts +31 -34
- package/models/index.d.ts +1 -1
- package/models/props/DataGridProps.d.ts +3 -14
- package/modern/DataGrid/DataGrid.js +0 -10
- package/modern/DataGrid/useDataGridProps.js +7 -9
- package/modern/colDef/gridActionsColDef.js +1 -2
- package/modern/colDef/gridBooleanColDef.js +0 -1
- package/modern/colDef/gridBooleanOperators.js +3 -4
- package/modern/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/modern/colDef/gridDateOperators.js +10 -11
- package/modern/colDef/gridNumericColDef.js +1 -3
- package/modern/colDef/gridNumericOperators.js +13 -14
- package/modern/colDef/gridSingleSelectOperators.js +5 -6
- package/modern/colDef/gridStringColDef.js +1 -3
- package/modern/colDef/gridStringOperators.js +11 -12
- package/modern/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/modern/constants/defaultGridSlotsComponents.js +17 -17
- package/modern/hooks/features/export/useGridPrintExport.js +6 -10
- package/modern/hooks/features/filter/gridFilterUtils.js +14 -67
- package/modern/hooks/features/rows/useGridRows.js +1 -1
- package/modern/index.js +1 -1
- package/modern/internals/index.js +0 -1
- package/modern/internals/utils/computeSlots.js +2 -8
- package/modern/internals/utils/index.js +0 -1
- package/modern/internals/utils/useProps.js +5 -8
- package/modern/locales/csCZ.js +2 -2
- package/modern/material/index.js +48 -48
- package/node/DataGrid/DataGrid.js +0 -10
- package/node/DataGrid/useDataGridProps.js +6 -8
- package/node/colDef/gridActionsColDef.js +1 -2
- package/node/colDef/gridBooleanColDef.js +0 -1
- package/node/colDef/gridBooleanOperators.js +3 -4
- package/node/colDef/gridCheckboxSelectionColDef.js +0 -1
- package/node/colDef/gridDateOperators.js +10 -11
- package/node/colDef/gridNumericColDef.js +1 -3
- package/node/colDef/gridNumericOperators.js +14 -14
- package/node/colDef/gridSingleSelectOperators.js +5 -6
- package/node/colDef/gridStringColDef.js +1 -3
- package/node/colDef/gridStringOperators.js +12 -12
- package/node/components/toolbar/GridToolbarFilterButton.js +3 -1
- package/node/constants/defaultGridSlotsComponents.js +17 -17
- package/node/hooks/features/export/useGridPrintExport.js +5 -9
- package/node/hooks/features/filter/gridFilterUtils.js +14 -67
- package/node/hooks/features/rows/useGridRows.js +1 -1
- package/node/index.js +1 -1
- package/node/internals/index.js +1 -13
- package/node/internals/utils/computeSlots.js +2 -7
- package/node/internals/utils/index.js +0 -11
- package/node/internals/utils/useProps.js +4 -8
- package/node/locales/csCZ.js +2 -2
- package/node/material/index.js +48 -48
- package/package.json +1 -1
- package/colDef/utils.d.ts +0 -21
- package/colDef/utils.js +0 -51
- package/internals/utils/slotsMigration.d.ts +0 -4
- package/internals/utils/slotsMigration.js +0 -13
- package/legacy/colDef/utils.js +0 -51
- package/legacy/internals/utils/slotsMigration.js +0 -14
- package/modern/colDef/utils.js +0 -51
- package/modern/internals/utils/slotsMigration.js +0 -13
- package/node/colDef/utils.js +0 -63
- package/node/internals/utils/slotsMigration.js +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,562 @@
|
|
|
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
|
+
## 7.0.0-alpha.1
|
|
7
|
+
|
|
8
|
+
_Nov 17, 2023_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 3 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
- 📚 Documentation improvements
|
|
14
|
+
|
|
15
|
+
### Date Pickers
|
|
16
|
+
|
|
17
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.1` / `@mui/x-date-pickers-pro@7.0.0-alpha.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
18
|
+
|
|
19
|
+
#### Breaking changes
|
|
20
|
+
|
|
21
|
+
- The string argument of the `dayOfWeekFormatter` prop has been replaced in favor of the date object to allow more flexibility.
|
|
22
|
+
|
|
23
|
+
```diff
|
|
24
|
+
<DateCalendar
|
|
25
|
+
// If you were still using the day string, you can get it back with your date library.
|
|
26
|
+
- dayOfWeekFormatter={dayStr => `${dayStr}.`}
|
|
27
|
+
+ dayOfWeekFormatter={day => `${day.format('dd')}.`}
|
|
28
|
+
|
|
29
|
+
// If you were already using the day object, just remove the first argument.
|
|
30
|
+
- dayOfWeekFormatter={(_dayStr, day) => `${day.format('dd')}.`}
|
|
31
|
+
+ dayOfWeekFormatter={day => `${day.format('dd')}.`}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- The imports related to the `calendarHeader` slot have been moved from `@mui/x-date-pickers/DateCalendar` to `@mui/x-date-pickers/PIckersCalendarHeader`:
|
|
36
|
+
|
|
37
|
+
```diff
|
|
38
|
+
export {
|
|
39
|
+
pickersCalendarHeaderClasses,
|
|
40
|
+
PickersCalendarHeaderClassKey,
|
|
41
|
+
PickersCalendarHeaderClasses,
|
|
42
|
+
PickersCalendarHeader,
|
|
43
|
+
PickersCalendarHeaderProps,
|
|
44
|
+
PickersCalendarHeaderSlotsComponent,
|
|
45
|
+
PickersCalendarHeaderSlotsComponentsProps,
|
|
46
|
+
ExportedPickersCalendarHeaderProps,
|
|
47
|
+
- } from '@mui/x-date-pickers/DateCalendar';
|
|
48
|
+
+ } from '@mui/x-date-pickers/PickersCalendarHeader';
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- The `monthAndYear` format has been removed.
|
|
53
|
+
It was used in the header of the calendar views, you can replace it with the new `format` prop of the `calendarHeader` slot:
|
|
54
|
+
|
|
55
|
+
```diff
|
|
56
|
+
<LocalizationProvider
|
|
57
|
+
adapter={AdapterDayJS}
|
|
58
|
+
- formats={{ monthAndYear: 'MM/YYYY' }}
|
|
59
|
+
/>
|
|
60
|
+
<DatePicker
|
|
61
|
+
+ slotProps={{ calendarHeader: { format: 'MM/YYYY' }}}
|
|
62
|
+
/>
|
|
63
|
+
<DateRangePicker
|
|
64
|
+
+ slotProps={{ calendarHeader: { format: 'MM/YYYY' }}}
|
|
65
|
+
/>
|
|
66
|
+
<LocalizationProvider />
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- The `adapter.getDiff` method have been removed, you can directly use your date library:
|
|
70
|
+
|
|
71
|
+
```diff
|
|
72
|
+
// For Day.js
|
|
73
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
74
|
+
+ const diff = value.diff(comparing, unit);
|
|
75
|
+
|
|
76
|
+
// For Luxon
|
|
77
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
78
|
+
+ const getDiff = (value: DateTime, comparing: DateTime | string, unit?: AdapterUnits) => {
|
|
79
|
+
+ const parsedComparing = typeof comparing === 'string'
|
|
80
|
+
+ ? DateTime.fromJSDate(new Date(comparing))
|
|
81
|
+
+ : comparing;
|
|
82
|
+
+ if (unit) {
|
|
83
|
+
+ return Math.floor(value.diff(comparing).as(unit));
|
|
84
|
+
+ }
|
|
85
|
+
+ return value.diff(comparing).as('millisecond');
|
|
86
|
+
+ };
|
|
87
|
+
+
|
|
88
|
+
+ const diff = getDiff(value, comparing, unit);
|
|
89
|
+
|
|
90
|
+
// For DateFns
|
|
91
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
92
|
+
+ const getDiff = (value: Date, comparing: Date | string, unit?: AdapterUnits) => {
|
|
93
|
+
+ const parsedComparing = typeof comparing === 'string' ? new Date(comparing) : comparing;
|
|
94
|
+
+ switch (unit) {
|
|
95
|
+
+ case 'years':
|
|
96
|
+
+ return dateFns.differenceInYears(value, parsedComparing);
|
|
97
|
+
+ case 'quarters':
|
|
98
|
+
+ return dateFns.differenceInQuarters(value, parsedComparing);
|
|
99
|
+
+ case 'months':
|
|
100
|
+
+ return dateFns.differenceInMonths(value, parsedComparing);
|
|
101
|
+
+ case 'weeks':
|
|
102
|
+
+ return dateFns.differenceInWeeks(value, parsedComparing);
|
|
103
|
+
+ case 'days':
|
|
104
|
+
+ return dateFns.differenceInDays(value, parsedComparing);
|
|
105
|
+
+ case 'hours':
|
|
106
|
+
+ return dateFns.differenceInHours(value, parsedComparing);
|
|
107
|
+
+ case 'minutes':
|
|
108
|
+
+ return dateFns.differenceInMinutes(value, parsedComparing);
|
|
109
|
+
+ case 'seconds':
|
|
110
|
+
+ return dateFns.differenceInSeconds(value, parsedComparing);
|
|
111
|
+
+ default: {
|
|
112
|
+
+ return dateFns.differenceInMilliseconds(value, parsedComparing);
|
|
113
|
+
+ }
|
|
114
|
+
+ }
|
|
115
|
+
+ };
|
|
116
|
+
+
|
|
117
|
+
+ const diff = getDiff(value, comparing, unit);
|
|
118
|
+
|
|
119
|
+
// For Moment
|
|
120
|
+
- const diff = adapter.getDiff(value, comparing, unit);
|
|
121
|
+
+ const diff = value.diff(comparing, unit);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
- The `adapter.getFormatHelperText` method have been removed, you can use the `adapter.expandFormat` instead:
|
|
125
|
+
|
|
126
|
+
```diff
|
|
127
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
128
|
+
+ const expandedFormat = adapter.expandFormat(format);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
And if you need the exact same output you can apply the following transformation:
|
|
132
|
+
|
|
133
|
+
```diff
|
|
134
|
+
// For Day.js
|
|
135
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
136
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
137
|
+
|
|
138
|
+
// For Luxon
|
|
139
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
140
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/(a)/g, '(a|p)m').toLocaleLowerCase();
|
|
141
|
+
|
|
142
|
+
// For DateFns
|
|
143
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
144
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/(aaa|aa|a)/g, '(a|p)m').toLocaleLowerCase();
|
|
145
|
+
|
|
146
|
+
// For Moment
|
|
147
|
+
- const expandedFormat = adapter.getFormatHelperText(format);
|
|
148
|
+
+ const expandedFormat = adapter.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- The `adapter.getMeridiemText` method have been removed, you can use the `adapter.setHours`, `adapter.date` and `adapter.format` methods to recreate its behavior:
|
|
152
|
+
|
|
153
|
+
```diff
|
|
154
|
+
- const meridiem = adapter.getMeridiemText('am');
|
|
155
|
+
+ const getMeridiemText = (meridiem: 'am' | 'pm') => {
|
|
156
|
+
+ const date = adapter.setHours(adapter.date()!, meridiem === 'am' ? 2 : 14);
|
|
157
|
+
+ return utils.format(date, 'meridiem');
|
|
158
|
+
+ };
|
|
159
|
+
+
|
|
160
|
+
+ const meridiem = getMeridiemText('am');
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
- The `adapter.getMonthArray` method have been removed, you can use the `adapter.startOfYear` and `adapter.addMonths` methods to recreate its behavior:
|
|
164
|
+
|
|
165
|
+
```diff
|
|
166
|
+
- const monthArray = adapter.getMonthArray(value);
|
|
167
|
+
+ const getMonthArray = (year) => {
|
|
168
|
+
+ const firstMonth = utils.startOfYear(year);
|
|
169
|
+
+ const months = [firstMonth];
|
|
170
|
+
+
|
|
171
|
+
+ while (months.length < 12) {
|
|
172
|
+
+ const prevMonth = months[months.length - 1];
|
|
173
|
+
+ months.push(utils.addMonths(prevMonth, 1));
|
|
174
|
+
+ }
|
|
175
|
+
+
|
|
176
|
+
+ return months;
|
|
177
|
+
+ }
|
|
178
|
+
+
|
|
179
|
+
+ const monthArray = getMonthArray(value);
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
- The `adapter.getNextMonth` method have been removed, you can use the `adapter.addMonths` method instead:
|
|
183
|
+
|
|
184
|
+
```diff
|
|
185
|
+
- const nextMonth = adapter.getNextMonth(value);
|
|
186
|
+
+ const nextMonth = adapter.addMonths(value, 1);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
- The `adapter.getPreviousMonth` method have been removed, you can use the `adapter.addMonths` method instead:
|
|
190
|
+
|
|
191
|
+
```diff
|
|
192
|
+
- const previousMonth = adapter.getPreviousMonth(value);
|
|
193
|
+
+ const previousMonth = adapter.addMonths(value, -1);
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
- The `adapter.getWeekdays` method have been removed, you can use the `adapter.startOfWeek` and `adapter.addDays` methods instead:
|
|
197
|
+
|
|
198
|
+
```diff
|
|
199
|
+
- const weekDays = adapter.getWeekdays(value);
|
|
200
|
+
+ const getWeekdays = (value) => {
|
|
201
|
+
+ const start = adapter.startOfWeek(value);
|
|
202
|
+
+ return [0, 1, 2, 3, 4, 5, 6].map((diff) => utils.addDays(start, diff));
|
|
203
|
+
+ };
|
|
204
|
+
+
|
|
205
|
+
+ const weekDays = getWeekdays(value);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
- The `isNull` method have been removed, you can replace it with a very basic check:
|
|
209
|
+
|
|
210
|
+
```diff
|
|
211
|
+
- const isNull = adapter.isNull(value);
|
|
212
|
+
+ const isNull = value === null;
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
- The `adapter.mergeDateAndTime` method have been removed, you can use the `adapter.setHours`, `adapter.setMinutes`, and `adapter.setSeconds` methods to recreate its behavior:
|
|
216
|
+
|
|
217
|
+
```diff
|
|
218
|
+
- const result = adapter.mergeDateAndTime(valueWithDate, valueWithTime);
|
|
219
|
+
+ const mergeDateAndTime = <TDate>(
|
|
220
|
+
+ dateParam,
|
|
221
|
+
+ timeParam,
|
|
222
|
+
+ ) => {
|
|
223
|
+
+ let mergedDate = dateParam;
|
|
224
|
+
+ mergedDate = utils.setHours(mergedDate, utils.getHours(timeParam));
|
|
225
|
+
+ mergedDate = utils.setMinutes(mergedDate, utils.getMinutes(timeParam));
|
|
226
|
+
+ mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam));
|
|
227
|
+
+
|
|
228
|
+
+ return mergedDate;
|
|
229
|
+
+ };
|
|
230
|
+
+
|
|
231
|
+
+ const result = mergeDateAndTime(valueWithDate, valueWithTime);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
- The `adapter.parseISO` method have been removed, you can directly use your date library:
|
|
235
|
+
|
|
236
|
+
```diff
|
|
237
|
+
// For Day.js
|
|
238
|
+
- const value = adapter.parseISO(isoString);
|
|
239
|
+
+ const value = dayjs(isoString);
|
|
240
|
+
|
|
241
|
+
// For Luxon
|
|
242
|
+
- const value = adapter.parseISO(isoString);
|
|
243
|
+
+ const value = DateTime.fromISO(isoString);
|
|
244
|
+
|
|
245
|
+
// For DateFns
|
|
246
|
+
- const value = adapter.parseISO(isoString);
|
|
247
|
+
+ const value = dateFns.parseISO(isoString);
|
|
248
|
+
|
|
249
|
+
// For Moment
|
|
250
|
+
- const value = adapter.parseISO(isoString);
|
|
251
|
+
+ const value = moment(isoString, true);
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
- The `adapter.toISO` method have been removed, you can directly use your date library:
|
|
255
|
+
|
|
256
|
+
```diff
|
|
257
|
+
- const isoString = adapter.toISO(value);
|
|
258
|
+
+ const isoString = value.toISOString();
|
|
259
|
+
+ const isoString = value.toUTC().toISO({ format: 'extended' });
|
|
260
|
+
+ const isoString = dateFns.formatISO(value, { format: 'extended' });
|
|
261
|
+
+ const isoString = value.toISOString();
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
- The `adapter.isEqual` method used to accept any type of value for its two input and tried to parse them before checking if they were equal.
|
|
265
|
+
The method has been simplified and now only accepts an already-parsed date or `null` (ie: the same formats used by the `value` prop in the pickers)
|
|
266
|
+
|
|
267
|
+
```diff
|
|
268
|
+
const adapterDayjs = new AdapterDayjs();
|
|
269
|
+
const adapterLuxon = new AdapterLuxon();
|
|
270
|
+
const adapterDateFns = new AdapterDateFns();
|
|
271
|
+
const adapterMoment = new AdatperMoment();
|
|
272
|
+
|
|
273
|
+
// Supported formats
|
|
274
|
+
const isEqual = adapterDayjs.isEqual(null, null); // Same for the other adapters
|
|
275
|
+
const isEqual = adapterLuxon.isEqual(DateTime.now(), DateTime.fromISO('2022-04-17'));
|
|
276
|
+
const isEqual = adapterMoment.isEqual(moment(), moment('2022-04-17'));
|
|
277
|
+
const isEqual = adapterDateFns.isEqual(new Date(), new Date('2022-04-17'));
|
|
278
|
+
|
|
279
|
+
// Non-supported formats (JS Date)
|
|
280
|
+
- const isEqual = adapterDayjs.isEqual(new Date(), new Date('2022-04-17'));
|
|
281
|
+
+ const isEqual = adapterDayjs.isEqual(dayjs(), dayjs('2022-04-17'));
|
|
282
|
+
|
|
283
|
+
- const isEqual = adapterLuxon.isEqual(new Date(), new Date('2022-04-17'));
|
|
284
|
+
+ const isEqual = adapterLuxon.isEqual(DateTime.now(), DateTime.fromISO('2022-04-17'));
|
|
285
|
+
|
|
286
|
+
- const isEqual = adapterMoment.isEqual(new Date(), new Date('2022-04-17'));
|
|
287
|
+
+ const isEqual = adapterMoment.isEqual(moment(), moment('2022-04-17'));
|
|
288
|
+
|
|
289
|
+
// Non-supported formats (string)
|
|
290
|
+
- const isEqual = adapterDayjs.isEqual('2022-04-16', '2022-04-17');
|
|
291
|
+
+ const isEqual = adapterDayjs.isEqual(dayjs('2022-04-17'), dayjs('2022-04-17'));
|
|
292
|
+
|
|
293
|
+
- const isEqual = adapterLuxon.isEqual('2022-04-16', '2022-04-17');
|
|
294
|
+
+ const isEqual = adapterLuxon.isEqual(DateTime.fromISO('2022-04-17'), DateTime.fromISO('2022-04-17'));
|
|
295
|
+
|
|
296
|
+
- const isEqual = adapterMoment.isEqual('2022-04-16', '2022-04-17');
|
|
297
|
+
+ const isEqual = adapterMoment.isEqual(moment('2022-04-17'), moment('2022-04-17'));
|
|
298
|
+
|
|
299
|
+
- const isEqual = adapterDateFns.isEqual('2022-04-16', '2022-04-17');
|
|
300
|
+
+ const isEqual = adapterDateFns.isEqual(new Date('2022-04-17'), new Date('2022-04-17'));
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
- The `dateLibInstance` prop of `LocalizationProvider` does not work with `AdapterDayjs` anymore (#11023). This prop was used to set the pickers in UTC mode before the implementation of a proper timezone support in the components.
|
|
304
|
+
You can learn more about the new approach on the [dedicated doc page](https://mui.com/x/react-date-pickers/timezone/).
|
|
305
|
+
|
|
306
|
+
```diff
|
|
307
|
+
// When a `value` or a `defaultValue` is provided
|
|
308
|
+
<LocalizationProvider
|
|
309
|
+
adapter={AdapterDayjs}
|
|
310
|
+
- dateLibInstance={dayjs.utc}
|
|
311
|
+
>
|
|
312
|
+
<DatePicker value={dayjs.utc('2022-04-17')} />
|
|
313
|
+
</LocalizationProvider>
|
|
314
|
+
|
|
315
|
+
// When no `value` or `defaultValue` is provided
|
|
316
|
+
<LocalizationProvider
|
|
317
|
+
adapter={AdapterDayjs}
|
|
318
|
+
- dateLibInstance={dayjs.utc}
|
|
319
|
+
>
|
|
320
|
+
- <DatePicker />
|
|
321
|
+
+ <DatePicker timezone="UTC" />
|
|
322
|
+
</LocalizationProvider>
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
- The property `hasLeadingZeros` has been removed from the sections in favor of the more precise `hasLeadingZerosInFormat` and `hasLeadingZerosInInput` properties (#10994). To keep the same behavior, you can replace it by `hasLeadingZerosInFormat`:
|
|
326
|
+
|
|
327
|
+
```diff
|
|
328
|
+
const fieldRef = React.useRef<FieldRef<FieldSection>>(null);
|
|
329
|
+
|
|
330
|
+
React.useEffect(() => {
|
|
331
|
+
const firstSection = fieldRef.current!.getSections()[0]
|
|
332
|
+
- console.log(firstSection.hasLeadingZeros)
|
|
333
|
+
+ console.log(firstSection.hasLeadingZerosInFormat)
|
|
334
|
+
}, [])
|
|
335
|
+
|
|
336
|
+
return (
|
|
337
|
+
<DateField unstableFieldRef={fieldRef} />
|
|
338
|
+
);
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
- The `adapter.getYearRange` method used to accept two params and now accepts a tuple to be consistent with the `adapter.isWithinRange` method (#10978):
|
|
342
|
+
|
|
343
|
+
```diff
|
|
344
|
+
- adapter.getYearRange(start, end);
|
|
345
|
+
+ adapter.getYearRange([start, end])
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
- The `adapter.isValid` method used to accept any type of value and tried to parse them before checking their validity (#10971).
|
|
349
|
+
The method has been simplified and now only accepts an already-parsed date or `null`.
|
|
350
|
+
Which is the same type as the one accepted by the components `value` prop.
|
|
351
|
+
|
|
352
|
+
```diff
|
|
353
|
+
const adapterDayjs = new AdapterDayjs();
|
|
354
|
+
const adapterLuxon = new AdapterLuxon();
|
|
355
|
+
const adapterDateFns = new AdapterDateFns();
|
|
356
|
+
const adapterMoment = new AdatperMoment();
|
|
357
|
+
|
|
358
|
+
// Supported formats
|
|
359
|
+
const isValid = adapterDayjs.isValid(null); // Same for the other adapters
|
|
360
|
+
const isValid = adapterLuxon.isValid(DateTime.now());
|
|
361
|
+
const isValid = adapterMoment.isValid(moment());
|
|
362
|
+
const isValid = adapterDateFns.isValid(new Date());
|
|
363
|
+
|
|
364
|
+
// Non-supported formats (JS Date)
|
|
365
|
+
- const isValid = adapterDayjs.isValid(new Date('2022-04-17'));
|
|
366
|
+
+ const isValid = adapterDayjs.isValid(dayjs('2022-04-17'));
|
|
367
|
+
|
|
368
|
+
- const isValid = adapterLuxon.isValid(new Date('2022-04-17'));
|
|
369
|
+
+ const isValid = adapterLuxon.isValid(DateTime.fromISO('2022-04-17'));
|
|
370
|
+
|
|
371
|
+
- const isValid = adapterMoment.isValid(new Date('2022-04-17'));
|
|
372
|
+
+ const isValid = adapterMoment.isValid(moment('2022-04-17'));
|
|
373
|
+
|
|
374
|
+
// Non-supported formats (string)
|
|
375
|
+
- const isValid = adapterDayjs.isValid('2022-04-17');
|
|
376
|
+
+ const isValid = adapterDayjs.isValid(dayjs('2022-04-17'));
|
|
377
|
+
|
|
378
|
+
- const isValid = adapterLuxon.isValid('2022-04-17');
|
|
379
|
+
+ const isValid = adapterLuxon.isValid(DateTime.fromISO('2022-04-17'));
|
|
380
|
+
|
|
381
|
+
- const isValid = adapterMoment.isValid('2022-04-17');
|
|
382
|
+
+ const isValid = adapterMoment.isValid(moment('2022-04-17'));
|
|
383
|
+
|
|
384
|
+
- const isValid = adapterDateFns.isValid('2022-04-17');
|
|
385
|
+
+ const isValid = adapterDateFns.isValid(new Date('2022-04-17'));
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Changes
|
|
389
|
+
|
|
390
|
+
- [pickers] Change the input format of `adapter.getYearRange` to be consistent with `adapter.isWithinRange` (#10978) @flaviendelangle
|
|
391
|
+
- [pickers] Clean remaining `components` / `componentsProps` typings (#11040) @flaviendelangle
|
|
392
|
+
- [pickers] Modify `adapter.isEqual` method to accept `TDate | null` instead of `any` (#10976) @flaviendelangle
|
|
393
|
+
- [pickers] Modify `adapter.isValid` method to accept `TDate | null` instead of `any` (#10971) @flaviendelangle
|
|
394
|
+
- [pickers] Remove the `hasLeadingZeros` property from `FieldSection` (#10994) @flaviendelangle
|
|
395
|
+
- [pickers] Remove the deprecated methods and formats from the adapters (#10776) @flaviendelangle
|
|
396
|
+
- [pickers] Remove the legacy UTC implementation for `dayjs` (#11023) @flaviendelangle
|
|
397
|
+
- [pickers] Remove unused code (#11048) @flaviendelangle
|
|
398
|
+
- [pickers] Move the exports of the `calendarHeader` slot to `@mui/x-date-pickers/PickersCalendarHeader` (#11020) @flaviendelangle
|
|
399
|
+
- [DateCalendar] Allow to override the format of the header with a prop (#10990) @flaviendelangle
|
|
400
|
+
- [DateCalendar] Remove the string argument of the `dayOfWeekFormatter` prop (#10992) @flaviendelangle
|
|
401
|
+
|
|
402
|
+
### Docs
|
|
403
|
+
|
|
404
|
+
- [docs] Fix incorrect component name in the "Custom slots and subcomponents" page (#11024) @flaviendelangle
|
|
405
|
+
- [docs] Fix typos in pickers migration guide (#11057) @flaviendelangle
|
|
406
|
+
|
|
407
|
+
### Core
|
|
408
|
+
|
|
409
|
+
- [core] Clean the component slots doc generation (#11021) @flaviendelangle
|
|
410
|
+
- [core] Fix script to release with `next` tag (#10996) @LukasTy
|
|
411
|
+
- [test] Wait for images to load (#11004) @cherniavskii
|
|
412
|
+
|
|
413
|
+
## 7.0.0-alpha.0
|
|
414
|
+
|
|
415
|
+
_Nov 10, 2023_
|
|
416
|
+
|
|
417
|
+
We're thrilled to announce the first alpha release of our next major version, v7.
|
|
418
|
+
This release introduces a few breaking changes, paving the way for the upcoming features like Pivoting and DateTimeRangePicker.
|
|
419
|
+
|
|
420
|
+
A special shoutout to thank the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
421
|
+
|
|
422
|
+
- 🚀 First v7 alpha release
|
|
423
|
+
- ✨ Fix aggregation label not showing when `renderHeader` is used (#10961) @cherniavskii
|
|
424
|
+
- 📘 Server side data source [early documentation](https://mui.com/x/react-data-grid/server-side-data/)
|
|
425
|
+
- 💫 New recipes added for the data grid
|
|
426
|
+
- 📈 `<ChartsReferenceLine />` component is now available
|
|
427
|
+
- 🌍 Add Basque (eu) locale, improve Czech (cs-CZ) and Spanish (es-ES) locales
|
|
428
|
+
- 🐞 Bugfixes
|
|
429
|
+
- 📚 Documentation improvements
|
|
430
|
+
|
|
431
|
+
### Data Grid
|
|
432
|
+
|
|
433
|
+
#### Breaking changes
|
|
434
|
+
|
|
435
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead. See [components section](/x/react-data-grid/components/) for more details.
|
|
436
|
+
- The print export will now only print the selected rows if there are any.
|
|
437
|
+
If there are no selected rows, it will print all rows. This makes the print export consistent with the other exports.
|
|
438
|
+
You can [customize the rows to export by using the `getRowsToExport` function](/x/react-data-grid/export/#customizing-the-rows-to-export).
|
|
439
|
+
- The `getApplyFilterFnV7` in `GridFilterOperator` was renamed to `getApplyFilterFn`.
|
|
440
|
+
If you use `getApplyFilterFnV7` directly - rename it to `getApplyFilterFn`.
|
|
441
|
+
- The signature of the function returned by `getApplyFilterFn` has changed for performance reasons:
|
|
442
|
+
|
|
443
|
+
```diff
|
|
444
|
+
const getApplyFilterFn: GetApplyFilterFn<any, unknown> = (filterItem) => {
|
|
445
|
+
if (!filterItem.value) {
|
|
446
|
+
return null;
|
|
447
|
+
}
|
|
448
|
+
const filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
|
|
449
|
+
- return (cellParams) => {
|
|
450
|
+
- const { value } = cellParams;
|
|
451
|
+
+ return (value, row, colDef, apiRef) => {
|
|
452
|
+
return value != null ? filterRegex.test(String(value)) : false;
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
- The `getApplyQuickFilterFnV7` in `GridColDef` was renamed to `getApplyQuickFilterFn`.
|
|
458
|
+
If you use `getApplyQuickFilterFnV7` directly - rename it to `getApplyQuickFilterFn`.
|
|
459
|
+
- The signature of the function returned by `getApplyQuickFilterFn` has changed for performance reasons:
|
|
460
|
+
|
|
461
|
+
```diff
|
|
462
|
+
const getGridStringQuickFilterFn: GetApplyQuickFilterFn<any, unknown> = (value) => {
|
|
463
|
+
if (!value) {
|
|
464
|
+
return null;
|
|
465
|
+
}
|
|
466
|
+
const filterRegex = new RegExp(escapeRegExp(value), 'i');
|
|
467
|
+
- return (cellParams) => {
|
|
468
|
+
- const { formattedValue } = cellParams;
|
|
469
|
+
+ return (value, row, column, apiRef) => {
|
|
470
|
+
+ let formattedValue = apiRef.current.getRowFormattedValue(row, column);
|
|
471
|
+
return formattedValue != null ? filterRegex.test(formattedValue.toString()) : false;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
#### `@mui/x-data-grid@7.0.0-alpha.0`
|
|
477
|
+
|
|
478
|
+
- [DataGrid] Fix for error thrown when removing skeleton rows, after sorting is applied (#10807) @benjaminbialy
|
|
479
|
+
- [DataGrid] Fix: `undefined` slot value (#10937) @romgrk
|
|
480
|
+
- [DataGrid] Print selected rows by default (#10846) @cherniavskii
|
|
481
|
+
- [DataGrid] Remove deprecated `components` and `componentsProps` (#10911) @MBilalShafi
|
|
482
|
+
- [DataGrid] Remove legacy filtering API (#10897) @cherniavskii
|
|
483
|
+
- [DataGrid] Fix keyboard navigation for actions cell with disabled buttons (#10882) @michelengelen
|
|
484
|
+
- [DataGrid] Added a recipe for using non-native select in filter panel (#10916) @michelengelen
|
|
485
|
+
- [DataGrid] Added a recipe to style cells without impacting the aggregation cells (#10913) @michelengelen
|
|
486
|
+
- [l10n] Improve Czech (cs-CZ) locale (#10949) @luborepka
|
|
487
|
+
|
|
488
|
+
#### `@mui/x-data-grid-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
489
|
+
|
|
490
|
+
Same changes as in `@mui/x-data-grid@7.0.0-alpha.0`, plus:
|
|
491
|
+
|
|
492
|
+
- [DataGridPro] Autosize Columns - Fix headers being cut off (#10666) @gitstart
|
|
493
|
+
- [DataGridPro] Add data source interface and basic documentation (#10543) @MBilalShafi
|
|
494
|
+
|
|
495
|
+
#### `@mui/x-data-grid-premium@7.0.0-alpha.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
496
|
+
|
|
497
|
+
Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.0`, plus:
|
|
498
|
+
|
|
499
|
+
- [DataGridPremium] Render aggregation label when `renderHeader` is used (#10936) @cherniavskii
|
|
500
|
+
|
|
501
|
+
### Date Pickers
|
|
502
|
+
|
|
503
|
+
#### Breaking changes
|
|
504
|
+
|
|
505
|
+
- The deprecated `components` and `componentsProps` props have been removed. Use `slots` and `slotProps` instead.
|
|
506
|
+
|
|
507
|
+
#### `@mui/x-date-pickers@7.0.0-alpha.0`
|
|
508
|
+
|
|
509
|
+
- [pickers] Escape non tokens words (#10400) @alexfauquette
|
|
510
|
+
- [fields] Fix `MultiInputTimeRangeField` section selection (#10922) @noraleonte
|
|
511
|
+
- [pickers] Refine `referenceDate` behavior in views (#10863) @LukasTy
|
|
512
|
+
- [pickers] Remove `components` and `componentsProps` props (#10700) @alexfauquette
|
|
513
|
+
- [l10n] Add Basque (eu) locale and improve Spanish (es-ES) locale (#10819) @lajtomekadimon
|
|
514
|
+
- [pickers] Add short weekdays token (#10988) @alexfauquette
|
|
515
|
+
|
|
516
|
+
#### `@mui/x-date-pickers-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
517
|
+
|
|
518
|
+
Same changes as in `@mui/x-date-pickers@7.0.0-alpha.0`.
|
|
519
|
+
|
|
520
|
+
### Charts / `@mui/x-charts@7.0.0-alpha.0`
|
|
521
|
+
|
|
522
|
+
#### Breaking changes
|
|
523
|
+
|
|
524
|
+
Types for `slots` and `slotProps` got renamed by removing the "Component" which is meaningless for charts.
|
|
525
|
+
Unless you imported those types, to create a wrapper, you should not be impacted by this breaking change.
|
|
526
|
+
|
|
527
|
+
Here is an example of the renaming for the `<ChartsTooltip />` component.
|
|
528
|
+
|
|
529
|
+
```diff
|
|
530
|
+
-ChartsTooltipSlotsComponent
|
|
531
|
+
+ChartsTooltipSlots
|
|
532
|
+
|
|
533
|
+
-ChartsTooltipSlotComponentProps
|
|
534
|
+
+ChartsTooltipSlotProps
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
- [charts] Add `<ChartsReferenceLine />` component (#10597) (#10946) @alexfauquette
|
|
538
|
+
- [charts] Improve properties JSDoc (#10931) (#10955) @alexfauquette
|
|
539
|
+
- [charts] Rename `slots` and `slotProps` types (#10875) @alexfauquette
|
|
540
|
+
|
|
541
|
+
### `@mui/x-codemod@7.0.0-alpha.0`
|
|
542
|
+
|
|
543
|
+
- [codemod] Add `v7.0.0/preset-safe` (#10973) @LukasTy
|
|
544
|
+
|
|
545
|
+
### Docs
|
|
546
|
+
|
|
547
|
+
- [docs] Add `@next` tag to the installation instructions (#10963) @MBilalShafi
|
|
548
|
+
- [docs] Document how to hide the legend (#10951) @alexfauquette
|
|
549
|
+
- [docs] Fix typo in the migration guide (#10972) @flaviendelangle
|
|
550
|
+
|
|
551
|
+
### Core
|
|
552
|
+
|
|
553
|
+
- [core] Adds migration docs for charts, pickers and tree view (#10926) @michelengelen
|
|
554
|
+
- [core] Bump monorepo (#10959) @LukasTy
|
|
555
|
+
- [core] Changed prettier branch value to next (#10917) @michelengelen
|
|
556
|
+
- [core] Fix GitHub title tag consistency @oliviertassinari
|
|
557
|
+
- [core] Fixed wrong package names in migration docs (#10953) @michelengelen
|
|
558
|
+
- [core] Merge `master` into `next` (#10929) @cherniavskii
|
|
559
|
+
- [core] Update release instructions as per v7 configuration (#10962) @MBilalShafi
|
|
560
|
+
- [license] Correctly throw errors (#10924) @oliviertassinari
|
|
561
|
+
|
|
6
562
|
## 6.18.1
|
|
7
563
|
|
|
8
564
|
_Nov 9, 2023_
|
|
@@ -235,7 +791,7 @@ Same changes as in `@mui/x-date-pickers@6.16.3`, plus:
|
|
|
235
791
|
|
|
236
792
|
- [charts] Add reference links to area + bar chart components (#10652) @michelengelen
|
|
237
793
|
- [charts] Add reference links to line chart + sparkline components (#10650) @michelengelen
|
|
238
|
-
- [charts] Add reference links to pie + scatter chart components
|
|
794
|
+
- [charts] Add reference links to pie + scatter chart components (#10653) @michelengelen
|
|
239
795
|
- [charts] Render only when `width` and `height` are resolved (#10714) @alexfauquette
|
|
240
796
|
- [charts] Support animation on `BarChart` (#9926) @alexfauquette
|
|
241
797
|
- [charts] Use new text component to avoid tick label overflow on x-axis (#10648) @alexfauquette
|
|
@@ -311,6 +867,7 @@ It adds line break support and avoids overlapping text in the legend.
|
|
|
311
867
|
This comes with some breaking changes.
|
|
312
868
|
|
|
313
869
|
- The DOM structure is modified. An intermediary `<tspan />` element has been added. This can impact how your style is applied.
|
|
870
|
+
|
|
314
871
|
```diff
|
|
315
872
|
- <text>The label</text>
|
|
316
873
|
+ <text><tspan>The label</tspan></text>
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -125,16 +125,6 @@ DataGridRaw.propTypes = {
|
|
|
125
125
|
* If defined, the grid will ignore the `hide` property in [[GridColDef]].
|
|
126
126
|
*/
|
|
127
127
|
columnVisibilityModel: PropTypes.object,
|
|
128
|
-
/**
|
|
129
|
-
* Overridable components.
|
|
130
|
-
* @deprecated Use `slots` instead.
|
|
131
|
-
*/
|
|
132
|
-
components: PropTypes.object,
|
|
133
|
-
/**
|
|
134
|
-
* Overridable components props dynamically passed to the component at rendering.
|
|
135
|
-
* @deprecated Use the `slotProps` prop instead.
|
|
136
|
-
*/
|
|
137
|
-
componentsProps: PropTypes.object,
|
|
138
128
|
/**
|
|
139
129
|
* Set the density of the grid.
|
|
140
130
|
* @default "standard"
|
|
@@ -4,7 +4,7 @@ import { useThemeProps } from '@mui/material/styles';
|
|
|
4
4
|
import { GRID_DEFAULT_LOCALE_TEXT } from '../constants';
|
|
5
5
|
import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS } from '../constants/defaultGridSlotsComponents';
|
|
6
6
|
import { GridEditModes } from '../models';
|
|
7
|
-
import { computeSlots, useProps
|
|
7
|
+
import { computeSlots, useProps } from '../internals/utils';
|
|
8
8
|
const DATA_GRID_FORCED_PROPS = {
|
|
9
9
|
disableMultipleColumnsFiltering: true,
|
|
10
10
|
disableMultipleColumnsSorting: true,
|
|
@@ -72,24 +72,19 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
|
|
|
72
72
|
clipboardCopyCellDelimiter: '\t',
|
|
73
73
|
rowPositionsDebounceMs: 166
|
|
74
74
|
};
|
|
75
|
-
const defaultSlots =
|
|
75
|
+
const defaultSlots = DATA_GRID_DEFAULT_SLOTS_COMPONENTS;
|
|
76
76
|
export const useDataGridProps = inProps => {
|
|
77
|
-
const
|
|
77
|
+
const themedProps = useProps(useThemeProps({
|
|
78
78
|
props: inProps,
|
|
79
79
|
name: 'MuiDataGrid'
|
|
80
80
|
}));
|
|
81
81
|
const localeText = React.useMemo(() => _extends({}, GRID_DEFAULT_LOCALE_TEXT, themedProps.localeText), [themedProps.localeText]);
|
|
82
82
|
const slots = React.useMemo(() => computeSlots({
|
|
83
83
|
defaultSlots,
|
|
84
|
-
slots: themedProps.slots
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
localeText,
|
|
91
|
-
slots,
|
|
92
|
-
slotProps: (_themedProps$slotProp = themedProps.slotProps) != null ? _themedProps$slotProp : componentsProps
|
|
93
|
-
}, DATA_GRID_FORCED_PROPS);
|
|
94
|
-
}, [themedProps, localeText, slots, componentsProps]);
|
|
84
|
+
slots: themedProps.slots
|
|
85
|
+
}), [themedProps.slots]);
|
|
86
|
+
return React.useMemo(() => _extends({}, DATA_GRID_PROPS_DEFAULT_VALUES, themedProps, {
|
|
87
|
+
localeText,
|
|
88
|
+
slots
|
|
89
|
+
}, DATA_GRID_FORCED_PROPS), [themedProps, localeText, slots]);
|
|
95
90
|
};
|
|
@@ -14,6 +14,5 @@ export const GRID_ACTIONS_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
14
14
|
disableColumnMenu: true,
|
|
15
15
|
disableExport: true,
|
|
16
16
|
renderCell: renderActionsCell,
|
|
17
|
-
getApplyQuickFilterFn: undefined
|
|
18
|
-
getApplyQuickFilterFnV7: undefined
|
|
17
|
+
getApplyQuickFilterFn: undefined
|
|
19
18
|
});
|
|
@@ -36,7 +36,6 @@ export const GRID_BOOLEAN_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
|
36
36
|
valueFormatter: gridBooleanFormatter,
|
|
37
37
|
filterOperators: getGridBooleanOperators(),
|
|
38
38
|
getApplyQuickFilterFn: undefined,
|
|
39
|
-
getApplyQuickFilterFnV7: undefined,
|
|
40
39
|
// @ts-ignore
|
|
41
40
|
aggregable: false,
|
|
42
41
|
// @ts-ignore
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GridFilterInputBoolean } from '../components/panel/filterPanel/GridFilterInputBoolean';
|
|
2
|
-
|
|
3
|
-
export const getGridBooleanOperators = () => convertLegacyOperators([{
|
|
2
|
+
export const getGridBooleanOperators = () => [{
|
|
4
3
|
value: 'is',
|
|
5
|
-
|
|
4
|
+
getApplyFilterFn: filterItem => {
|
|
6
5
|
if (!filterItem.value) {
|
|
7
6
|
return null;
|
|
8
7
|
}
|
|
@@ -12,4 +11,4 @@ export const getGridBooleanOperators = () => convertLegacyOperators([{
|
|
|
12
11
|
};
|
|
13
12
|
},
|
|
14
13
|
InputComponent: GridFilterInputBoolean
|
|
15
|
-
}]
|
|
14
|
+
}];
|
|
@@ -19,7 +19,6 @@ export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF
|
|
|
19
19
|
disableReorder: true,
|
|
20
20
|
disableExport: true,
|
|
21
21
|
getApplyQuickFilterFn: undefined,
|
|
22
|
-
getApplyQuickFilterFnV7: undefined,
|
|
23
22
|
valueGetter: params => {
|
|
24
23
|
const selectionLookup = selectedIdsLookupSelector(params.api.state, params.api.instanceId);
|
|
25
24
|
return selectionLookup[params.id] !== undefined;
|