nextPage( )


Moves to the next page of data.

The nextPage() function returns a Promise that is resolved to an array of the next page's items when:

  • The current item is saved in the collection (if necessary).
  • The next page of data is loaded.
  • Any connected elements have been updated with the new data.
  • The current item is updated to the first item in the next page.

Going to the next page of data replaces the current items in any connected elements with the new items that correspond to the next page of data. Elements that have their own settings for how many items are shown at once, such as tables and galleries, are not affected.

Calling nextPage() on a write-only dataset causes an error.

Notes:

  • A dataset needs to load its data before you call its nextPage() function.

    Usually a dataset finishes loading a short time after the page it is on finishes loading. So if you call nextPage() inside the page’s onReady() event handler, the dataset might not be ready yet.

    To call nextPage() as soon as possible after a page loads, use the dataset's onReady() function inside the page’s onReady() event handler to ensure that both the page and the dataset have finished loading.

  • When using a read-write dataset and linked input elements, calling any of the following functions will save any changes made in the linked input elements.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:Promise<Array<object>>
Was this helpful?
Yes
No