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

Définition

La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.

typescript

API

Propriétés

Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.

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

Écosystème

Utilisé par

Composants et composables qui étendent ou consomment cette interface.

Usage

Exemples

Extraits de code prêts à coller utilisant cette interface.

Accessing pagination state via inject

typescript