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.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

page
required
Ref<number>
Current 1-based page number as a reactive ref.
itemsPerPage
required
Ref<number>
Number of rows per page as a reactive ref.
startIndex
required
ComputedRef<number>
Zero-based index of the first row on the current page.
stopIndex
required
ComputedRef<number>
Zero-based index of the last row on the current page (exclusive).
pageCount
required
ComputedRef<number>
Total number of pages computed from itemsLength and itemsPerPage.
itemsLength
required
Ref<number>
Total number of items across all pages (used for server-side pagination).
nextPage
required
() => void
Advances to the next page if available.
prevPage
required
() => void
Goes back to the previous page if available.
setPage
required
(value: number) => void
Navigates to the given page number (clamped to valid range).
setItemsPerPage
required
(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

typescript