# Pagination

> Set the page size and available choices.

Source: https://docs.inertiax.dev/table/guide/pagination/

Tables paginate automatically, with 10 rows per page and choices of 10, 25, 50, and 100.

```php
UsersTable::make('users')
    ->data($users)
    ->pageSize(25)
    ->pageSizeOptions([10, 25, 50]);
```

InertiaX includes the default page size in the available choices. Eloquent queries paginate in the database; collections paginate in memory.

## Show every row

For a bounded dataset:

```php
UsersTable::make('users')->data($users)->pagination(false);
```

Disabling pagination sends the full result to the browser.

## Page changes

Search, filters, sorting, and page-size changes reset the table to page 1. The current page is stored in the URL when using the Inertia integration.

See [Table API](https://docs.inertiax.dev/table/reference/table/#pagination) for input validation and out-of-range pages.

## Pagination links

With component ID `orders`, pagination uses `orders_page` and `orders_per_page`. For example, `/orders?orders_page=2&orders_per_page=25` requests page 2 with 25 rows. The page size must be one of the table’s allowed choices. Interactions omit implicit defaults; initially explicit keys may remain. See [URL state](https://docs.inertiax.dev/table/guide/url-state/).

A stale page link shows a problem inside the table. Users can [reset pagination](https://docs.inertiax.dev/table/guide/url-recovery/) to return to page 1; no setup is required beyond the ordinary Inertia integration.
