scrollToIndex(index, [position])

Class: List.

Description:

Scrolls the scroll bars to make sure the item at specified index is visible. If position is specified, the item will be placed at the specified position between the top and bottom of the List component.

Parameters:

Name Type Default Description

index

number

0

Index of a list item to make visible.

[position]

number

A decimal number between 0 and 1 indicating vertical position in percentages (0% - 100% of the height of the component). If omitted, the item will only become visible, but not at a specific location.