Interface: WindowVirtualizerHandle

June 29, 2026 ยท View on GitHub

API


Interface: WindowVirtualizerHandle

Defined in: src/react/WindowVirtualizer.tsx:37

Methods of WindowVirtualizer.

Methods

findItemIndex()

findItemIndex(offset): number

Defined in: src/react/WindowVirtualizer.tsx:54

Find nearest item index from offset.

Parameters

offset

number

offset in pixels from the start of the scroll container

Returns

number


getItemOffset()

getItemOffset(index): number

Defined in: src/react/WindowVirtualizer.tsx:59

Get item offset from start.

Parameters

index

number

index of item

Returns

number


getItemSize()

getItemSize(index): number

Defined in: src/react/WindowVirtualizer.tsx:64

Get item size.

Parameters

index

number

index of item

Returns

number


scrollToIndex()

scrollToIndex(index, opts?): void

Defined in: src/react/WindowVirtualizer.tsx:70

Scroll to the item specified by index.

Parameters

index

number

index of item

opts?

ScrollToIndexOpts

options

Returns

void

Properties

cache

readonly cache: CacheSnapshot

Defined in: src/react/WindowVirtualizer.tsx:41

Get current CacheSnapshot.


scrollOffset

readonly scrollOffset: number

Defined in: src/react/WindowVirtualizer.tsx:45

Get current scrollTop, or scrollLeft if horizontal: true.


viewportSize

readonly viewportSize: number

Defined in: src/react/WindowVirtualizer.tsx:49

Get current offsetHeight, or offsetWidth if horizontal: true.