API REFERENCE
ViewportDatasource
Fields, allowed values, and APIs that use ViewportDatasource.
Type definition
A question mark (?) marks an optional field; readonly marks a value you should not change directly. A union (|) accepts one of the listed forms. Functions are callbacks that Grid invokes at the relevant point.
export interface ViewportDatasource<TRow> {
init(callbacks: {
setRowCount(count: number): void;
setRowData(startIndex: number, rows: TRow[]): void;
}): void;
setViewportRange(
firstRow: number,
lastRow: number,
request?: ViewportRequestContext,
): void;
destroy?(): void;
}APIs using this type
- viewportDatasource
Viewport model supplying data for visible row ranges. Implement initialization, range changes, and cleanup.