Methods
backwards()
#
Move backwards to the previous page
Fires:
forwards()
#
Move forward to the next page
Fires:
getCurrPageContinue() → {string}
#
Get the current page continue value
Returns:
Current page continue value
- Type
- string
getCurrPageIndex() → {number}
#
Get the current page index
Returns:
Current page index
- Type
- number
getCurrentPageItemCount() → {number}
#
Get the number of items in the current page
Returns:
Number of items
- Type
- number
getItemsPerPage() → {number}
#
Get the number of items per page
Returns:
Number of items per page
- Type
- number
getNextPageContinue() → {string}
#
Get the next page continue value
Returns:
Next page continue value
- Type
- string
getPageContinue(page) → {string}
#
Get the 'continue' value of a certain page
Parameters:
Name | Type | Description |
---|---|---|
page |
number | Page index |
Returns:
Continue string value
- Type
- string
getPrevPageContinue() → {string}
#
Get the previous page continue value
Returns:
Previous page continue value
- Type
- string
hasNextPage() → {boolean}
#
Check whether a next page exists
Returns:
Next page exists
- Type
- boolean
hasPrevPage() → {boolean}
#
Check whether a previous page exists
Returns:
Previous page exists
- Type
- boolean
reset()
#
Reset pagination data
Fires:
setCurrPageIndex(index)private
#
Set the current page index
Parameters:
Name | Type | Description |
---|---|---|
index |
number | Current page index |
setCurrentPageItemCount(count)
#
Set the number of items in the current page
Parameters:
Name | Type | Description |
---|---|---|
count |
number | Number of items |
Fires:
setItemsPerPage(count)
#
Set the number of items per page
Parameters:
Name | Type | Description |
---|---|---|
count |
number | Number of items per page |
setNextPageContinue(cont)
#
Set the next page continue value
Parameters:
Name | Type | Description |
---|---|---|
cont |
string | Next page continue value |
setPageContinue(page, continueVal)
#
Set a page index with its 'continue' value, used for API fetching
Parameters:
Name | Type | Description |
---|---|---|
page |
number | Page index |
continueVal |
string | Continue string value |
Fires:
Events
update()
#
Pagination information was updated