@mui/x-virtualizer 0.1.2 → 0.1.4
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 +221 -8
- package/esm/features/dimensions.d.ts +1 -1
- 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 +2 -1
- package/features/dimensions.d.ts +1 -1
- package/features/virtualization.d.ts +1 -0
- package/features/virtualization.js +5 -0
- package/index.js +1 -1
- package/package.json +2 -2
- package/useVirtualizer.d.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,17 +5,224 @@
|
|
|
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.0
|
|
9
|
+
|
|
10
|
+
_Aug 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add new `SankeyChart`
|
|
15
|
+
|
|
16
|
+
<img height="300" alt="Screenshot 2025-07-24 at 12 54 33" src="https://github.com/user-attachments/assets/d77bcec1-044b-48c6-b37d-d7b74793b91c" />
|
|
17
|
+
|
|
18
|
+
- 🚀 Data Grid row grouping now supports row reordering
|
|
19
|
+
|
|
20
|
+
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.
|
|
21
|
+
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
25
|
+
@dwrth, @lauri865, @Webini
|
|
26
|
+
|
|
27
|
+
The following are all team members who have contributed to this release:
|
|
28
|
+
@alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
|
|
29
|
+
|
|
30
|
+
### Data Grid
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid@8.11.0`
|
|
33
|
+
|
|
34
|
+
- [DataGrid] Fix focused column header scroll jump (#19323) @lauri865
|
|
35
|
+
- [DataGrid] Bring `columnUnsortedIcon` slot back (#19268) @arminmeh
|
|
36
|
+
- [DataGrid] Do not add `menu` role to the empty actions menu (#19338) @arminmeh
|
|
37
|
+
- [DataGrid] Fix `columnsManagementRow` style override slot not working (#19097) @dwrth
|
|
38
|
+
- [DataGrid] Fix pagination state synchronization issue (#19290) @MBilalShafi
|
|
39
|
+
- [DataGrid] Fix scroll issue in R17 (#19265) @romgrk
|
|
40
|
+
- [DataGrid] Hide column separator of non-resizable pinned column (#19277) @arminmeh
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid@8.11.0`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPro] Fix column menu sort when `multipleColumnsSortingMode="always"` (#19099) @MBilalShafi
|
|
47
|
+
- [DataGridPro] Keep the drop effect if `keepColumnPositionIfDraggedOutside` is enabled (#19372) @arminmeh
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-data-grid-premium@8.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-data-grid-pro@8.11.0`, plus:
|
|
52
|
+
|
|
53
|
+
- [DataGridPremium] Fix `valueFormatter` issues when `rowGroupingColumnMode="single"` (#18967) @cherniavskii
|
|
54
|
+
- [DataGridPremium] Reordering support for row grouping (#18251) @MBilalShafi
|
|
55
|
+
|
|
56
|
+
### Date and Time Pickers
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers@8.11.0`
|
|
59
|
+
|
|
60
|
+
- [pickers] Fix Firefox bug causing crash when `startContainer` is a restricted object (#18772) @Webini
|
|
61
|
+
- [pickers] RTL not applied correctly for Calendar Systems examples (works in v7.x but broken in latest version) (#19287) @rita-codes
|
|
62
|
+
- [pickers] Use the locale week day on the Luxon adapter (#19230) @flaviendelangle
|
|
63
|
+
- [pickers] Fix display of placeholder when label is shrunk (#19318) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-date-pickers-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-date-pickers@8.11.0`.
|
|
68
|
+
|
|
69
|
+
### Charts
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts@8.11.0`
|
|
72
|
+
|
|
73
|
+
- [charts] Add `RadarAxis` component to render labels (#19240) @alexfauquette
|
|
74
|
+
- [charts] Handle item identifier with data (#19295) @JCQuintas
|
|
75
|
+
- [charts] Refactor optional chaining for props in PieChart, PieChartPro, and ScatterChartPro components (#19292) @sai6855
|
|
76
|
+
- [charts] Remove unused `fill` and `stroke` properties (#19316) @sai6855
|
|
77
|
+
- [charts] Correct `hideLegend` prop description in docs (#19371) @sai6855
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-charts-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-charts@8.11.0`, plus:
|
|
82
|
+
|
|
83
|
+
- [charts-pro] Add new `SankeyChart` (#18895) @JCQuintas
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.11.0`
|
|
88
|
+
|
|
89
|
+
- [tree view] Improve the typing of the item's checkbox `slotProps` (#19247) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.11.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.11.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs][TreeView] Fix grammar and spelling mistakes (#19299) @mapache-salvaje
|
|
104
|
+
- [docs][DataGrid] Add pagination number formatting doc with a demo (#19221) @siriwatknp
|
|
105
|
+
- [docs][Charts] Correct some small grammar mistakes (#19297) @mapache-salvaje
|
|
106
|
+
- [docs][DataGrid] Correct grammar mistakes (#19298) @mapache-salvaje
|
|
107
|
+
- [docs][DataGrid] Make it clear that the API key for AI Assistant must be private (#19244) @oliviertassinari
|
|
108
|
+
|
|
109
|
+
### Core
|
|
110
|
+
|
|
111
|
+
- [code-infra] Remove unnecessary triggers from publish workflow (#19348) @Janpot
|
|
112
|
+
- [code-infra] Set up publishing from GitHub actions (#19264) @Janpot
|
|
113
|
+
- [code-infra] Update renovate, exclude infra packages from MUI group (#19288) @Janpot
|
|
114
|
+
- [internal] Add comment for Codspeed triggers (#19302) @oliviertassinari
|
|
115
|
+
- [internal] Fix changelog generation for infra tags (#19266) @oliviertassinari
|
|
116
|
+
- [internal] Remove dead repository field (#19301) @oliviertassinari
|
|
117
|
+
- [internal] Sentence case @oliviertassinari
|
|
118
|
+
- [internal] Update 8.10.1 changelog with missing changes (#19345) @cherniavskii
|
|
119
|
+
- [support-infra] Improve GitHub Action that check PRs labels (#19303) @oliviertassinari
|
|
120
|
+
|
|
121
|
+
### Miscellaneous
|
|
122
|
+
|
|
123
|
+
- [infra] Add `synchronize` to workflow triggers (#19342) @michelengelen
|
|
124
|
+
- [infra] Add charts docs folder in codowner (#19317) @alexfauquette
|
|
125
|
+
- [infra] Fix publish workflow complaint (#19346) @JCQuintas
|
|
126
|
+
- [infra] Migrate to use eslint without airbnb config (#19269) @brijeshb42
|
|
127
|
+
- [infra] Simplify release preparation script (#19351) @michelengelen
|
|
128
|
+
|
|
129
|
+
## 8.10.2
|
|
130
|
+
|
|
131
|
+
_Aug 20, 2025_
|
|
132
|
+
|
|
133
|
+
We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
134
|
+
|
|
135
|
+
- 🌎 Improve Finnish (fi-FI) locale on the Data Grid
|
|
136
|
+
|
|
137
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
138
|
+
@lauri-heinonen-2025-04, @Methuselah96, @sai6855, @wilcoschoneveld
|
|
139
|
+
|
|
140
|
+
The following are all team members who have contributed to this release:
|
|
141
|
+
@alexfauquette, @cherniavskii, @flaviendelangle, @Janpot, @oliviertassinari, @rita-codes
|
|
142
|
+
|
|
143
|
+
### Data Grid
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid@8.10.2`
|
|
146
|
+
|
|
147
|
+
- [DataGrid] Fix display for `<GridEditSingleSelect />` when `density='compact'` (#19249) @sai6855
|
|
148
|
+
- [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
|
|
149
|
+
- [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-data-grid@8.10.2`, plus:
|
|
154
|
+
|
|
155
|
+
- [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
|
|
156
|
+
|
|
157
|
+
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
158
|
+
|
|
159
|
+
Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
160
|
+
|
|
161
|
+
### Date and Time Pickers
|
|
162
|
+
|
|
163
|
+
#### `@mui/x-date-pickers@8.10.2`
|
|
164
|
+
|
|
165
|
+
Internal changes.
|
|
166
|
+
|
|
167
|
+
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
168
|
+
|
|
169
|
+
Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
170
|
+
|
|
171
|
+
### Charts
|
|
172
|
+
|
|
173
|
+
#### `@mui/x-charts@8.10.2`
|
|
174
|
+
|
|
175
|
+
Internal changes.
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-charts@8.10.2`.
|
|
180
|
+
|
|
181
|
+
### Tree View
|
|
182
|
+
|
|
183
|
+
#### `@mui/x-tree-view@8.10.2`
|
|
184
|
+
|
|
185
|
+
- [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
|
|
186
|
+
|
|
187
|
+
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
188
|
+
|
|
189
|
+
Same changes as in `@mui/x-tree-view@8.10.2`.
|
|
190
|
+
|
|
191
|
+
### Codemod
|
|
192
|
+
|
|
193
|
+
#### `@mui/x-codemod@8.10.2`
|
|
194
|
+
|
|
195
|
+
Internal changes.
|
|
196
|
+
|
|
197
|
+
### Docs
|
|
198
|
+
|
|
199
|
+
- [docs] Fix links to the pyramid chart (#19250) @alexfauquette
|
|
200
|
+
|
|
201
|
+
### Core
|
|
202
|
+
|
|
203
|
+
- [internal] Avoid script for CI only @oliviertassinari
|
|
204
|
+
- [internal] Fix `renovate.json` @oliviertassinari
|
|
205
|
+
- [internal] Polish renovate config @oliviertassinari
|
|
206
|
+
- [internal] Rename core to internal (#19203) @oliviertassinari
|
|
207
|
+
- [internal] Update link to GitHub labels @oliviertassinari
|
|
208
|
+
|
|
209
|
+
### Miscellaneous
|
|
210
|
+
|
|
211
|
+
- [code-infra] Prepare for incoming `execa` update (#19229) @Janpot
|
|
212
|
+
- [virtualizer] Fix type import (#19192) @Methuselah96
|
|
213
|
+
- [virtualizer] Improve type export (#19192) @Methuselah96
|
|
214
|
+
|
|
8
215
|
## 8.10.1
|
|
9
216
|
|
|
10
217
|
_Aug 15, 2025_
|
|
11
218
|
|
|
12
|
-
We'd like to extend a big thank you to the
|
|
219
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
13
220
|
|
|
14
221
|
- 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
|
|
15
222
|
- 📚 Documentation improvements
|
|
16
223
|
|
|
17
224
|
The following are all team members who have contributed to this release:
|
|
18
|
-
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
|
|
225
|
+
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk, @brijeshb42, @noraleonte, @rita-codes
|
|
19
226
|
|
|
20
227
|
### Data Grid
|
|
21
228
|
|
|
@@ -24,12 +231,14 @@ The following are all team members who have contributed to this release:
|
|
|
24
231
|
- [DataGrid] Fix scroll jumping (#19156) @romgrk
|
|
25
232
|
- [DataGrid] Fix scroll restoration (#19182) @romgrk
|
|
26
233
|
- [DataGrid] Fix "no row with id" error (#19193) @romgrk
|
|
234
|
+
- [DataGrid] Fix missing rows in the print export window (#19159) @cherniavskii
|
|
235
|
+
- [DataGrid] Fix broken scroll (#19178) @romgrk
|
|
27
236
|
|
|
28
|
-
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
237
|
+
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
29
238
|
|
|
30
239
|
Same changes as in `@mui/x-data-grid@8.10.1`.
|
|
31
240
|
|
|
32
|
-
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link
|
|
241
|
+
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
33
242
|
|
|
34
243
|
Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
35
244
|
|
|
@@ -39,7 +248,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
|
39
248
|
|
|
40
249
|
Internal changes.
|
|
41
250
|
|
|
42
|
-
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link
|
|
251
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
252
|
|
|
44
253
|
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
45
254
|
|
|
@@ -55,8 +264,10 @@ Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
|
55
264
|
- [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
|
|
56
265
|
- [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
|
|
57
266
|
- [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
|
|
267
|
+
- [charts] Add demo for log-scale ticks without labels (#19152) @bernardobelchior
|
|
268
|
+
- [charts] Update animation customization docs (#19185) @bernardobelchior
|
|
58
269
|
|
|
59
|
-
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
270
|
+
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
60
271
|
|
|
61
272
|
Same changes as in `@mui/x-charts@8.10.1`.
|
|
62
273
|
|
|
@@ -64,9 +275,10 @@ Same changes as in `@mui/x-charts@8.10.1`.
|
|
|
64
275
|
|
|
65
276
|
#### `@mui/x-tree-view@8.10.1`
|
|
66
277
|
|
|
67
|
-
|
|
278
|
+
- [tree view] Fix root not loading from cache on remount (#19088) @noraleonte
|
|
279
|
+
- [tree view] Don't overwrite childrenIds when collapsed to preserve indeterminate state of the parent (#19196) @rita-codes
|
|
68
280
|
|
|
69
|
-
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
281
|
+
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
70
282
|
|
|
71
283
|
Same changes as in `@mui/x-tree-view@8.10.1`.
|
|
72
284
|
|
|
@@ -96,6 +308,7 @@ Internal changes.
|
|
|
96
308
|
- [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
|
|
97
309
|
- [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
|
|
98
310
|
- [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
|
|
311
|
+
- [code-infra] Migrate build command to code-infra (#19006) @brijeshb42
|
|
99
312
|
- [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
|
|
100
313
|
- [internal] Fix writing style action name @oliviertassinari
|
|
101
314
|
- [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
|
|
@@ -35,7 +35,7 @@ export declare namespace Dimensions {
|
|
|
35
35
|
declare function initializeState(params: VirtualizerParams): Dimensions.State;
|
|
36
36
|
declare function useDimensions(store: Store<BaseState>, params: VirtualizerParams, _api: {}): {
|
|
37
37
|
updateDimensions: () => void;
|
|
38
|
-
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle
|
|
38
|
+
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle").Cancelable) | undefined;
|
|
39
39
|
rowsMeta: {
|
|
40
40
|
getRowHeight: (rowId: RowId) => any;
|
|
41
41
|
setLastMeasuredRowIndex: (index: number) => void;
|
|
@@ -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
|
@@ -98,7 +98,7 @@ export declare const useVirtualizer: (params: VirtualizerParams) => {
|
|
|
98
98
|
store: Store<Dimensions.State & Virtualization.State & Colspan.State & Rowspan.State>;
|
|
99
99
|
api: {
|
|
100
100
|
updateDimensions: () => void;
|
|
101
|
-
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle
|
|
101
|
+
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle").Cancelable) | undefined;
|
|
102
102
|
rowsMeta: {
|
|
103
103
|
getRowHeight: (rowId: import("./models/index.js").RowId) => any;
|
|
104
104
|
setLastMeasuredRowIndex: (index: number) => void;
|
|
@@ -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;
|
package/features/dimensions.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare namespace Dimensions {
|
|
|
35
35
|
declare function initializeState(params: VirtualizerParams): Dimensions.State;
|
|
36
36
|
declare function useDimensions(store: Store<BaseState>, params: VirtualizerParams, _api: {}): {
|
|
37
37
|
updateDimensions: () => void;
|
|
38
|
-
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle
|
|
38
|
+
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle").Cancelable) | undefined;
|
|
39
39
|
rowsMeta: {
|
|
40
40
|
getRowHeight: (rowId: RowId) => any;
|
|
41
41
|
setLastMeasuredRowIndex: (index: number) => void;
|
|
@@ -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.4",
|
|
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.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
package/useVirtualizer.d.ts
CHANGED
|
@@ -98,7 +98,7 @@ export declare const useVirtualizer: (params: VirtualizerParams) => {
|
|
|
98
98
|
store: Store<Dimensions.State & Virtualization.State & Colspan.State & Rowspan.State>;
|
|
99
99
|
api: {
|
|
100
100
|
updateDimensions: () => void;
|
|
101
|
-
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle
|
|
101
|
+
debouncedUpdateDimensions: ((() => void) & import("@mui/x-internals/throttle").Cancelable) | undefined;
|
|
102
102
|
rowsMeta: {
|
|
103
103
|
getRowHeight: (rowId: import("./models/index.js").RowId) => any;
|
|
104
104
|
setLastMeasuredRowIndex: (index: number) => void;
|
|
@@ -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;
|