table_getPageCount

Function: table_getPageCount()

ts
function table_getPageCount<TFeatures, TData>(table): number;

Defined in: features/row-pagination/rowPaginationFeature.utils.ts:370

Resolves the number of pages for the current pagination state.

options.pageCount wins for manual pagination. Otherwise the value is calculated from table_getRowCount(table) and the current pageSize.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal\<`TFeatures`, `TData`\>

Returns

number

Example

ts
const pages = table_getPageCount(table)