@mui/x-virtualizer 0.1.3 → 0.1.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 +214 -13
- package/esm/features/virtualization.d.ts +1 -0
- package/esm/features/virtualization.js +5 -0
- package/esm/index.js +1 -1
- package/esm/useVirtualizer.d.ts +1 -0
- package/features/virtualization.d.ts +1 -0
- package/features/virtualization.js +5 -0
- package/index.js +1 -1
- package/package.json +5 -5
- package/useVirtualizer.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,201 @@
|
|
|
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.11.1
|
|
9
|
+
|
|
10
|
+
_Sep 4, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
15
|
+
@sai6855
|
|
16
|
+
|
|
17
|
+
The following are all team members who have contributed to this release:
|
|
18
|
+
@brijeshb42, @flaviendelangle, @JCQuintas, @mapache-salvaje, @oliviertassinari
|
|
19
|
+
|
|
20
|
+
### Data Grid
|
|
21
|
+
|
|
22
|
+
#### `@mui/x-data-grid@8.11.1`
|
|
23
|
+
|
|
24
|
+
- [DataGrid] Refine types in `GridCell` component (#19384) @sai6855
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@8.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@8.11.1`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@8.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@8.11.1`.
|
|
33
|
+
|
|
34
|
+
### Date and Time Pickers
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-date-pickers@8.11.1`
|
|
37
|
+
|
|
38
|
+
- [pickers] Merge `slotProps` for input adornment in `PickerFieldUI` component (#19399) @sai6855
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-date-pickers-pro@8.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-date-pickers@8.11.1`.
|
|
43
|
+
|
|
44
|
+
### Charts
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-charts@8.11.1`
|
|
47
|
+
|
|
48
|
+
- [charts] Prevent crash and warn user on incorrect `axisId` when composing (#19397) @JCQuintas
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-charts-pro@8.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-charts@8.11.1`.
|
|
53
|
+
|
|
54
|
+
### Tree View
|
|
55
|
+
|
|
56
|
+
#### `@mui/x-tree-view@8.11.1`
|
|
57
|
+
|
|
58
|
+
- [tree view] Expose the methods to manually refetch the children of an item (#19248) @flaviendelangle
|
|
59
|
+
- [tree view] Use the shared store implementation instead of the custom one (#19261) @flaviendelangle
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-tree-view-pro@8.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
62
|
+
|
|
63
|
+
Same changes as in `@mui/x-tree-view@8.11.1`.
|
|
64
|
+
|
|
65
|
+
### Codemod
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-codemod@8.11.1`
|
|
68
|
+
|
|
69
|
+
Internal changes.
|
|
70
|
+
|
|
71
|
+
### Docs
|
|
72
|
+
|
|
73
|
+
- [docs] Fix grammar and spelling mistakes on the Date and Time Pickers pages (#19300) @mapache-salvaje
|
|
74
|
+
- [docs] Remove wrong legend info (#19383) @JCQuintas
|
|
75
|
+
|
|
76
|
+
### Core
|
|
77
|
+
|
|
78
|
+
- [internal] Fix action alert (#19388) @oliviertassinari
|
|
79
|
+
- [internal] Fix pnpm valelint to have 0 errors @oliviertassinari
|
|
80
|
+
- [infra] Remove "main" fields from publishable packages (#19407) @brijeshb42
|
|
81
|
+
|
|
82
|
+
## 8.11.0
|
|
83
|
+
|
|
84
|
+
_Aug 29, 2025_
|
|
85
|
+
|
|
86
|
+
We'd like to extend a big thank you to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
87
|
+
|
|
88
|
+
- 📊 Add new `SankeyChart`
|
|
89
|
+
|
|
90
|
+
<img height="300" alt="Screenshot 2025-07-24 at 12 54 33" src="https://github.com/user-attachments/assets/d77bcec1-044b-48c6-b37d-d7b74793b91c" />
|
|
91
|
+
|
|
92
|
+
- 🚀 Data Grid row grouping now supports row reordering
|
|
93
|
+
|
|
94
|
+
See the [Drag-and-drop group reordering](https://mui.com/x/react-data-grid/row-grouping/#drag-and-drop-group-reordering) section for more details.
|
|
95
|
+
|
|
96
|
+
- 📚 Documentation improvements
|
|
97
|
+
|
|
98
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
99
|
+
@dwrth, @lauri865, @Webini
|
|
100
|
+
|
|
101
|
+
The following are all team members who have contributed to this release:
|
|
102
|
+
@alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
|
|
103
|
+
|
|
104
|
+
### Data Grid
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-data-grid@8.11.0`
|
|
107
|
+
|
|
108
|
+
- [DataGrid] Fix focused column header scroll jump (#19323) @lauri865
|
|
109
|
+
- [DataGrid] Bring `columnUnsortedIcon` slot back (#19268) @arminmeh
|
|
110
|
+
- [DataGrid] Do not add `menu` role to the empty actions menu (#19338) @arminmeh
|
|
111
|
+
- [DataGrid] Fix `columnsManagementRow` style override slot not working (#19097) @dwrth
|
|
112
|
+
- [DataGrid] Fix pagination state synchronization issue (#19290) @MBilalShafi
|
|
113
|
+
- [DataGrid] Fix scroll issue in R17 (#19265) @romgrk
|
|
114
|
+
- [DataGrid] Hide column separator of non-resizable pinned column (#19277) @arminmeh
|
|
115
|
+
|
|
116
|
+
#### `@mui/x-data-grid-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
117
|
+
|
|
118
|
+
Same changes as in `@mui/x-data-grid@8.11.0`, plus:
|
|
119
|
+
|
|
120
|
+
- [DataGridPro] Fix column menu sort when `multipleColumnsSortingMode="always"` (#19099) @MBilalShafi
|
|
121
|
+
- [DataGridPro] Keep the drop effect if `keepColumnPositionIfDraggedOutside` is enabled (#19372) @arminmeh
|
|
122
|
+
|
|
123
|
+
#### `@mui/x-data-grid-premium@8.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
124
|
+
|
|
125
|
+
Same changes as in `@mui/x-data-grid-pro@8.11.0`, plus:
|
|
126
|
+
|
|
127
|
+
- [DataGridPremium] Fix `valueFormatter` issues when `rowGroupingColumnMode="single"` (#18967) @cherniavskii
|
|
128
|
+
- [DataGridPremium] Reordering support for row grouping (#18251) @MBilalShafi
|
|
129
|
+
|
|
130
|
+
### Date and Time Pickers
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-date-pickers@8.11.0`
|
|
133
|
+
|
|
134
|
+
- [pickers] Fix Firefox bug causing crash when `startContainer` is a restricted object (#18772) @Webini
|
|
135
|
+
- [pickers] RTL not applied correctly for Calendar Systems examples (works in v7.x but broken in latest version) (#19287) @rita-codes
|
|
136
|
+
- [pickers] Use the locale week day on the Luxon adapter (#19230) @flaviendelangle
|
|
137
|
+
- [pickers] Fix display of placeholder when label is shrunk (#19318) @sai6855
|
|
138
|
+
|
|
139
|
+
#### `@mui/x-date-pickers-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
140
|
+
|
|
141
|
+
Same changes as in `@mui/x-date-pickers@8.11.0`.
|
|
142
|
+
|
|
143
|
+
### Charts
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-charts@8.11.0`
|
|
146
|
+
|
|
147
|
+
- [charts] Add `RadarAxis` component to render labels (#19240) @alexfauquette
|
|
148
|
+
- [charts] Handle item identifier with data (#19295) @JCQuintas
|
|
149
|
+
- [charts] Refactor optional chaining for props in PieChart, PieChartPro, and ScatterChartPro components (#19292) @sai6855
|
|
150
|
+
- [charts] Remove unused `fill` and `stroke` properties (#19316) @sai6855
|
|
151
|
+
- [charts] Correct `hideLegend` prop description in docs (#19371) @sai6855
|
|
152
|
+
|
|
153
|
+
#### `@mui/x-charts-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
154
|
+
|
|
155
|
+
Same changes as in `@mui/x-charts@8.11.0`, plus:
|
|
156
|
+
|
|
157
|
+
- [charts-pro] Add new `SankeyChart` (#18895) @JCQuintas
|
|
158
|
+
|
|
159
|
+
### Tree View
|
|
160
|
+
|
|
161
|
+
#### `@mui/x-tree-view@8.11.0`
|
|
162
|
+
|
|
163
|
+
- [tree view] Improve the typing of the item's checkbox `slotProps` (#19247) @flaviendelangle
|
|
164
|
+
|
|
165
|
+
#### `@mui/x-tree-view-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
166
|
+
|
|
167
|
+
Same changes as in `@mui/x-tree-view@8.11.0`.
|
|
168
|
+
|
|
169
|
+
### Codemod
|
|
170
|
+
|
|
171
|
+
#### `@mui/x-codemod@8.11.0`
|
|
172
|
+
|
|
173
|
+
Internal changes.
|
|
174
|
+
|
|
175
|
+
### Docs
|
|
176
|
+
|
|
177
|
+
- [docs][TreeView] Fix grammar and spelling mistakes (#19299) @mapache-salvaje
|
|
178
|
+
- [docs][DataGrid] Add pagination number formatting doc with a demo (#19221) @siriwatknp
|
|
179
|
+
- [docs][Charts] Correct some small grammar mistakes (#19297) @mapache-salvaje
|
|
180
|
+
- [docs][DataGrid] Correct grammar mistakes (#19298) @mapache-salvaje
|
|
181
|
+
- [docs][DataGrid] Make it clear that the API key for AI Assistant must be private (#19244) @oliviertassinari
|
|
182
|
+
|
|
183
|
+
### Core
|
|
184
|
+
|
|
185
|
+
- [code-infra] Remove unnecessary triggers from publish workflow (#19348) @Janpot
|
|
186
|
+
- [code-infra] Set up publishing from GitHub actions (#19264) @Janpot
|
|
187
|
+
- [code-infra] Update renovate, exclude infra packages from MUI group (#19288) @Janpot
|
|
188
|
+
- [internal] Add comment for Codspeed triggers (#19302) @oliviertassinari
|
|
189
|
+
- [internal] Fix changelog generation for infra tags (#19266) @oliviertassinari
|
|
190
|
+
- [internal] Remove dead repository field (#19301) @oliviertassinari
|
|
191
|
+
- [internal] Sentence case @oliviertassinari
|
|
192
|
+
- [internal] Update 8.10.1 changelog with missing changes (#19345) @cherniavskii
|
|
193
|
+
- [support-infra] Improve GitHub Action that check PRs labels (#19303) @oliviertassinari
|
|
194
|
+
|
|
195
|
+
### Miscellaneous
|
|
196
|
+
|
|
197
|
+
- [infra] Add `synchronize` to workflow triggers (#19342) @michelengelen
|
|
198
|
+
- [infra] Add charts docs folder in codowner (#19317) @alexfauquette
|
|
199
|
+
- [infra] Fix publish workflow complaint (#19346) @JCQuintas
|
|
200
|
+
- [infra] Migrate to use eslint without airbnb config (#19269) @brijeshb42
|
|
201
|
+
- [infra] Simplify release preparation script (#19351) @michelengelen
|
|
202
|
+
|
|
8
203
|
## 8.10.2
|
|
9
204
|
|
|
10
205
|
_Aug 20, 2025_
|
|
@@ -27,13 +222,13 @@ The following are all team members who have contributed to this release:
|
|
|
27
222
|
- [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
|
|
28
223
|
- [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
|
|
29
224
|
|
|
30
|
-
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
225
|
+
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
226
|
|
|
32
227
|
Same changes as in `@mui/x-data-grid@8.10.2`, plus:
|
|
33
228
|
|
|
34
229
|
- [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
|
|
35
230
|
|
|
36
|
-
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link
|
|
231
|
+
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
37
232
|
|
|
38
233
|
Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
39
234
|
|
|
@@ -43,7 +238,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
|
43
238
|
|
|
44
239
|
Internal changes.
|
|
45
240
|
|
|
46
|
-
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
241
|
+
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
242
|
|
|
48
243
|
Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
49
244
|
|
|
@@ -53,7 +248,7 @@ Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
|
53
248
|
|
|
54
249
|
Internal changes.
|
|
55
250
|
|
|
56
|
-
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
251
|
+
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
57
252
|
|
|
58
253
|
Same changes as in `@mui/x-charts@8.10.2`.
|
|
59
254
|
|
|
@@ -63,7 +258,7 @@ Same changes as in `@mui/x-charts@8.10.2`.
|
|
|
63
258
|
|
|
64
259
|
- [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
|
|
65
260
|
|
|
66
|
-
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
261
|
+
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
262
|
|
|
68
263
|
Same changes as in `@mui/x-tree-view@8.10.2`.
|
|
69
264
|
|
|
@@ -95,13 +290,13 @@ Internal changes.
|
|
|
95
290
|
|
|
96
291
|
_Aug 15, 2025_
|
|
97
292
|
|
|
98
|
-
We'd like to extend a big thank you to the
|
|
293
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
99
294
|
|
|
100
295
|
- 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
|
|
101
296
|
- 📚 Documentation improvements
|
|
102
297
|
|
|
103
298
|
The following are all team members who have contributed to this release:
|
|
104
|
-
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
|
|
299
|
+
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk, @brijeshb42, @noraleonte, @rita-codes
|
|
105
300
|
|
|
106
301
|
### Data Grid
|
|
107
302
|
|
|
@@ -110,12 +305,14 @@ The following are all team members who have contributed to this release:
|
|
|
110
305
|
- [DataGrid] Fix scroll jumping (#19156) @romgrk
|
|
111
306
|
- [DataGrid] Fix scroll restoration (#19182) @romgrk
|
|
112
307
|
- [DataGrid] Fix "no row with id" error (#19193) @romgrk
|
|
308
|
+
- [DataGrid] Fix missing rows in the print export window (#19159) @cherniavskii
|
|
309
|
+
- [DataGrid] Fix broken scroll (#19178) @romgrk
|
|
113
310
|
|
|
114
|
-
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
311
|
+
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
115
312
|
|
|
116
313
|
Same changes as in `@mui/x-data-grid@8.10.1`.
|
|
117
314
|
|
|
118
|
-
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link
|
|
315
|
+
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
119
316
|
|
|
120
317
|
Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
121
318
|
|
|
@@ -125,7 +322,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
|
125
322
|
|
|
126
323
|
Internal changes.
|
|
127
324
|
|
|
128
|
-
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link
|
|
325
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
129
326
|
|
|
130
327
|
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
131
328
|
|
|
@@ -141,8 +338,10 @@ Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
|
141
338
|
- [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
|
|
142
339
|
- [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
|
|
143
340
|
- [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
|
|
341
|
+
- [charts] Add demo for log-scale ticks without labels (#19152) @bernardobelchior
|
|
342
|
+
- [charts] Update animation customization docs (#19185) @bernardobelchior
|
|
144
343
|
|
|
145
|
-
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
344
|
+
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
146
345
|
|
|
147
346
|
Same changes as in `@mui/x-charts@8.10.1`.
|
|
148
347
|
|
|
@@ -150,9 +349,10 @@ Same changes as in `@mui/x-charts@8.10.1`.
|
|
|
150
349
|
|
|
151
350
|
#### `@mui/x-tree-view@8.10.1`
|
|
152
351
|
|
|
153
|
-
|
|
352
|
+
- [tree view] Fix root not loading from cache on remount (#19088) @noraleonte
|
|
353
|
+
- [tree view] Don't overwrite childrenIds when collapsed to preserve indeterminate state of the parent (#19196) @rita-codes
|
|
154
354
|
|
|
155
|
-
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
355
|
+
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
156
356
|
|
|
157
357
|
Same changes as in `@mui/x-tree-view@8.10.1`.
|
|
158
358
|
|
|
@@ -182,6 +382,7 @@ Internal changes.
|
|
|
182
382
|
- [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
|
|
183
383
|
- [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
|
|
184
384
|
- [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
|
|
385
|
+
- [code-infra] Migrate build command to code-infra (#19006) @brijeshb42
|
|
185
386
|
- [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
|
|
186
387
|
- [internal] Fix writing style action name @oliviertassinari
|
|
187
388
|
- [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
|
|
@@ -54,6 +54,7 @@ type RequiredAPI = Dimensions.API & AbstractAPI;
|
|
|
54
54
|
declare function useVirtualization(store: Store<BaseState>, params: VirtualizerParams, api: RequiredAPI): {
|
|
55
55
|
getters: {
|
|
56
56
|
setPanels: React.Dispatch<React.SetStateAction<Readonly<Map<any, React.ReactNode>>>>;
|
|
57
|
+
getOffsetTop: () => number;
|
|
57
58
|
getRows: (rowParams?: {
|
|
58
59
|
rows?: RowEntry[];
|
|
59
60
|
position?: PinnedRowPosition;
|
|
@@ -93,6 +93,7 @@ function useVirtualization(store, params, api) {
|
|
|
93
93
|
const renderContext = useStore(store, selectors.renderContext);
|
|
94
94
|
const enabledForRows = useStore(store, selectors.enabledForRows);
|
|
95
95
|
const enabledForColumns = useStore(store, selectors.enabledForColumns);
|
|
96
|
+
const rowsMeta = useStore(store, Dimensions.selectors.rowsMeta);
|
|
96
97
|
const contentHeight = useStore(store, Dimensions.selectors.contentHeight);
|
|
97
98
|
|
|
98
99
|
/*
|
|
@@ -215,6 +216,9 @@ function useVirtualization(store, params, api) {
|
|
|
215
216
|
onScrollChange?.(scrollPosition.current, nextRenderContext);
|
|
216
217
|
}
|
|
217
218
|
});
|
|
219
|
+
const getOffsetTop = () => {
|
|
220
|
+
return rowsMeta.positions[renderContext.firstRowIndex] ?? 0;
|
|
221
|
+
};
|
|
218
222
|
|
|
219
223
|
/**
|
|
220
224
|
* HACK: unstable_rowTree fixes the issue described below, but does it by tightly coupling this
|
|
@@ -437,6 +441,7 @@ function useVirtualization(store, params, api) {
|
|
|
437
441
|
};
|
|
438
442
|
const getters = {
|
|
439
443
|
setPanels,
|
|
444
|
+
getOffsetTop,
|
|
440
445
|
getRows,
|
|
441
446
|
getContainerProps: () => ({
|
|
442
447
|
ref: refSetter('container')
|
package/esm/index.js
CHANGED
package/esm/useVirtualizer.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare const useVirtualizer: (params: VirtualizerParams) => {
|
|
|
113
113
|
} & {
|
|
114
114
|
getters: {
|
|
115
115
|
setPanels: React.Dispatch<React.SetStateAction<Readonly<Map<any, React.ReactNode>>>>;
|
|
116
|
+
getOffsetTop: () => number;
|
|
116
117
|
getRows: (rowParams?: {
|
|
117
118
|
rows?: RowEntry[];
|
|
118
119
|
position?: import("./models/index.js").PinnedRowPosition;
|
|
@@ -54,6 +54,7 @@ type RequiredAPI = Dimensions.API & AbstractAPI;
|
|
|
54
54
|
declare function useVirtualization(store: Store<BaseState>, params: VirtualizerParams, api: RequiredAPI): {
|
|
55
55
|
getters: {
|
|
56
56
|
setPanels: React.Dispatch<React.SetStateAction<Readonly<Map<any, React.ReactNode>>>>;
|
|
57
|
+
getOffsetTop: () => number;
|
|
57
58
|
getRows: (rowParams?: {
|
|
58
59
|
rows?: RowEntry[];
|
|
59
60
|
position?: PinnedRowPosition;
|
|
@@ -102,6 +102,7 @@ function useVirtualization(store, params, api) {
|
|
|
102
102
|
const renderContext = (0, _store.useStore)(store, selectors.renderContext);
|
|
103
103
|
const enabledForRows = (0, _store.useStore)(store, selectors.enabledForRows);
|
|
104
104
|
const enabledForColumns = (0, _store.useStore)(store, selectors.enabledForColumns);
|
|
105
|
+
const rowsMeta = (0, _store.useStore)(store, _dimensions.Dimensions.selectors.rowsMeta);
|
|
105
106
|
const contentHeight = (0, _store.useStore)(store, _dimensions.Dimensions.selectors.contentHeight);
|
|
106
107
|
|
|
107
108
|
/*
|
|
@@ -224,6 +225,9 @@ function useVirtualization(store, params, api) {
|
|
|
224
225
|
onScrollChange?.(scrollPosition.current, nextRenderContext);
|
|
225
226
|
}
|
|
226
227
|
});
|
|
228
|
+
const getOffsetTop = () => {
|
|
229
|
+
return rowsMeta.positions[renderContext.firstRowIndex] ?? 0;
|
|
230
|
+
};
|
|
227
231
|
|
|
228
232
|
/**
|
|
229
233
|
* HACK: unstable_rowTree fixes the issue described below, but does it by tightly coupling this
|
|
@@ -446,6 +450,7 @@ function useVirtualization(store, params, api) {
|
|
|
446
450
|
};
|
|
447
451
|
const getters = {
|
|
448
452
|
setPanels,
|
|
453
|
+
getOffsetTop,
|
|
449
454
|
getRows,
|
|
450
455
|
getContainerProps: () => ({
|
|
451
456
|
ref: refSetter('container')
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-virtualizer",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "MUI virtualization library",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@babel/runtime": "^7.28.2",
|
|
31
31
|
"@mui/utils": "^7.3.1",
|
|
32
|
-
"@mui/x-internals": "8.
|
|
32
|
+
"@mui/x-internals": "8.11.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"types": "./index.d.ts",
|
|
49
49
|
"default": "./index.js"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"default": {
|
|
52
52
|
"types": "./esm/index.d.ts",
|
|
53
53
|
"default": "./esm/index.js"
|
|
54
54
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"types": "./useVirtualizer.d.ts",
|
|
59
59
|
"default": "./useVirtualizer.js"
|
|
60
60
|
},
|
|
61
|
-
"
|
|
61
|
+
"default": {
|
|
62
62
|
"types": "./esm/useVirtualizer.d.ts",
|
|
63
63
|
"default": "./esm/useVirtualizer.js"
|
|
64
64
|
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"types": "./*/index.d.ts",
|
|
69
69
|
"default": "./*/index.js"
|
|
70
70
|
},
|
|
71
|
-
"
|
|
71
|
+
"default": {
|
|
72
72
|
"types": "./esm/*/index.d.ts",
|
|
73
73
|
"default": "./esm/*/index.js"
|
|
74
74
|
}
|
package/useVirtualizer.d.ts
CHANGED
|
@@ -113,6 +113,7 @@ export declare const useVirtualizer: (params: VirtualizerParams) => {
|
|
|
113
113
|
} & {
|
|
114
114
|
getters: {
|
|
115
115
|
setPanels: React.Dispatch<React.SetStateAction<Readonly<Map<any, React.ReactNode>>>>;
|
|
116
|
+
getOffsetTop: () => number;
|
|
116
117
|
getRows: (rowParams?: {
|
|
117
118
|
rows?: RowEntry[];
|
|
118
119
|
position?: import("./models/index.js").PinnedRowPosition;
|