    import {Paging} from 'TableFilter/src/modules/paging.js'

public class | source

# Paging

## Constructor Summary

Public Constructor
public | constructor(tf: Object) Pagination component |

## Member Summary

Public Members
public | btnFirstPageHtml: * |
public | btnFirstPageText: * |
public | btnLastPageHtml: * |
public | btnLastPageText: * |
public | btnNextPageHtml: * |
public | btnNextPageText: * |
public | btnPageCssClass: * |
public | btnPrevPageHtml: * |
public | btnPrevPageText: * |
public | currentPageNb: number |
public | evt: * |
public | hasPagingBtns: * |
public | hasResultsPerPage: * |
public | isPagingRemoved: boolean |
public | nbPages: number |
public | nbPgSpanCssClass: * |
public | ofText: * |
public | onAfterChangePage: * |
public | onBeforeChangePage: * |
public | pageSelectorType: * |
public | pageText: * |
public | pagingLength: * |
public | pagingSlc: * |
public | pagingTgtId: * |
public | pgInpCssClass: * |
public | pgSlcCssClass: * |
public | prfxBtnFirst: string |
public | prfxBtnFirstSpan: string |
public | prfxBtnLast: string |
public | prfxBtnLastSpan: string |
public | prfxBtnNext: string |
public | prfxBtnNextSpan: string |
public | prfxBtnPrev: string |
public | prfxBtnPrevSpan: string |
public | prfxPgAfterSpan: string |
public | prfxPgBeforeSpan: string |
public | prfxPgSpan: string |
public | prfxSlcPages: string |
public | prfxSlcResults: string |
public | prfxSlcResultsTxt: string |
public | resultsPerPage: * |
public | resultsPerPageSlc: * |
public | resultsPerPageTgtId: * |
public | resultsSlcCssClass: * |
public | resultsSpanCssClass: * |
public | startPagingRow: number |
public | tf: * |

## Method Summary

Public Methods
public | changePage(index: Number) Change the page asynchronously according to passed index |
public | changeResultsPerPage() Change rows asynchronously according to page results |
public | destroy() Remove paging feature |
public | getPage(): Number Return the current page number |
public | groupByPage(validRows: Array) Group table rows by page and display valid rows |
public | init() Initialize DOM elements |
public | removeResultsPerPage() Remove number of results per page UI elements |
public | reset(filterTable: Boolean) Reset paging when filters are already instantiated |
public | resetPage() Re-set asynchronously page nb at page re-load |
public | resetPageLength() Re-set asynchronously page length at page re-load |
public | setPage(cmd: String} or {Number) Show page based on passed param value (string or number): |
public | setPagingInfo(validRows: Array) Calculate number of pages based on valid rows |
public | setResultsPerPage() Generates UI elements for the number of results per page drop-down |

## Public Constructors

### public constructor(tf: Object) source

Pagination component

#### Params:

Name | Type | Attribute | Description
tf | Object |  | TableFilter instance

## Public Members

### public btnFirstPageHtml: * source

### public btnFirstPageText: * source

### public btnLastPageHtml: * source

### public btnLastPageText: * source

### public btnNextPageHtml: * source

### public btnNextPageText: * source

### public btnPageCssClass: * source

### public btnPrevPageHtml: * source

### public btnPrevPageText: * source

### public currentPageNb: number source

### public evt: * source

### public hasPagingBtns: * source

### public hasResultsPerPage: * source

### public isPagingRemoved: boolean source

### public nbPages: number source

### public nbPgSpanCssClass: * source

### public ofText: * source

### public onAfterChangePage: * source

### public onBeforeChangePage: * source

### public pageSelectorType: * source

### public pageText: * source

### public pagingLength: * source

### public pagingSlc: * source

### public pagingTgtId: * source

### public pgInpCssClass: * source

### public pgSlcCssClass: * source

### public prfxBtnFirst: string source

### public prfxBtnFirstSpan: string source

### public prfxBtnLast: string source

### public prfxBtnLastSpan: string source

### public prfxBtnNext: string source

### public prfxBtnNextSpan: string source

### public prfxBtnPrev: string source

### public prfxBtnPrevSpan: string source

### public prfxPgAfterSpan: string source

### public prfxPgBeforeSpan: string source

### public prfxPgSpan: string source

### public prfxSlcPages: string source

### public prfxSlcResults: string source

### public prfxSlcResultsTxt: string source

### public resultsPerPage: * source

### public resultsPerPageSlc: * source

### public resultsPerPageTgtId: * source

### public resultsSlcCssClass: * source

### public resultsSpanCssClass: * source

### public startPagingRow: number source

### public tf: * source

## Public Methods

### public changePage(index: Number) source

Change the page asynchronously according to passed index

#### Params:

Name | Type | Attribute | Description
index | Number |  | Index of the page (0-n)

### public changeResultsPerPage() source

Change rows asynchronously according to page results

### public destroy() source

Remove paging feature

### public getPage(): Number source

Return the current page number

#### Return:

Number | Page number

### public groupByPage(validRows: Array) source

Group table rows by page and display valid rows

#### Params:

Name | Type | Attribute | Description
validRows | Array |  | Collection of valid rows

### public init() source

Initialize DOM elements

### public removeResultsPerPage() source

Remove number of results per page UI elements

### public reset(filterTable: Boolean) source

Reset paging when filters are already instantiated

#### Params:

Name | Type | Attribute | Description
filterTable | Boolean |  | Execute filtering once paging instanciated

### public resetPage() source

Re-set asynchronously page nb at page re-load

### public resetPageLength() source

Re-set asynchronously page length at page re-load

### public setPage(cmd: String} or {Number) source

Show page based on passed param value (string or number):

#### Params:

Name | Type | Attribute | Description
cmd | String} or {Number |  | possible string values: 'next', 'previous', 'last', 'first' or page number as per param

### public setPagingInfo(validRows: Array) source

Calculate number of pages based on valid rows Refresh paging select according to number of pages

#### Params:

Name | Type | Attribute | Description
validRows | Array |  | Collection of valid rows

### public setResultsPerPage() source

Generates UI elements for the number of results per page drop-down