Search...
currentPage
Returns the index of the current page of results.
Description
currentPage
is a zero-based index of the current page of results, meaning the 1st page is 0
, the 2nd page is 1
, and so on.
If no results match the query, currentPage
is undefined.
The page size is defined by the limit()
function and can be retrieved using the pageSize
property. You can use the next()
and prev()
functions returned by members
to navigate the pages of a query result.
Type:
number
Was this helpful?
Get
currentPage
from a query resultCopy Code
1const resultPage = results.currentPage;2
Perform a query and get
currentPage
from the resultCopy Code
1import { members } from 'wix-members.v2';23export async function myQueryFunction() {4 const results = await members.queryMembers().find();56 return results.currentPage;7}8