IDataTableProvidePagination
interface
Component Props
Internal provide/inject contract for pagination state in <OrigamDataTable> — exposes the page cursors, the total page count and navigation helpers consumed by footer and slot children.
TypeScript
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- pagerequiredRef<number>
- Current 1-based page number as a reactive ref.
- itemsPerPagerequiredRef<number>
- Number of rows per page as a reactive ref.
- startIndexrequiredComputedRef<number>
- Zero-based index of the first row on the current page.
- stopIndexrequiredComputedRef<number>
- Zero-based index of the last row on the current page (exclusive).
- pageCountrequiredComputedRef<number>
- Total number of pages computed from itemsLength and itemsPerPage.
- itemsLengthrequiredRef<number>
- Total number of items across all pages (used for server-side pagination).
- nextPagerequired() => void
- Advances to the next page if available.
- prevPagerequired() => void
- Goes back to the previous page if available.
- setPagerequired(value: number) => void
- Navigates to the given page number (clamped to valid range).
- setItemsPerPagerequired(value: number) => void
- Changes the number of rows per page and resets to page 1.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Accessing pagination state via inject