Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Table API Reference
Column API Reference
Row API Reference
Cell API Reference
Header API Reference
Features API Reference
Static Functions API Reference
Legacy API Reference
Static Functions API Reference

table_setPageIndex

Function: table_setPageIndex()

ts
function table_setPageIndex<TFeatures, TData>(table, updater): void;
function table_setPageIndex<TFeatures, TData>(table, updater): void;

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

Updates pagination.pageIndex and clamps it to the known page range.

Unknown page counts (undefined or -1) allow any non-negative page index. Known page counts clamp the index between 0 and pageCount - 1.

Type Parameters

TFeatures

TFeatures extends TableFeatures

TData

TData extends RowData

Parameters

table

Table_Internal<TFeatures, TData>

updater

Updater<number>

Returns

void

Example

ts
table_setPageIndex(table, (old) => old)
table_setPageIndex(table, (old) => old)