followViewport function

Module @runic-artifex/views-effect in @runic-artifex/views-effect 0.23.0

function followViewport<A, E, R>(controller: CollectionViewportController, request: (range: ViewportRange) => Effect.Effect<A, E, R>): Effect.Effect<void, E, R>;

Sends each new row range of a viewport controller to .NET, interrupting the request for a range the user already scrolled past. Pass a command, or an operation, whose interruption cancels it in .NET:

yield* followViewport(controller, range => operation(() => rows.startSetViewport(range)));

Runs until interrupted, and fails with the first failure of request.