@mui/x-tree-view 8.27.2 → 8.28.5

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
@@ -5,6 +5,470 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.28.5
9
+
10
+ _May 8, 2026_
11
+
12
+ We'd like to extend a big thank you to the 2 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🐞 Bugfixes
15
+
16
+ The following team members contributed to this release:
17
+ @LukasTy, @MBilalShafi
18
+
19
+ ### Data Grid
20
+
21
+ #### `@mui/x-data-grid@8.28.5`
22
+
23
+ - [DataGrid] Fix active filter detection for array values (#22357) @MBilalShafi
24
+ - [DataGrid] Fix crash when grouping/tree-data values match `Object.prototype` property names (#22343) @LukasTy
25
+
26
+ #### `@mui/x-data-grid-pro@8.28.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
27
+
28
+ Same changes as in `@mui/x-data-grid@8.28.5`.
29
+
30
+ #### `@mui/x-data-grid-premium@8.28.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
31
+
32
+ Same changes as in `@mui/x-data-grid-pro@8.28.5`.
33
+
34
+ ### Date and Time Pickers
35
+
36
+ #### `@mui/x-date-pickers@8.28.5`
37
+
38
+ - [pickers] Fix duplicate hour label in `MultiSectionDigitalClock` on DST day (#22350) @LukasTy
39
+
40
+ #### `@mui/x-date-pickers-pro@8.28.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
41
+
42
+ Same changes as in `@mui/x-date-pickers@8.28.5`.
43
+
44
+ ### Tree View
45
+
46
+ #### `@mui/x-tree-view@8.28.5`
47
+
48
+ - [tree view] Fix stale Tree View `apiRef` after keyed remount (#22355) @MBilalShafi
49
+
50
+ #### `@mui/x-tree-view-pro@8.28.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
51
+
52
+ Same changes as in `@mui/x-tree-view@8.28.5`.
53
+
54
+ ### Core
55
+
56
+ - [code-infra] Fix broken `valelint` and docs build (#22362) @LukasTy
57
+
58
+ ## 8.28.4
59
+
60
+ _Apr 27, 2026_
61
+
62
+ We'd like to extend a big thank you to the 3 contributors who made this release possible. Here are some highlights ✨:
63
+
64
+ - 🐞 Bugfixes
65
+
66
+ Special thanks go out to these community members for their valuable contributions:
67
+ @supunsathsara
68
+
69
+ The following team members contributed to this release:
70
+ @LukasTy, @michelengelen
71
+
72
+ ### Date and Time Pickers
73
+
74
+ #### `@mui/x-date-pickers@8.28.4`
75
+
76
+ - [pickers] Fix `DateRangeCalendar` drag with `AdapterDayjs` plain-constructor values (#22170) @LukasTy
77
+ - [pickers] Fix disabled state not overriding error border color (#22186) @supunsathsara
78
+ - [pickers] Use `convertToMeridiem` utility in `transferDateSectionValue` (#22132) @michelengelen
79
+
80
+ #### `@mui/x-date-pickers-pro@8.28.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
81
+
82
+ Same changes as in `@mui/x-date-pickers@8.28.4`.
83
+
84
+ ### Docs
85
+
86
+ - [docs] Remove obsolete v7 deprecation warning for `dayOfWeekFormatter` (#22120) @LukasTy
87
+ - [docs] Use mui.com for broken links checker known targets (#22171) @LukasTy
88
+
89
+ ## 8.28.3
90
+
91
+ _Apr 15, 2026_
92
+
93
+ We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
94
+
95
+ - 🐞 Bugfixes
96
+
97
+ Special thanks go out to this community member for their valuable contribution:
98
+ @nk10nikhil
99
+
100
+ The following team members contributed to this release:
101
+ @flaviendelangle, @LukasTy, @MBilalShafi, @michelengelen, @sai6855
102
+
103
+ ### Data Grid
104
+
105
+ #### `@mui/x-data-grid@8.28.2`
106
+
107
+ Internal changes.
108
+
109
+ #### `@mui/x-data-grid-pro@8.28.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
110
+
111
+ Same changes as in `@mui/x-data-grid@8.28.2`, plus:
112
+
113
+ - [DataGridPro] Improve trigger for nested row reordering (#21996) @MBilalShafi
114
+
115
+ #### `@mui/x-data-grid-premium@8.28.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
116
+
117
+ Same changes as in `@mui/x-data-grid-pro@8.28.2`.
118
+
119
+ ### Date and Time Pickers
120
+
121
+ #### `@mui/x-date-pickers@8.28.3`
122
+
123
+ - [pickers] Ensure correct `display` property on Day component (#21980) @LukasTy
124
+
125
+ #### `@mui/x-date-pickers-pro@8.28.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
126
+
127
+ Same changes as in `@mui/x-date-pickers@8.28.3`.
128
+
129
+ ### Charts
130
+
131
+ #### `@mui/x-charts@8.28.2`
132
+
133
+ - [charts] Add missing export for `ChartsBrushOverlay` (#21993) (#22008) @nk10nikhil
134
+
135
+ #### `@mui/x-charts-pro@8.28.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
136
+
137
+ Same changes as in `@mui/x-charts@8.28.2`.
138
+
139
+ #### `@mui/x-charts-premium@8.28.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
140
+
141
+ Same changes as in `@mui/x-charts-pro@8.28.2`.
142
+
143
+ ### Tree View
144
+
145
+ #### `@mui/x-tree-view@8.28.3`
146
+
147
+ - [tree view] Move `lazyLoadedItems` initialization to state initializer (#22087) @michelengelen
148
+
149
+ #### `@mui/x-tree-view-pro@8.28.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
150
+
151
+ Same changes as in `@mui/x-tree-view@8.28.3`, plus:
152
+
153
+ - [RichTreeViewPro] Allow to auto-expand lazy loaded items (#21957) @flaviendelangle
154
+
155
+ ### Docs
156
+
157
+ - [docs] Fix `TreeDataFullExample` data grid demo crash (#22007) @sai6855
158
+
159
+ ### Miscellaneous
160
+
161
+ - [core] Post v9 stable updates (#22035) @LukasTy
162
+
163
+ ## 8.28.2
164
+
165
+ _Apr 1, 2026_
166
+
167
+ We'd like to extend a big thank you to the 4 contributors who made this release possible.
168
+
169
+ Special thanks go out to this community member for their valuable contribution:
170
+ @mixelburg, @sibananda485
171
+
172
+ The following team members contributed to this release:
173
+ @dav-is, @JCQuintas
174
+
175
+ ### Data Grid
176
+
177
+ #### `@mui/x-data-grid@8.28.2`
178
+
179
+ - [DataGrid] Export `GridColumnUnsortedIconProps` for custom column icon slots (#21898) @mixelburg
180
+
181
+ #### `@mui/x-data-grid-pro@8.28.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
182
+
183
+ Same changes as in `@mui/x-data-grid@8.28.2`.
184
+
185
+ #### `@mui/x-data-grid-premium@8.28.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
186
+
187
+ Same changes as in `@mui/x-data-grid-pro@8.28.2`, plus:
188
+
189
+ - [DataGridPremium] Fix clipboard paste issue in portal (#21949) @sibananda485
190
+
191
+ ### Charts
192
+
193
+ #### `@mui/x-charts@8.28.2`
194
+
195
+ - [charts] Fix zoom slider preview with discard filter mode (#21906) @JCQuintas
196
+
197
+ #### `@mui/x-charts-pro@8.28.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
198
+
199
+ Same changes as in `@mui/x-charts@8.28.2`.
200
+
201
+ #### `@mui/x-charts-premium@8.28.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
202
+
203
+ Same changes as in `@mui/x-charts-pro@8.28.2`.
204
+
205
+ ### Docs
206
+
207
+ - [docs] Fix JSDOM → jsdom casing (#21908) @JCQuintas
208
+
209
+ ### Core
210
+
211
+ - [docs-infra] Set `SEARCH_INDEX` Env for v8 (#21875) @dav-is
212
+
213
+ ## 8.28.1
214
+
215
+ _Mar 26, 2026_
216
+
217
+ We'd like to extend a big thank you to the 2 contributors who made this release possible.
218
+
219
+ The following team members contributed to this release:
220
+ @arminmeh, @cherniavskii
221
+
222
+ ### Data Grid
223
+
224
+ #### `@mui/x-data-grid@8.28.1`
225
+
226
+ - [DataGrid] Prevent repeated `hasScrollbar` state updates (#21847) @arminmeh
227
+
228
+ #### `@mui/x-data-grid-pro@8.28.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
229
+
230
+ Same changes as in `@mui/x-data-grid@8.28.1`, plus:
231
+
232
+ - [DataGridPro] `fetchRows()` API's default `start` and `end` params based on scroll position with lazy loading (#21811) @arminmeh
233
+
234
+ #### `@mui/x-data-grid-premium@8.28.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
235
+
236
+ Same changes as in `@mui/x-data-grid-pro@8.28.1`.
237
+
238
+ ### Core
239
+
240
+ - [internal] Remove headless data grid packages (#21848) @cherniavskii
241
+
242
+ ## 8.28.0
243
+
244
+ _Mar 19, 2026_
245
+
246
+ We'd like to extend a big thank you to the 5 contributors who made this release possible.
247
+
248
+ The following team members contributed to this release:
249
+ @alexfauquette, @brijeshb42, @Janpot, @JCQuintas, @sai6855
250
+
251
+ ### Data Grid
252
+
253
+ #### `@mui/x-data-grid@8.28.0`
254
+
255
+ - [DataGrid] Move `elementOverrides` to constants and remove duplicates (@sai6855) (#21752) @github-actions[bot]
256
+
257
+ #### `@mui/x-data-grid-pro@8.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
258
+
259
+ Same changes as in `@mui/x-data-grid@8.28.0`.
260
+
261
+ #### `@mui/x-data-grid-premium@8.28.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
262
+
263
+ Same changes as in `@mui/x-data-grid-pro@8.28.0`.
264
+
265
+ ### Date and Time Pickers
266
+
267
+ #### `@mui/x-date-pickers@8.27.2`
268
+
269
+ Internal changes.
270
+
271
+ #### `@mui/x-date-pickers-pro@8.27.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
272
+
273
+ Same changes as in `@mui/x-date-pickers@8.27.2`.
274
+
275
+ ### Charts
276
+
277
+ #### `@mui/x-charts@8.28.0`
278
+
279
+ - [charts] Improve deprecation warnings (#21760) (#21767) @alexfauquette
280
+ - [charts] Refactor `FunnelChart` classes structure (@JCQuintas) (#21763) @github-actions[bot]
281
+ - [charts] Refactor `Heatmap` classes structure (#21653) (#21745) @JCQuintas
282
+ - [charts] Refactor `PieChart` classes structure (@JCQuintas) (#21715) @github-actions[bot]
283
+ - [charts] Refactor `RadarChart` classes structure (@JCQuintas) (#21730) @github-actions[bot]
284
+ - [charts] Refactor `SankeyChart` classes structure (#21654) (#21726) @JCQuintas
285
+ - [charts] Rename `data-series-id` by `data-series` (#21761) (#21772) @alexfauquette
286
+
287
+ #### `@mui/x-charts-pro@8.28.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
288
+
289
+ Same changes as in `@mui/x-charts@8.28.0`, plus:
290
+
291
+ - [charts-pro] Allow `brush` interaction to accept `requiredKeys/pointerMode` (#21723) @JCQuintas
292
+
293
+ #### `@mui/x-charts-premium@8.28.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
294
+
295
+ Same changes as in `@mui/x-charts-pro@8.28.0`.
296
+
297
+ ### Tree View
298
+
299
+ #### `@mui/x-tree-view@8.27.2`
300
+
301
+ Internal changes.
302
+
303
+ #### `@mui/x-tree-view-pro@8.27.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
304
+
305
+ Same changes as in `@mui/x-tree-view@8.27.2`.
306
+
307
+ ### Codemod
308
+
309
+ #### `@mui/x-codemod@8.27.0`
310
+
311
+ Internal changes.
312
+
313
+ ### Core
314
+
315
+ - [code-infra] Fix contributor generation in changelog (#21712) @brijeshb42
316
+ - [code-infra] Install pkg-pr-new (#21778) @Janpot
317
+
318
+ ## 8.27.5
319
+
320
+ _Mar 11, 2026_
321
+
322
+ We'd like to extend a big thank you to the 7 contributors who made this release possible. Here are some highlights ✨:
323
+
324
+ - 🐞 Bugfixes
325
+
326
+ The following team members contributed to this release:
327
+ @bernardobelchior, @JCQuintas, @MBilalShafi, @michelengelen, @mj12albert, @sai6855, @siriwatknp
328
+
329
+ ### Data Grid
330
+
331
+ #### `@mui/x-data-grid@8.27.5`
332
+
333
+ - [DataGrid] Fix crash when `rows` and `rowModesModel` are updated simultaneously (#21684) @michelengelen
334
+ - [DataGrid] Forward rest props in `GridFilterInputMultipleValue` (#21444) @siriwatknp
335
+ - [DataGrid] Remove double rtl inversion logic for columns pinning (#21443) @siriwatknp
336
+ - [DataGrid] Add missing `resizablePanelHandle` classes to `gridClasses` object (#21632) @sai6855
337
+ - [DataGrid] Refactor `headerAlign` style calls (#21633) @sai6855
338
+ - [DataGrid] Fix keyboard navigation with single-row checkbox selection (#21529) @mj12albert
339
+
340
+ #### `@mui/x-data-grid-pro@8.27.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
341
+
342
+ Same changes as in `@mui/x-data-grid@8.27.5`, plus:
343
+
344
+ - [DataGridPro] Add `role="presentation"` to detail panel toggle header content (#21691) @michelengelen
345
+ - [DataGridPro] Fix sorting not reflected in nested server-side data (#21641) @MBilalShafi
346
+
347
+ #### `@mui/x-data-grid-premium@8.27.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
348
+
349
+ Same changes as in `@mui/x-data-grid-pro@8.27.5`.
350
+
351
+ ### Charts
352
+
353
+ #### `@mui/x-charts@8.27.5`
354
+
355
+ - [charts] Refactor `BarChart` classes structure (#21601) (#21644) @JCQuintas
356
+ - [charts] Refactor `LineChart` classes structure (#21672) @JCQuintas
357
+ - [charts] Refactor `ScatterChart` classes structure (#21706) @JCQuintas
358
+
359
+ #### `@mui/x-charts-pro@8.27.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
360
+
361
+ Same changes as in `@mui/x-charts@8.27.5`, plus:
362
+
363
+ - [charts-pro] Fix image export truncated when page is zoomed out (#21696) @bernardobelchior
364
+
365
+ #### `@mui/x-charts-premium@8.27.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
366
+
367
+ Same changes as in `@mui/x-charts-pro@8.27.5`.
368
+
369
+ ### Docs
370
+
371
+ - [docs] Fix `AssistantWithDataSource` demo crashing (#21631) @sai6855
372
+ - [docs] Move Range Bar Chart to existing charts (#21122) @bernardobelchior
373
+
374
+ ### Core
375
+
376
+ - [code-infra] Fix datagrid test flakyness (#21657) @JCQuintas
377
+ - [code-infra] Removed `getTeamMembers` function and usage from the release script (#21608) @michelengelen
378
+
379
+ ### Miscellaneous
380
+
381
+ - [test] Add missing tests for forwarding props to filter operators in DataGrid (#21700) @siriwatknp
382
+
383
+ ## 8.27.4
384
+
385
+ _Mar 5, 2026_
386
+
387
+ We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
388
+
389
+ - 🐞 Bugfixes
390
+ - 🌎 Improve Ukrainian (uk-UA) locale
391
+
392
+ Special thanks go out to this community member for their valuable contribution:
393
+ @lion1963
394
+
395
+ The following team members contributed to this release:
396
+ @arminmeh, @brijeshb42, @dav-is, @JCQuintas, @sai6855
397
+
398
+ ### Data Grid
399
+
400
+ #### `@mui/x-data-grid@8.27.4`
401
+
402
+ - [DataGrid] Prevent unnecessary row selection checkbox rerendering (#21571) @arminmeh
403
+ - [DataGrid] Make `GridScrollArea` overrides resolver dynamic (#21612) @sai6855
404
+ - [l10n] Improve Ukrainian (uk-UA) locale (#21381) @lion1963
405
+
406
+ #### `@mui/x-data-grid-pro@8.27.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
407
+
408
+ Same changes as in `@mui/x-data-grid@8.27.4`, plus:
409
+
410
+ - [DataGridPro] Use `getRowId` prop to calculate the tree data row update (#21544) @arminmeh
411
+
412
+ #### `@mui/x-data-grid-premium@8.27.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
413
+
414
+ Same changes as in `@mui/x-data-grid-pro@8.27.4`.
415
+
416
+ ### Charts
417
+
418
+ #### `@mui/x-charts@8.27.4`
419
+
420
+ - [charts] Deprecate `ChartDataProvider` in favour of `ChartsDataProvider` (#21549) @JCQuintas
421
+ - [charts] Rename `ChartContainer` to `ChartsContainer` (#21186) @JCQuintas
422
+ - [charts] Rename `ChartZoomSlider` to `ChartsZoomSlider` (#21572) @JCQuintas
423
+
424
+ #### `@mui/x-charts-pro@8.27.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
425
+
426
+ Same changes as in `@mui/x-charts@8.27.4`.
427
+
428
+ #### `@mui/x-charts-premium@8.27.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
429
+
430
+ Same changes as in `@mui/x-charts-pro@8.27.4`.
431
+
432
+ ### Core
433
+
434
+ - [code-infra] Add eslint rule to prevent `Math.random` in docs (#21505) (#21563) @JCQuintas
435
+ - [code-infra] V8 Dedupe (#21561) @JCQuintas
436
+ - [docs-infra] Apply Cookie Banner to v8.x Branch (#21448) @dav-is
437
+ - [code-infra] Setup checkout to do full clone for non master branches (#21624) @brijeshb42
438
+
439
+ ## 8.27.3
440
+
441
+ _Feb 25, 2026_
442
+
443
+ We'd like to extend a big thank you to the 4 contributors who made this release possible. Here are some highlights ✨:
444
+
445
+ - 🐞 Bugfixes
446
+ - ⚡️ Improved dynamic data support and cache invalidation in lazy loading for Data Grid Pro
447
+
448
+ The following team members contributed to this release:
449
+ @cherniavskii, @michelengelen, @MBilalShafi, @arminmeh
450
+
451
+ ### Data Grid
452
+
453
+ #### `@mui/x-data-grid@8.27.3`
454
+
455
+ - [DataGrid] Preserve key input during row edit when using `rowModesModel` (#21457) @michelengelen
456
+
457
+ #### `@mui/x-data-grid-pro@8.27.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
458
+
459
+ Same changes as in `@mui/x-data-grid@8.27.3`, plus:
460
+
461
+ - [DataGridPro] Improve dynamic data support and cache invalidation in lazy loading (#21465) @MBilalShafi
462
+
463
+ #### `@mui/x-data-grid-premium@8.27.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
464
+
465
+ Same changes as in `@mui/x-data-grid-pro@8.27.3`.
466
+
467
+ ### Core
468
+
469
+ - [code-infra] Do not append `x` to the last version for the compare API (#21422) @arminmeh
470
+ - [docs-infra] Fix current version detection logic (#21415) @cherniavskii
471
+
8
472
  ## 8.27.2
9
473
 
10
474
  _Feb 20, 2026_
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.27.2
2
+ * @mui/x-tree-view v8.28.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -80,7 +80,7 @@ export const useTreeViewBuildContext = parameters => {
80
80
  }), [runItemPlugins, wrapItem, publicAPI, store, rootRef]);
81
81
  };
82
82
  function initializeInputApiRef(publicAPI, apiRef) {
83
- if (apiRef != null && apiRef.current == null) {
83
+ if (apiRef != null && apiRef.current !== publicAPI) {
84
84
  apiRef.current = publicAPI;
85
85
  }
86
86
  }
@@ -1,4 +1,3 @@
1
- import { TreeViewItemMeta } from "../internals/models/index.js";
2
1
  type DataSourceCacheDefaultConfig = {
3
2
  /**
4
3
  * Time To Live for each cache entry in milliseconds.
@@ -7,32 +6,32 @@ type DataSourceCacheDefaultConfig = {
7
6
  */
8
7
  ttl?: number;
9
8
  };
10
- export interface DataSourceCache {
9
+ export interface DataSourceCache<T = any> {
11
10
  /**
12
11
  * Set the cache entry for the given key.
13
12
  * @param {string} key The key of type `string`
14
- * @param {TreeViewItemMeta[]} value The value to be stored in the cache
13
+ * @param {T[]} value The value to be stored in the cache
15
14
  */
16
- set: (key: string, value: TreeViewItemMeta[]) => void;
15
+ set: (key: string, value: T[]) => void;
17
16
  /**
18
17
  * Get the cache entry for the given key.
19
18
  * @param {string} key The key of type `string`
20
- * @returns {TreeViewItemMeta[]} The value stored in the cache
19
+ * @returns {T[] | undefined | -1} The value stored in the cache, `undefined` if not found, or `-1` if the cache entry is stale.
21
20
  */
22
- get: (key: string) => TreeViewItemMeta[] | undefined | -1;
21
+ get: (key: string) => T[] | undefined | -1;
23
22
  /**
24
23
  * Clear the cache.
25
24
  */
26
25
  clear: () => void;
27
26
  }
28
- export declare class DataSourceCacheDefault {
27
+ export declare class DataSourceCacheDefault<T = any> implements DataSourceCache<T> {
29
28
  private cache;
30
29
  private ttl;
31
30
  constructor({
32
31
  ttl
33
32
  }: DataSourceCacheDefaultConfig);
34
- set(key: string, value: TreeViewItemMeta[]): void;
35
- get(key: string): TreeViewItemMeta[] | undefined | -1;
33
+ set(key: string, value: T[]): void;
34
+ get(key: string): T[] | undefined | -1;
36
35
  clear(): void;
37
36
  }
38
37
  export {};
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-tree-view v8.27.2
2
+ * @mui/x-tree-view v8.28.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -88,7 +88,7 @@ const useTreeViewBuildContext = parameters => {
88
88
  };
89
89
  exports.useTreeViewBuildContext = useTreeViewBuildContext;
90
90
  function initializeInputApiRef(publicAPI, apiRef) {
91
- if (apiRef != null && apiRef.current == null) {
91
+ if (apiRef != null && apiRef.current !== publicAPI) {
92
92
  apiRef.current = publicAPI;
93
93
  }
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-tree-view",
3
- "version": "8.27.2",
3
+ "version": "8.28.5",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of the MUI X Tree View components.",
6
6
  "license": "MIT",
package/utils/cache.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { TreeViewItemMeta } from "../internals/models/index.js";
2
1
  type DataSourceCacheDefaultConfig = {
3
2
  /**
4
3
  * Time To Live for each cache entry in milliseconds.
@@ -7,32 +6,32 @@ type DataSourceCacheDefaultConfig = {
7
6
  */
8
7
  ttl?: number;
9
8
  };
10
- export interface DataSourceCache {
9
+ export interface DataSourceCache<T = any> {
11
10
  /**
12
11
  * Set the cache entry for the given key.
13
12
  * @param {string} key The key of type `string`
14
- * @param {TreeViewItemMeta[]} value The value to be stored in the cache
13
+ * @param {T[]} value The value to be stored in the cache
15
14
  */
16
- set: (key: string, value: TreeViewItemMeta[]) => void;
15
+ set: (key: string, value: T[]) => void;
17
16
  /**
18
17
  * Get the cache entry for the given key.
19
18
  * @param {string} key The key of type `string`
20
- * @returns {TreeViewItemMeta[]} The value stored in the cache
19
+ * @returns {T[] | undefined | -1} The value stored in the cache, `undefined` if not found, or `-1` if the cache entry is stale.
21
20
  */
22
- get: (key: string) => TreeViewItemMeta[] | undefined | -1;
21
+ get: (key: string) => T[] | undefined | -1;
23
22
  /**
24
23
  * Clear the cache.
25
24
  */
26
25
  clear: () => void;
27
26
  }
28
- export declare class DataSourceCacheDefault {
27
+ export declare class DataSourceCacheDefault<T = any> implements DataSourceCache<T> {
29
28
  private cache;
30
29
  private ttl;
31
30
  constructor({
32
31
  ttl
33
32
  }: DataSourceCacheDefaultConfig);
34
- set(key: string, value: TreeViewItemMeta[]): void;
35
- get(key: string): TreeViewItemMeta[] | undefined | -1;
33
+ set(key: string, value: T[]): void;
34
+ get(key: string): T[] | undefined | -1;
36
35
  clear(): void;
37
36
  }
38
37
  export {};