Pagination

Slice the row model into pages with configurable page sizes.

How to Enable

Pagination is always active by default (page size 10). Configure via initialState or controlled state.

Table Options

OptionTypeDefaultDescription
manualPaginationbooleanfalseHandle pagination externally (server-side)
pageCountnumber--Total page count (for server-side)
rowCountnumber--Total row count (for server-side)
autoResetPageIndexbooleantrueReset to page 0 when data changes
onPaginationChangeOnChangeFn<PaginationState>--Callback when pagination state changes

Programmatic Control

table.nextPage()
table.previousPage()
table.firstPage()
table.lastPage()
table.setPageIndex(3)
table.setPageSize(25)
table.getCanNextPage()      // boolean
table.getCanPreviousPage()  // boolean
table.getPageCount()        // total pages
table.getRowCount()         // total rows

React: Pagination Component

import { Pagination } from '@zvndev/yable-react'

<Table table={table}>
  <Pagination
    table={table}
    showPageSize       // Show page size dropdown
    pageSizes={[10, 25, 50, 100]}
    showInfo           // Show "1-10 of 50" text
    showFirstLast      // Show first/last page buttons
  />
</Table>