react-window 2.0.0-alpha.4 → 2.0.0-alpha.6

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.
@@ -137,67 +137,90 @@
137
137
  ]
138
138
  }
139
139
  },
140
- "rowComponent": {
140
+ "onResize": {
141
141
  "defaultValue": null,
142
- "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`",
143
- "name": "rowComponent",
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": true,
150
+ "required": false,
151
151
  "type": {
152
- "name": "(props: { index: number; style: CSSProperties; } & RowProps) => ReactNode"
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
- "rowCount": {
167
+ "onRowsRendered": {
156
168
  "defaultValue": null,
157
- "description": "Number of items to be rendered in the list.",
158
- "name": "rowCount",
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": true,
177
+ "required": false,
166
178
  "type": {
167
- "name": "number"
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
- "rowHeight": {
171
- "defaultValue": null,
172
- "description": "Row height (in pixels) or a function that returns a row height (in pixels) given its index and `rowProps` data.",
173
- "name": "rowHeight",
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": true,
206
+ "required": false,
181
207
  "type": {
182
208
  "name": "enum",
183
- "raw": "number | ((index: number, rowProps: RowProps) => number)",
209
+ "raw": "number | undefined",
184
210
  "value": [
185
211
  {
186
- "value": "number"
212
+ "value": "undefined"
187
213
  },
188
214
  {
189
- "value": "(index: number, rowProps: RowProps) => number",
190
- "description": "",
191
- "fullComment": "",
192
- "tags": {}
215
+ "value": "number"
193
216
  }
194
217
  ]
195
218
  }
196
219
  },
197
- "rowProps": {
220
+ "rowComponent": {
198
221
  "defaultValue": null,
199
- "description": "Additional props to be passed to the rowComponent.\n\n⚠️ This object must not contain either an `index` or `style` prop.",
200
- "name": "rowProps",
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,47 @@
206
229
  ],
207
230
  "required": true,
208
231
  "type": {
209
- "name": "ExcludeForbiddenKeys<RowProps>"
232
+ "name": "(props: { index: number; style: CSSProperties; } & RowProps) => ReactNode"
210
233
  }
211
234
  },
212
- "onRowsRendered": {
235
+ "rowCount": {
213
236
  "defaultValue": null,
214
- "description": "Callback notified when the range of visible rows changes.",
215
- "name": "onRowsRendered",
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": false,
245
+ "required": true,
246
+ "type": {
247
+ "name": "number"
248
+ }
249
+ },
250
+ "rowHeight": {
251
+ "defaultValue": null,
252
+ "description": "Row height; the following formats are supported:\n- number of pixels (number)\n- percentage of the grid's current height (string)\n- function that returns the row height (in pixels) given an index and `cellProps`",
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": "((args: { startIndex: number; stopIndex: number; }) => void) | undefined",
263
+ "raw": "string | number | ((index: number, cellProps: RowProps) => number)",
226
264
  "value": [
227
265
  {
228
- "value": "undefined"
266
+ "value": "string"
229
267
  },
230
268
  {
231
- "value": "(args: { startIndex: number; stopIndex: number; }) => void",
269
+ "value": "number"
270
+ },
271
+ {
272
+ "value": "(index: number, cellProps: RowProps) => number",
232
273
  "description": "",
233
274
  "fullComment": "",
234
275
  "tags": {}
@@ -236,30 +277,19 @@
236
277
  ]
237
278
  }
238
279
  },
239
- "overscanCount": {
240
- "defaultValue": {
241
- "value": "3"
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",
280
+ "rowProps": {
281
+ "defaultValue": null,
282
+ "description": "Additional props to be passed to the row-rendering component.\nList will automatically re-render rows when values in this object change.\n\n⚠️ This object must not contain either an `index` or `style` prop.",
283
+ "name": "rowProps",
245
284
  "declarations": [
246
285
  {
247
286
  "fileName": "react-window/lib/components/list/types.ts",
248
287
  "name": "TypeLiteral"
249
288
  }
250
289
  ],
251
- "required": false,
290
+ "required": true,
252
291
  "type": {
253
- "name": "enum",
254
- "raw": "number | undefined",
255
- "value": [
256
- {
257
- "value": "undefined"
258
- },
259
- {
260
- "value": "number"
261
- }
262
- ]
292
+ "name": "ExcludeForbiddenKeys<RowProps>"
263
293
  }
264
294
  }
265
295
  }
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-D8tyZCWm.js"></script>
24
- <link rel="stylesheet" crossorigin href="/assets/index-BsBvdJUI.css">
23
+ <script type="module" crossorigin src="/assets/index-DoMrhaC7.js"></script>
24
+ <link rel="stylesheet" crossorigin href="/assets/index-BRVPsmMd.css">
25
25
  </head>
26
26
  <body>
27
27
  <div id="root"></div>