You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -197,8 +198,14 @@ export default function App() {
197
198
<td><code>Function</code></td>
198
199
<td><code> () => null</code></td>
199
200
<td><code>true</code></td>
200
-
<td>Its used for defining how each individual item should appear, it allows utilizing the item's properties to construct a custom layout or UI for that item within the grid.</td>
201
+
<td>Defines how each individual item should appear, it allows utilizing the item's properties to construct a custom layout or UI for that item within the grid.</td>
201
202
</tr>
203
+
<td><code>keyExtractor</code></td>
204
+
<td><code>(item, index) => string</code></td>
205
+
<td><code>Function</code></td>
206
+
<td><code>false</code></td>
207
+
<td> Defines a function that extracts a unique key for a given item in the list. By default, the <code>keyExtractor</code> uses the item's index in the array as the key. This is crucial for optimizing the rendering and re-rendering of list items by providing a stable identity. The function receives an item from the data array and its index, and should return a unique string. Providing a custom <code>keyExtractor</code> is recommended when the items have a unique identifier other than the index, especially in cases where the list's order might change, or items are dynamically added or removed, to ensure consistent and efficient updates. </td>
208
+
</tr>
202
209
<tr>
203
210
<td><code>maxColumnRatioUnits</code></td>
204
211
<td><code>Number</code></td>
@@ -243,7 +250,7 @@ While, a lower buffer factor reduces the off-screen component count, optimizing
243
250
<td><code>Number</code></td>
244
251
<td><code>200</code></td>
245
252
<td><code>false</code></td>
246
-
<td>Specifies the interval, in milliseconds, at which scroll events are processed for the purpose of recalculating visible items and buffer in a virtualized grid. By setting this prop, developers can throttle the frequency of scroll event handling, optimizing performance during rapid scrolling by reducing the computational load associated with updating the list of visible items and buffer.
253
+
<td>Defines the interval, in milliseconds, at which scroll events are processed for the purpose of recalculating visible items and buffer in a virtualized grid. By setting this prop, developers can throttle the frequency of scroll event handling, optimizing performance during rapid scrolling by reducing the computational load associated with updating the list of visible items and buffer.
247
254
248
255
A lower value results in more frequent updates, offering smoother visual updates of the grid's content at the potential cost of higher computational overhead. While, a higher interval decreases the frequency of updates, potentially improving performance but with less immediate recalculation triggered by scroll actions. This is crucial for fine-tuning the performance and experience of virtualized grid.
249
256
</td>
@@ -269,6 +276,36 @@ A lower value results in more frequent updates, offering smoother visual updates
269
276
<td><code>false</code></td>
270
277
<td> Accepts a React Native <code>ViewStyle</code> object. This applies to the container of each item in the grid layout and can be used to create a gap between each grid item with padding, apply background color, etc. </td>
271
278
</tr>
279
+
280
+
<tr>
281
+
<td><code>onHorizontalEndReached</code></td>
282
+
<td><code>() => void</code></td>
283
+
<td><code>undefined</code></td>
284
+
<td><code>false</code></td>
285
+
<td>Defines a callback function that is called when the horizontal scroll position reaches the <code>onHorizontalEndReachedThreshold</code>. Useful for loading more data as the user scrolls horizontally.</td>
<td>Defines the threshold for triggering <code>onHorizontalEndReached</code>. Represented as a fraction of the total width of the scrollable grid, indicating how far from the end the horizontal scroll must be to trigger the event.</td>
293
+
</tr>
294
+
<tr>
295
+
<td><code>onVerticalEndReached</code></td>
296
+
<td><code>() => void</code></td>
297
+
<td><code>undefined</code></td>
298
+
<td><code>false</code></td>
299
+
<td>Defines a callback function that is called when the vertical scroll position reaches the <code>onVerticalEndReachedThreshold</code>. Useful for loading more data as the user scrolls vertically.</td>
<td>Defines the threshold for triggering <code>onVerticalEndReached</code>. Represented as a fraction of the total height of the scrollable grid, indicating how far from the end the vertical scroll must be to trigger the event.</td>
307
+
</tr>
308
+
272
309
</tbody>
273
310
</table>
274
311
@@ -300,8 +337,15 @@ A lower value results in more frequent updates, offering smoother visual updates
300
337
<td><code>Function</code></td>
301
338
<td><code> () => null</code></td>
302
339
<td><code>true</code></td>
303
-
<td>Its used for defining how each individual item should appear, it allows utilizing the item's properties to construct a custom layout or UI for that item within the grid.</td>
340
+
<td>Defines how each individual item should appear, it allows utilizing the item's properties to construct a custom layout or UI for that item within the grid.</td>
304
341
</tr>
342
+
<tr>
343
+
<td><code>keyExtractor</code></td>
344
+
<td><code>(item, index) => string</code></td>
345
+
<td><code>Function</code></td>
346
+
<td><code>false</code></td>
347
+
<td> Defines a function that extracts a unique key for a given item in the list. By default, the <code>keyExtractor</code> uses the item's index in the array as the key. This is crucial for optimizing the rendering and re-rendering of list items by providing a stable identity. The function receives an item from the data array and its index, and should return a unique string. Providing a custom <code>keyExtractor</code> is recommended when the items have a unique identifier other than the index, especially in cases where the list's order might change, or items are dynamically added or removed, to ensure consistent and efficient updates. </td>
348
+
</tr>
305
349
<tr>
306
350
<td><code>maxItemsPerColumn</code></td>
307
351
<td><code>Number</code></td>
@@ -314,7 +358,7 @@ A lower value results in more frequent updates, offering smoother visual updates
<td> Specifies the base unit height for items within the grid. This value serves as a foundational measure to determine the actual height of each grid item. The item's final height is calculated by multiplying this base unit height (<code>itemUnitHeight</code>) by the item's heightRatio, allowing for proportional scaling of items based on their content or design requirements. While <code>widthRatio</code> affects the item's width in relation to the column width, <code>itemUnitHeight</code> and <code>heightRatio</code> together define the item's vertical dimension, enabling dynamic grid layouts that adapt seamlessly to varying content sizes.</td>
361
+
<td> Defines the base unit height for items within the grid. This value serves as a foundational measure to determine the actual height of each grid item. The item's final height is calculated by multiplying this base unit height (<code>itemUnitHeight</code>) by the item's heightRatio, allowing for proportional scaling of items based on their content or design requirements. While <code>widthRatio</code> affects the item's width in relation to the column width, <code>itemUnitHeight</code> and <code>heightRatio</code> together define the item's vertical dimension, enabling dynamic grid layouts that adapt seamlessly to varying content sizes.</td>
318
362
</tr>
319
363
<tr>
320
364
<td><code>virtualization</code></td>
@@ -346,7 +390,7 @@ While, a lower buffer factor reduces the off-screen component count, optimizing
346
390
<td><code>Number</code></td>
347
391
<td><code>200</code></td>
348
392
<td><code>false</code></td>
349
-
<td>Specifies the interval, in milliseconds, at which scroll events are processed for the purpose of recalculating visible items and buffer in a virtualized grid. By setting this prop, developers can throttle the frequency of scroll event handling, optimizing performance during rapid scrolling by reducing the computational load associated with updating the list of visible items and buffer.
393
+
<td>Defines the interval, in milliseconds, at which scroll events are processed for the purpose of recalculating visible items and buffer in a virtualized grid. By setting this prop, developers can throttle the frequency of scroll event handling, optimizing performance during rapid scrolling by reducing the computational load associated with updating the list of visible items and buffer.
350
394
351
395
A lower value results in more frequent updates, offering smoother visual updates of the grid's content at the potential cost of higher computational overhead. While, a higher interval decreases the frequency of updates, potentially improving performance but with less immediate recalculation triggered by scroll actions. This is crucial for fine-tuning the performance and experience of virtualized grid.
352
396
</td>
@@ -372,6 +416,21 @@ A lower value results in more frequent updates, offering smoother visual updates
372
416
<td><code>false</code></td>
373
417
<td> Accepts a React Native <code>ViewStyle</code> object. This applies to the container of each item in the grid layout and can be used to create a gap between each grid item with padding, apply background color, etc. </td>
374
418
</tr>
419
+
<tr>
420
+
<td><code>onEndReached</code></td>
421
+
<td><code>() => void</code></td>
422
+
<td><code>undefined</code></td>
423
+
<td><code>false</code></td>
424
+
<td> Defines a callback function that is triggered when the scroll reaches near the end of the scrollable grid. Useful for loading more data as the user scrolls horizontally </td>
425
+
</tr>
426
+
<tr>
427
+
<td><code>onEndReachedThreshold</code></td>
428
+
<td><code>number</code></td>
429
+
<td><code>0.5</code></td>
430
+
<td><code>false</code></td>
431
+
<td> Defines the distance from the end of the content at which <code>onEndReached</code> should be triggered, expressed as a proportion of the total content length. For example, a value of <code>0.1</code> triggers the callback when the user has scrolled to within 10% of the end of the content. </td>
0 commit comments