Skip to content

Latest commit

 

History

History
56 lines (32 loc) · 1.61 KB

File metadata and controls

56 lines (32 loc) · 1.61 KB

API


Interface: ScrollToIndexOpts

Defined in: src/core/types.ts:21

Properties

align?

optional align: ScrollToIndexAlign

Defined in: src/core/types.ts:32

Alignment of item.

  • start: Align the item to the start of the list.
  • center: Align the item to the center of the list.
  • end: Align the item to the end of the list.
  • nearest: If the item is already completely visible, don't scroll. Otherwise scroll until it becomes visible. That is similar behavior to nearest option of scrollIntoView.

Default Value

"start"

smooth?

optional smooth: boolean

Defined in: src/core/types.ts:38

If true, scrolling animates smoothly with behavior: smooth of scrollTo.

Using smooth scrolling over many items can kill performance benefit of virtual scroll. Do not overuse it.


offset?

optional offset: number

Defined in: src/core/types.ts:43

Additional offset from the scrolled position.

Default Value

0