ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12 lines (11 loc) • 730 B
TypeScript
type PageNumberItem = number | 'ellipsis';
/**
* Builds the displayed page items for a 0-based `currentPage` and `totalPages` count.
* Always keeps the first page plus a constant-width window around the current page. When the last
* page is known it also pins the last page and collapses gaps with an ellipsis; when it is not yet
* known (row count still loading) it never pins a concrete last page and ends with a trailing
* ellipsis instead. The current page is clamped into range so transient out-of-range pagination
* state cannot produce buttons beyond the available pages.
*/
export declare function _getPageNumberItems(currentPage: number, totalPages: number, isLastPageKnown: boolean): PageNumberItem[];
export {};