Pagination

Pagination object that provides indication if there is any previous or next page and functions to get to the previous or the next page.

Example

{
  "hasNextPage": true,
  "hasPrevPage": true,
  "getNextPage": () => {},
  "getPrevPage": () => {}
}

Type Signature

type Pagination = {
  hasNextPage: boolean;
  hasPrevPage: boolean;
  getNextPage: () => Promise<void>;
  getPrevPage: () => Promise<void>;
};

Fields

ParamTypeDefault ValueDescription

hasNextPage

boolean

false

Indicate if there is any next page.

hasPrevPage

boolean

false

Indicate if there is any previous page.

getNextPage

() => Promise<void>

-

Function to get data in the next page.

getPrevPage

() => Promise<void>

-

Function to get data in the previous page.

Last updated

Was this helpful?