Search...
currentPage
Returns the index of the current results page number.
Description
The currentPage
is a zero-based index of the current page of results.
The page size is defined by the limit()
function, can be retrieved using the pageSize
property. You navigate
through pages using the prev()
and next()
functions.
The currentPage
property returns undefined
if the search returned no results.
Type:
numberRead Only
Was this helpful?
Get the current page index of a search result
Copy Code
1let resultPage = results.currentPage; // 0
Perform a search and get the current page index of the search result
Copy Code
1import wixSearch from 'wix-search';23// ...45wixSearch.search(phrase)6 .find()7 .then( (results) => {8 let resultPage = results.currentPage; // 09 } ) ;