Skip to main content

Interface: VirtuosoHandle

Methods

scrollToIndex

scrollToIndex(location): void

Scrolls the component to the specified item index. See IndexLocationWithAlign for more options.

Parameters

NameType
locationnumber | FlatIndexLocationWithAlign

Returns

void


scrollIntoView

scrollIntoView(location): void

Scrolls the item into view if necessary. See the website example for an implementation.

Parameters

NameType
locationFlatScrollIntoViewLocation

Returns

void


scrollTo

scrollTo(location): void

Scrolls the component to the specified location. See ScrollToOptions (MDN)

Parameters

NameType
locationScrollToOptions

Returns

void


scrollBy

scrollBy(location): void

Scrolls the component with the specified amount. See ScrollToOptions (MDN)

Parameters

NameType
locationScrollToOptions

Returns

void


autoscrollToBottom

autoscrollToBottom(): void

Use this with combination with follow output if you have images loading in the list. Listen to the image loading and call the method.

Returns

void


getState

getState(stateCb): void

Obtains the internal size state of the component, so that it can be restored later. This does not include the data items.

Parameters

NameType
stateCbStateCallback

Returns

void