react-window 2.0.0-alpha.3 → 2.0.0-alpha.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/dist/react-window.cjs +1 -1
- package/dist/react-window.d.ts +38 -16
- package/dist/react-window.js +354 -331
- package/docs/assets/index-BsBvdJUI.css +1 -0
- package/docs/assets/{index-C0dH_qJq.js → index-DcPBnht2.js} +16 -16
- package/docs/generated/js-docs/Grid.json +28 -1
- package/docs/generated/js-docs/List.json +77 -50
- package/docs/index.html +2 -2
- package/docs/stats.html +1 -1
- package/package.json +1 -1
- package/docs/assets/index-DuD8RcK_.css +0 -1
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
},
|
|
199
199
|
"gridRef": {
|
|
200
200
|
"defaultValue": null,
|
|
201
|
-
"description": "Ref used to interact with this component's imperative API.\n\nThis API has imperative methods for scrolling and a getter for the outermost DOM element.\n\n⚠️ The `useGridRef`
|
|
201
|
+
"description": "Ref used to interact with this component's imperative API.\n\nThis API has imperative methods for scrolling and a getter for the outermost DOM element.\n\n⚠️ The `useGridRef` and `useGridCallbackRef` hooks are exported for convenience use in TypeScript projects.",
|
|
202
202
|
"name": "gridRef",
|
|
203
203
|
"declarations": [
|
|
204
204
|
{
|
|
@@ -262,6 +262,33 @@
|
|
|
262
262
|
]
|
|
263
263
|
}
|
|
264
264
|
},
|
|
265
|
+
"onResize": {
|
|
266
|
+
"defaultValue": null,
|
|
267
|
+
"description": "Callback notified when the Grid's outermost HTMLElement resizes.\nThis may be used to (re)scroll a cell into view.",
|
|
268
|
+
"name": "onResize",
|
|
269
|
+
"declarations": [
|
|
270
|
+
{
|
|
271
|
+
"fileName": "react-window/lib/components/grid/types.ts",
|
|
272
|
+
"name": "TypeLiteral"
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"required": false,
|
|
276
|
+
"type": {
|
|
277
|
+
"name": "enum",
|
|
278
|
+
"raw": "((size: { height: number; width: number; }, prevSize: { height: number; width: number; }) => void) | undefined",
|
|
279
|
+
"value": [
|
|
280
|
+
{
|
|
281
|
+
"value": "undefined"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"value": "(size: { height: number; width: number; }, prevSize: { height: number; width: number; }) => void",
|
|
285
|
+
"description": "",
|
|
286
|
+
"fullComment": "",
|
|
287
|
+
"tags": {}
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
},
|
|
265
292
|
"overscanCount": {
|
|
266
293
|
"defaultValue": {
|
|
267
294
|
"value": "3"
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
"listRef": {
|
|
102
102
|
"defaultValue": null,
|
|
103
|
-
"description": "Ref used to interact with this component's imperative API.\n\nThis API has imperative methods for scrolling and a getter for the outermost DOM element.\n\n⚠️ The `useListRef`
|
|
103
|
+
"description": "Ref used to interact with this component's imperative API.\n\nThis API has imperative methods for scrolling and a getter for the outermost DOM element.\n\n⚠️ The `useListRef` and `useListCallbackRef` hooks are exported for convenience use in TypeScript projects.",
|
|
104
104
|
"name": "listRef",
|
|
105
105
|
"declarations": [
|
|
106
106
|
{
|
|
@@ -137,67 +137,90 @@
|
|
|
137
137
|
]
|
|
138
138
|
}
|
|
139
139
|
},
|
|
140
|
-
"
|
|
140
|
+
"onResize": {
|
|
141
141
|
"defaultValue": null,
|
|
142
|
-
"description": "
|
|
143
|
-
"name": "
|
|
142
|
+
"description": "Callback notified when the List's outermost HTMLElement resizes.\nThis may be used to (re)scroll a row into view.",
|
|
143
|
+
"name": "onResize",
|
|
144
144
|
"declarations": [
|
|
145
145
|
{
|
|
146
146
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
147
147
|
"name": "TypeLiteral"
|
|
148
148
|
}
|
|
149
149
|
],
|
|
150
|
-
"required":
|
|
150
|
+
"required": false,
|
|
151
151
|
"type": {
|
|
152
|
-
"name": "
|
|
152
|
+
"name": "enum",
|
|
153
|
+
"raw": "((size: { height: number; width: number; }, prevSize: { height: number; width: number; }) => void) | undefined",
|
|
154
|
+
"value": [
|
|
155
|
+
{
|
|
156
|
+
"value": "undefined"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"value": "(size: { height: number; width: number; }, prevSize: { height: number; width: number; }) => void",
|
|
160
|
+
"description": "",
|
|
161
|
+
"fullComment": "",
|
|
162
|
+
"tags": {}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
153
165
|
}
|
|
154
166
|
},
|
|
155
|
-
"
|
|
167
|
+
"onRowsRendered": {
|
|
156
168
|
"defaultValue": null,
|
|
157
|
-
"description": "
|
|
158
|
-
"name": "
|
|
169
|
+
"description": "Callback notified when the range of visible rows changes.",
|
|
170
|
+
"name": "onRowsRendered",
|
|
159
171
|
"declarations": [
|
|
160
172
|
{
|
|
161
173
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
162
174
|
"name": "TypeLiteral"
|
|
163
175
|
}
|
|
164
176
|
],
|
|
165
|
-
"required":
|
|
177
|
+
"required": false,
|
|
166
178
|
"type": {
|
|
167
|
-
"name": "
|
|
179
|
+
"name": "enum",
|
|
180
|
+
"raw": "((args: { startIndex: number; stopIndex: number; }) => void) | undefined",
|
|
181
|
+
"value": [
|
|
182
|
+
{
|
|
183
|
+
"value": "undefined"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"value": "(args: { startIndex: number; stopIndex: number; }) => void",
|
|
187
|
+
"description": "",
|
|
188
|
+
"fullComment": "",
|
|
189
|
+
"tags": {}
|
|
190
|
+
}
|
|
191
|
+
]
|
|
168
192
|
}
|
|
169
193
|
},
|
|
170
|
-
"
|
|
171
|
-
"defaultValue":
|
|
172
|
-
|
|
173
|
-
|
|
194
|
+
"overscanCount": {
|
|
195
|
+
"defaultValue": {
|
|
196
|
+
"value": "3"
|
|
197
|
+
},
|
|
198
|
+
"description": "How many additional rows to render outside of the visible area.\nThis can reduce visual flickering near the edges of a list when scrolling.",
|
|
199
|
+
"name": "overscanCount",
|
|
174
200
|
"declarations": [
|
|
175
201
|
{
|
|
176
202
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
177
203
|
"name": "TypeLiteral"
|
|
178
204
|
}
|
|
179
205
|
],
|
|
180
|
-
"required":
|
|
206
|
+
"required": false,
|
|
181
207
|
"type": {
|
|
182
208
|
"name": "enum",
|
|
183
|
-
"raw": "number |
|
|
209
|
+
"raw": "number | undefined",
|
|
184
210
|
"value": [
|
|
185
211
|
{
|
|
186
|
-
"value": "
|
|
212
|
+
"value": "undefined"
|
|
187
213
|
},
|
|
188
214
|
{
|
|
189
|
-
"value": "
|
|
190
|
-
"description": "",
|
|
191
|
-
"fullComment": "",
|
|
192
|
-
"tags": {}
|
|
215
|
+
"value": "number"
|
|
193
216
|
}
|
|
194
217
|
]
|
|
195
218
|
}
|
|
196
219
|
},
|
|
197
|
-
"
|
|
220
|
+
"rowComponent": {
|
|
198
221
|
"defaultValue": null,
|
|
199
|
-
"description": "
|
|
200
|
-
"name": "
|
|
222
|
+
"description": "React component responsible for rendering a row.\n\nThis component will receive an `index` and `style` prop by default.\nAdditionally it will receive prop values passed to `rowProps`.\n\n⚠️ The prop types for this component are exported as `RowComponentProps`",
|
|
223
|
+
"name": "rowComponent",
|
|
201
224
|
"declarations": [
|
|
202
225
|
{
|
|
203
226
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
@@ -206,29 +229,44 @@
|
|
|
206
229
|
],
|
|
207
230
|
"required": true,
|
|
208
231
|
"type": {
|
|
209
|
-
"name": "
|
|
232
|
+
"name": "(props: { index: number; style: CSSProperties; } & RowProps) => ReactNode"
|
|
210
233
|
}
|
|
211
234
|
},
|
|
212
|
-
"
|
|
235
|
+
"rowCount": {
|
|
213
236
|
"defaultValue": null,
|
|
214
|
-
"description": "
|
|
215
|
-
"name": "
|
|
237
|
+
"description": "Number of items to be rendered in the list.",
|
|
238
|
+
"name": "rowCount",
|
|
216
239
|
"declarations": [
|
|
217
240
|
{
|
|
218
241
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
219
242
|
"name": "TypeLiteral"
|
|
220
243
|
}
|
|
221
244
|
],
|
|
222
|
-
"required":
|
|
245
|
+
"required": true,
|
|
246
|
+
"type": {
|
|
247
|
+
"name": "number"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"rowHeight": {
|
|
251
|
+
"defaultValue": null,
|
|
252
|
+
"description": "Row height (in pixels) or a function that returns a row height (in pixels) given its index and `rowProps` data.",
|
|
253
|
+
"name": "rowHeight",
|
|
254
|
+
"declarations": [
|
|
255
|
+
{
|
|
256
|
+
"fileName": "react-window/lib/components/list/types.ts",
|
|
257
|
+
"name": "TypeLiteral"
|
|
258
|
+
}
|
|
259
|
+
],
|
|
260
|
+
"required": true,
|
|
223
261
|
"type": {
|
|
224
262
|
"name": "enum",
|
|
225
|
-
"raw": "((
|
|
263
|
+
"raw": "number | ((index: number, rowProps: RowProps) => number)",
|
|
226
264
|
"value": [
|
|
227
265
|
{
|
|
228
|
-
"value": "
|
|
266
|
+
"value": "number"
|
|
229
267
|
},
|
|
230
268
|
{
|
|
231
|
-
"value": "(
|
|
269
|
+
"value": "(index: number, rowProps: RowProps) => number",
|
|
232
270
|
"description": "",
|
|
233
271
|
"fullComment": "",
|
|
234
272
|
"tags": {}
|
|
@@ -236,30 +274,19 @@
|
|
|
236
274
|
]
|
|
237
275
|
}
|
|
238
276
|
},
|
|
239
|
-
"
|
|
240
|
-
"defaultValue":
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"description": "How many additional rows to render outside of the visible area.\nThis can reduce visual flickering near the edges of a list when scrolling.",
|
|
244
|
-
"name": "overscanCount",
|
|
277
|
+
"rowProps": {
|
|
278
|
+
"defaultValue": null,
|
|
279
|
+
"description": "Additional props to be passed to the rowComponent.\n\n⚠️ This object must not contain either an `index` or `style` prop.",
|
|
280
|
+
"name": "rowProps",
|
|
245
281
|
"declarations": [
|
|
246
282
|
{
|
|
247
283
|
"fileName": "react-window/lib/components/list/types.ts",
|
|
248
284
|
"name": "TypeLiteral"
|
|
249
285
|
}
|
|
250
286
|
],
|
|
251
|
-
"required":
|
|
287
|
+
"required": true,
|
|
252
288
|
"type": {
|
|
253
|
-
"name": "
|
|
254
|
-
"raw": "number | undefined",
|
|
255
|
-
"value": [
|
|
256
|
-
{
|
|
257
|
-
"value": "undefined"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"value": "number"
|
|
261
|
-
}
|
|
262
|
-
]
|
|
289
|
+
"name": "ExcludeForbiddenKeys<RowProps>"
|
|
263
290
|
}
|
|
264
291
|
}
|
|
265
292
|
}
|
package/docs/index.html
CHANGED
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
/>
|
|
21
21
|
<meta property="og:image:width" content="1500" />
|
|
22
22
|
<meta property="og:image:height" content="500" />
|
|
23
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
23
|
+
<script type="module" crossorigin src="/assets/index-DcPBnht2.js"></script>
|
|
24
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BsBvdJUI.css">
|
|
25
25
|
</head>
|
|
26
26
|
<body>
|
|
27
27
|
<div id="root"></div>
|