Skip to main content
zerotal

Documentation


Documentation / @zerotal/flow / index / InfiniteScroll

Function: InfiniteScroll()

InfiniteScroll(props): HtmlNode

Defined in: flow/src/components.ts:737

A viewport sentinel that runs a server action when it scrolls into view — the building block for load-more / infinite lists.

Parameters

props

InfiniteScrollProps

Returns

HtmlNode

Remarks

onMore is the method to invoke when the sentinel intersects; pass show={false} (typically a boolean expression like this.visible < this.all.length) to stop loading at the end. children replace the default "Loading more…" text.

Example

<InfiniteScroll onMore={this.loadMore} show={this.visible < this.total} />