Overall scroll state for a single dimension.

interface ScrollState {
    page: number;
    renderOffset: number;
    scrollDirection: ScrollDirection;
    scrollOffset: number;
}

Properties

page: number

Index of current page.

renderOffset: number

Offset used to position current page of items in virtual space. Overall offset is scrollOffset+renderOffset.

scrollDirection: ScrollDirection

Current scrolling direction. Calculated by comparing current overall offset to that when last rendered.

scrollOffset: number

Scroll bar offset. Equal to outer container's scrollTop or scrollLeft depending on dimension.