UNPKG

@cascade/pagination

Version:

Array and Service Pagination powered by Cascade.

27 lines (26 loc) 800 B
import { IPagination, IRefreshCallback } from '../interfaces/IPagination'; import { IPage } from '../interfaces/IPage'; export default class Pagination<T> implements IPagination<T> { pageSize: number; page: number; activeRows: T[]; allRows: T[]; rowCount: number; error: boolean; loaded: boolean; refreshing: boolean; refreshData: IRefreshCallback<T>; lockRefresh: boolean; runCount: number; initialized: boolean; infinite: boolean; length: number; get dataComputed(): Promise<IPage<T>>; constructor(refreshData: IRefreshCallback<T>); init(): Promise<IPage<T>>; run(): Promise<IPage<T>>; reset(): Promise<IPage<T>>; clear(): void; nextPage(): void; itemDeleted(count?: number): void; }