Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Paging<TData>

Paging allows you to query the next and previous data chunks in a convenient way. You can also go to a specific page or just read page information about the current data chunk.

Type parameters

  • TData

Hierarchy

  • Paging

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Paging(service: Service<TData>, statistics: any, filter: object): Paging
  • Parameters

    • service: Service<TData>
    • statistics: any
    • filter: object

    Returns Paging

Properties

currentPage

currentPage: number

Holds the number of the current page, so in fact the data chunk you are looking at.

pageSize

pageSize: number

Holds the number of the maximum data that you will get with the response.

totalPages

totalPages: number

Holds the number of total pages regarding to the given page size.

Methods

goto

  • goto(page: number, filter?: object): Promise<IResultList<TData>>
  • Goes to the page that you define as page parameter.

    Parameters

    • page: number
    • Default value filter: object = {}

    Returns Promise<IResultList<TData>>

next

  • Gets the next page of possible data from the server. Let assume that you are looking at the data chunk from page 1. The next call gets the data chunk of page 2.

    Parameters

    • Default value filter: object = {}

    Returns Promise<IResultList<TData>>

prev

  • Gets the previous page of possible data from server. Let assume that you are looking at the data chunk from page 2. The previous call get the data chunk of page 1.

    Parameters

    • Default value filter: object = {}

    Returns Promise<IResultList<TData>>

Generated using TypeDoc