Search.../

hasNext( )

Indicates whether the query has more results.

Description

You can use the next() and prev() functions returned by services to navigate the pages of a query result.

Syntax

function hasNext(): boolean

hasNext Parameters

This function does not take any parameters.

Returns

Return Type:

boolean

Was this helpful?

Get whether the query has more results

Copy Code
1const hasNext = results.hasNext();
2
Perform a query and get hasNext from the result

Copy Code
1import { services } from 'wix-bookings.v2';
2
3export async function myQueryFunction() {
4 const results = await services.queryServices().find();
5
6 return results.hasNext();
7}
8