Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

TanStack · Function

getPaginationRowModel

Creates the row-model factory used for client-side pagination in TanStack Table. It exposes only the rows belonging to the current page.

How it works

Calling getPaginationRowModel returns a row-model factory that applies client-side pagination to a table. Register that factory in the table options, then read the resulting paginated rows through the table's row-model API.

Syntax

function getPaginationRowModel<TData>(): RowModelFactory<TData>;

Parameters

NameTypeDescription
TDataTData extends RowDataGeneric row-data type extending RowData; the factory itself takes no runtime arguments.

Returns

RowModelFactory<TData>

Key points

  • The resulting model represents the table after pagination, without later row-model transformations.
  • Only rows belonging to the active page appear in the paginated row model.
  • Pagination is applied after core, filtering, grouping, sorting, and expansion in the documented processing sequence.
  • The table option accepts a function receiving a table and returning a row-model-producing function.
  • The produced function returns a RowModel parameterized by the table's data type.

Common mistakes

  • The current latest documentation marks this legacy function as a compatibility stub; new Table APIs use createPaginatedRowModel instead.

Example: Enable client-side pagination

import { getCoreRowModel, getPaginationRowModel, useReactTable } from '@tanstack/react-table'

const table = useReactTable({
  data,
  columns,
  getCoreRowModel: getCoreRowModel(),
  getPaginationRowModel: getPaginationRowModel(),
})

const visibleRows = table.getRowModel().rows

Configure the factory on a table to derive the rows for the active pagination state.

When to use it

Client-side pagination

A browser-rendered table holds the complete dataset and needs page controls.

Composed row-model processing

Filtering, sorting, grouping, and expansion should complete before rows are divided into pages.

Legacy compatibility

An existing useLegacyTable application needs the v8-style pagination option during migration.

Interview questions

QWhat does getPaginationRowModel do?

It is a row-model factory that returns the table rows after client-side pagination has been applied. Register it as getPaginationRowModel: getPaginationRowModel() in the table configuration.

Follow-up: How does it fit into row-model processing? Pagination runs after filtering, grouping, sorting, and expanding, and before the final table row model.

QWhen should you omit it?

Use the factory when the table performs pagination over the data it has locally. For server-side pagination, use manual pagination and omit this factory because the returned data is already paged.

Follow-up: What changes for server-side pagination? The table consumes the server-provided page and pagination state without applying a client-side pagination row model.

QWhat is its type and modern replacement?

The documented signature is getPaginationRowModel?: (table: Table<TData>) => () => RowModel<TData> for the table option, while the factory call itself is getPaginationRowModel(). It produces the row model for the current page.

Follow-up: What is the newer API direction? In the latest migration guidance, useTable registers createPaginatedRowModel through tableFeatures rather than the legacy get*RowModel option.

  • getCoreRowModel
  • getFilteredRowModel
  • getGroupedRowModel
  • getSortedRowModel
  • getExpandedRowModel
  • getPrePaginationRowModel
  • createPaginatedRowModel
  • manualPagination

Source: getPaginationRowModel | TanStack Table React Docs. Checked 2026-10-15.