Defined in: src/solid/WindowVirtualizer.tsx:58
Props of WindowVirtualizer.
T
optionalref: (handle?) =>void
Defined in: src/solid/WindowVirtualizer.tsx:62
Get reference to WindowVirtualizerHandle.
void
data: readonly
T[]
Defined in: src/solid/WindowVirtualizer.tsx:66
The data items rendered by this component.
children: (
data,index) =>Element
Defined in: src/solid/WindowVirtualizer.tsx:70
The elements renderer function.
T
Accessor<number>
Element
optionaloverscan:number
Defined in: src/solid/WindowVirtualizer.tsx:75
Number of items to render above/below the visible bounds of the list. Lower value will give better performance but you can increase to avoid showing blank items in fast scrolling.
4
optionalitemSize:number
Defined in: src/solid/WindowVirtualizer.tsx:82
Item size hint for unmeasured items. It will help to reduce scroll jump when items are measured if used properly.
- If not set, initial item sizes will be automatically estimated from measured sizes. This is recommended for most cases.
- If set, you can opt out estimation and use the value as initial item size.
optionalshift:boolean
Defined in: src/solid/WindowVirtualizer.tsx:86
While true is set, scroll position will be maintained from the end not usual start when items are added to/removed from start. It's recommended to set false if you add to/remove from mid/end of the list because it can cause unexpected behavior. This prop is useful for reverse infinite scrolling.
optionalhorizontal:boolean
Defined in: src/solid/WindowVirtualizer.tsx:90
If true, rendered as a horizontally scrollable list. Otherwise rendered as a vertically scrollable list.
optionalcache:CacheSnapshot
Defined in: src/solid/WindowVirtualizer.tsx:96
You can restore cache by passing a CacheSnapshot on mount. This is useful when you want to restore scroll position after navigation. The snapshot can be obtained from WindowVirtualizerHandle.cache.
The length of items should be the same as when you take the snapshot, otherwise restoration may not work as expected.
optionalonScroll: () =>void
Defined in: src/solid/WindowVirtualizer.tsx:100
Callback invoked whenever scroll offset changes.
void
optionalonScrollEnd: () =>void
Defined in: src/solid/WindowVirtualizer.tsx:104
Callback invoked when scrolling stops.
void