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
Copy file name to clipboardExpand all lines: docs/api.md
+3-6Lines changed: 3 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -241,8 +241,7 @@ It also ensures that the scroll event is propagated properly to parent ScrollVie
241
241
|`data`|`Array<T>`| The array of data items to render. ⚠️ You should memoize this array for maximum performance. A costly memo depends on it. |
242
242
|`renderItem`|`(args: { item: T }) => JSX.Element`| A function that returns the JSX element to render for each item in the data array. The function receives an object with the item as a parameter. |
243
243
|`itemSize`|`number \| ((item: T) => number)`| In case you specify a number it will behave like this : ff vertical, the height of an item; otherwise, the width. You can also specify a function which needs to return for each item of `data` its size in pixel in order for the list to handle various item sizes. ⚠️ You should memoize this function for maximal performances. An important memo depends on it. |
244
-
|`numberOfRenderedItems`|`number`| The number of items to be rendered (virtualization size). ⚠️ It must be at least equal to `numberOfItemsVisibleOnScreen +2` or when using jump-on-scroll : `(2 * numberOfItemsVisibleOnScreen) + 1` to ensure correct rendering. |
245
-
|`numberOfItemsVisibleOnScreen`|`number`| The number of items visible on the screen. This helps determine how to slice the data and when to stop the scroll at the end of the list. |
244
+
|`additionalItemsRendered`|`number`| Optional : The number of items to be rendered (virtualization size) additionally to the elements visible on screen. Base value is 4 for `stick-to-start` and `stick-to-end` scrolls, and twice the number of elements visible for `jump-on-scroll`. |
246
245
|`onEndReached`|`() => void`| An optional callback function that is called when the user reaches the end of the list. Helps with pagination. |
247
246
|`onEndReachedThresholdItemsNumber`|`number`| The number of items left to display before triggering the `onEndReached` callback. Defaults to 3. |
248
247
|`style`|`ViewStyle`| Custom style to be applied to the VirtualizedList container. |
@@ -319,10 +318,9 @@ VirtualizedGrids only support vertical orientation (vertically scrollable), but
319
318
|`renderItem`|`(args: { item: T }) => JSX.Element`| A function that returns the JSX element to render for each item in the data array. The function receives an object with the item as a parameter. |
320
319
|`numberOfColumns`|`Number`| The number of columns in the grid or the number of items per row. |
321
320
|`itemHeight`|`Number`| The height of each item in the grid. |
322
-
|`numberOfRenderedRows`|`Number`|How many rows are rendered (virtualization size). |
321
+
|`additionalRenderedRows`|`Number`|Optional : The number of rows to be rendered (virtualization size) additionally to the rows visible on screen. Base value is 4 for `stick-to-start` and `stick-to-end` scrolls, and twice the number of elements visible for `jump-on-scroll`. |
323
322
|`header`|`JSX.Element`| Optional header component you can provide to display at the top of a virtualized grid. If provided, you also need to provide its size (so that the grid knows how to scroll) |
324
323
|`headerSize`|`Number`| The Size in pixels of the (optionnally) provided header. |
325
-
|`numberOfRowsVisibleOnScreen`|`Number`| How many rows are visible on the screen (helps with knowing how to slice the data and stop the scroll at the end of the list). |
326
324
|`onEndReached`|`() => void`| An optional callback function that is called when the user reaches the end of the list. Helps with pagination. |
327
325
|`onEndReachedThresholdRowsNumber`|`Number`| Number of rows left to display before triggering the onEndReached event. |
328
326
|`style`|`Object`| Used to modify the style of the grid. |
it('handles correctly RIGHT & DOWN and RENDERS new elements accordingly while deleting elements that are too far from scroll when on stick to start scroll',()=>{
it('handles correctly RIGHT & DOWN and RENDERS new elements accordingly while deleting elements that are too far from scroll when on stick to end scroll',()=>{
0 commit comments