Skip to content

Commit 65a81e4

Browse files
committed
docs: add startItem doc
1 parent 8366177 commit 65a81e4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/api/virtualizer.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ getItemKey?: (index: number) => Key
138138

139139
This function is passed the index of each item and should return a unique key for that item. The default functionality of this function is to return the index of the item, but you should override this when possible to return a unique identifier for each item across the entire set. This function should be memoized to prevent unnecessary re-renders.
140140

141+
### `startItem`
142+
143+
```ts
144+
startItem?: (index: number) => number
145+
```
146+
147+
This optional function is called when you need specials gaps between your items. This measurement should return the left or top of the item depending on `horizontal`. Useful when you know your layouts in advance.
148+
141149
### `rangeExtractor`
142150

143151
```tsx

0 commit comments

Comments
 (0)