Search...
prev( )
Retrieves the previous page of query results.
Description
The prev()
function retrieves the previous page of query results.
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 events
to navigate the pages of a query result.
If items are added or removed between calls to prev()
, the values returned may change.
Syntax
function prev(): Promise<EventsQueryResult>
prev Parameters
This function does not take any parameters.
Returns
Return Type:
Promise<>
Was this helpful?
Get
prev
from a query resultCopy Code
1const previousPage = results.prev();2
Perform a query and get
prev
from the resultCopy Code
1import { events } from 'wix-events.v2';23export async function myQueryFunction() {4 const results = await events.queryEvents().find();56 return results.prev();7}8