Usage
Typescript Import Format
//To use this interface, import as below.
import {PagingModel} from "ojs/ojpagingmodel";
For additional information visit:
Fields
-
(static) EventType :string
-
Properties:
Name Type Default Description BEFOREPAGE
string beforePage Triggered before the current page has changed. This event is vetoable.
The event payload contains:
page The new current page
previousPage The old current pagePAGE
string page Triggered when the current page has changed The event payload contains:
page The new current page
previousPage The old current pagePAGECOUNT
string pageCount Triggered when the page count has changed The event payload contains:
pageCount The new page count
previousPageCount The old page count
Methods
-
getEndItemIndex : {number}
-
Get the current page end index
Returns:
The current page end index
- Type
- number
-
getPage : {number}
-
Get the current page
Returns:
The current page
- Type
- number
-
getPageCount : {number}
-
Get the page count
Returns:
The total number of pages
- Type
- number
-
getStartItemIndex : {number}
-
Get the current page start index
Returns:
The current page start index
- Type
- number
-
setPage(value, options) : {Promise}
-
Set the current page
Parameters:
Name Type Argument Description value
number The current page options
Object <optional>
Options pageSize: The page size.
Returns:
promise object triggering done when complete..
- Type
- Promise
-
totalSize : {number}
-
Returns:
total number of items
- Type
- number
-
totalSizeConfidence : {string}
-
Returns the confidence for the totalSize value.
Returns:
"actual" if the totalSize is the time of the fetch is an exact number "estimate" if the totalSize is an estimate "atLeast" if the totalSize is at least a certain number "unknown" if the totalSize is unknown
- Type
- string