View as Markdown

API reference: @salmonui/data

RangeSourceinterface

import type { RangeSource } from '@salmonui/data';
interface RangeSource<T> {
    getSnapshot(): RangeSourceSnapshot<T>;
    subscribe(listener: () => void): () => void;
    request(range: Range): void;
    invalidate(): void;
}
RangeSource members (4)
NameSignatureDescription
getSnapshotgetSnapshot(): RangeSourceSnapshot<T>;
subscribesubscribe(listener: () => void): () => void;
requestrequest(range: Range): void;

Shows range: served from a cached range that covers it, else loaded (the previous load is aborted).

invalidateinvalidate(): void;

Drops the cache (for example after the data changed on the server).