CollectionViewportController interface

Namespace @runic-artifex/views · @runic-artifex/views 0.7.0-preview.5

interface CollectionViewportController

Follows a scroll container and publishes its CollectionViewport. Framework bindings attach their element and pass the current row count.

Properties

current

readonly current: CollectionViewport;

No documentation.

Methods

subscribe

subscribe(listener: () => void): () => void;

Calls listener after each change of current, until the returned function is called.

attach

attach(element: HTMLElement | null | undefined): void;

Measures element and follows its scroll position and size. Pass null to detach.

update

update(options: CollectionViewportOptions): void;

Applies a new row count, row height or overscan.

dispose

dispose(): void;

Detaches and stops publishing.