Interface: VirtuosoHandle
Methods
scrollToIndex
▸ scrollToIndex(location
): void
Scrolls the component to the specified item index. See IndexLocationWithAlign for more options.
Parameters
Name | Type |
---|---|
location | number | FlatIndexLocationWithAlign |
Returns
void
scrollIntoView
▸ scrollIntoView(location
): void
Scrolls the item into view if necessary. See the website example for an implementation.
Parameters
Name | Type |
---|---|
location | FlatScrollIntoViewLocation |
Returns
void
scrollTo
▸ scrollTo(location
): void
Scrolls the component to the specified location. See ScrollToOptions (MDN)
Parameters
Name | Type |
---|---|
location | ScrollToOptions |
Returns
void
scrollBy
▸ scrollBy(location
): void
Scrolls the component with the specified amount. See ScrollToOptions (MDN)
Parameters
Name | Type |
---|---|
location | ScrollToOptions |
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
Name | Type |
---|---|
stateCb | StateCallback |
Returns
void