ng-cdk-table-virtual-scroll
Version:
Virtual scroll for for Angular Cdk Table
32 lines (31 loc) • 1.31 kB
TypeScript
import { DataSource } from '@angular/cdk/table';
import { Observable, Subject, Subscription } from 'rxjs';
export declare class TableVirtualScrollDataSource<T> extends DataSource<T> {
/** Stream that emits when a new data array is set on the data source. */
private readonly _data;
/** Stream emitting render data to the table (depends on ordered data changes). */
private readonly _renderData;
/**
* Subscription to the changes that should trigger an update to the table's rendered rows, such
* as filtering, sorting, pagination, or base data changes.
*/
protected _renderChangesSubscription: Subscription | null;
dataToRender$: Subject<T[]>;
dataOfRange$: Subject<T[]>;
protected streamsReady: boolean;
/** Array of data that should be rendered by the table, where each object represents one row. */
data: T[];
constructor(initialData?: T[]);
protected updateChangeSubscription(): void;
protected initStreams(): void;
/**
* Used by the MatTable. Called when it connects to the data source.
* @private
*/
connect(): Observable<T[] | readonly T[]>;
/**
* Used by the MatTable. Called when it disconnects from the data source.
* @private
*/
disconnect(): void;
}