Interface PageHints() sincev5.9.0
interface PageHints {}A hint function for extracting the currentPage and totalPages from a loaded document, for when the response does not expose these values through the default meta locations. Provided by the consumer via <Paginate />'s @pageHints arg:
<Paginate @pageHints={{...}} />Since these values are attached to the shared PaginationCache, the hint is a property of the collection, not the component. Every <Paginate /> sharing a collection must provide the same function reference — define it once at module scope and import it everywhere.
PageHints(document: ReactiveDocument<unknown>): {
currentPage: number;
totalPages: number;
};A hint function for extracting the currentPage and totalPages from a loaded document, for when the response does not expose these values through the default meta locations. Provided by the consumer via <Paginate />'s @pageHints arg:
<Paginate @pageHints={{...}} />Since these values are attached to the shared PaginationCache, the hint is a property of the collection, not the component. Every <Paginate /> sharing a collection must provide the same function reference — define it once at module scope and import it everywhere.
Parameters
document
ReactiveDocument<unknown>
Returns
{
currentPage: number;
totalPages: number;
}currentPage
currentPage: number;totalPages
totalPages: number;