QueryCollectionHandle interface

Module @runic-artifex/react in @runic-artifex/react 0.23.0

interface QueryCollectionHandle<TRow> extends QueryViewport<TRow>

No documentation.

Properties

ref

readonly ref: (element: HTMLElement | null) => void;

Attach to the scroll container: <div ref={ref}>.

measure

readonly measure: (index: number) => (element: Element | null) => void;

Attach to each rendered row, so its height is measured: <div ref={measure(item.index)}>.

Methods

scrollToKey

scrollToKey(key: string, align?: "start" | "center" | "end"): Promise<boolean>;

Scrolls to the row with key in the current query; resolves false when no row has it.

scrollToIndex

scrollToIndex(index: number, align?: "start" | "center" | "end"): void;

No documentation.

setQuery

setQuery(query: RunicQuery): Promise<void>;

Changes the collection's sort and filter (ViewModel state every presentation shares).

retry

retry(): void;

Loads the range again after a failure.