Constructor Summary
Public Constructor | ||
public |
constructor(tf: TableFilter) Creates an instance of Paging |
Member Summary
Public Members | ||
public |
Css class for the paging buttons (previous, next, etc.) |
|
public |
First page button HTML |
|
public |
First page button text |
|
public |
Last page button HTML |
|
public |
Last page button text |
|
public |
Next page button HTML |
|
public |
Next page button text |
|
public |
Previous page button HTML |
|
public |
Previous page button text |
|
public |
Determines if paging buttons are enabled (default: true) |
|
public |
Determines if results per page is configured |
|
public |
|
|
public |
Css class for the span containing total number of pages |
|
public |
Text after page selector drop-down |
|
public |
Callback fired after the page is changed |
|
public |
Callback fired before the page is changed |
|
public |
Number of rows contained in a page |
|
public |
pageLengthSlc: DOMElement Results per page select DOM element |
|
public |
ID of custom container element for the results per page selector |
|
public |
Defines page selector type, two possible values: 'select', 'input' |
|
public |
pageSlc: DOMElement Main select DOM element |
|
public |
Text preceeding page selector drop-down |
|
public |
Css class for the paging input element |
|
public |
Css class for the paging select element |
|
public |
Label and values for the results per page select, example of usage: ['Records: ', [10,25,50,100]] |
|
public |
Css class for the results per page select |
|
public |
Css class for the label preceding results per page select |
|
public |
ID of custom container element |
|
public |
Default position in toolbar ('left'|'center'|'right') |
Method Summary
Public Methods | ||
public |
changePage(index: Number) Change the page based on passed index |
|
public |
changeResultsPerPage(val: String) Change the number of results per page based on passed value |
|
public |
destroy() Remove paging feature |
|
public |
Return the current page number |
|
public |
groupByPage(validRows: Array) Group table rows by page and display valid rows |
|
public |
init() Initialize DOM elements |
|
public |
Change rows according to page results drop-down |
|
public |
Remove number of results per page UI elements |
|
public |
Reset paging when filters are already instantiated |
|
public |
Re-set page nb at page re-load |
|
public |
Re-set page length value at page re-load |
|
public |
Reset paging info from scratch after a filtering process |
|
public |
setPage(cmd: String}/{Number) Show page defined by passed argument (string or number): |
|
public |
setPagingInfo(validRows: Array) Calculate number of pages based on valid rows Refresh paging select according to number of pages |
|
public |
Generates UI elements for the number of results per page drop-down |
Inherited Summary
From class Feature | ||
public |
TableFilter configuration |
|
public |
TableFilter emitter instance |
|
public |
TableFilter feature setting |
|
public |
Feature name is the camelised class name as per TableFilter's convention |
|
public |
Field indicating whether Feature is initialized |
|
public |
TableFilter instance |
|
public |
destroy() Destroy the feature |
|
public |
disable() Disable the feature |
|
public |
enable() Enable the feature |
|
public |
init() Initialize the feature |
|
public |
Indicate whether the feature is enabled or not |
|
public |
reset() Reset the feature after being disabled |
Public Constructors
public constructor(tf: TableFilter) source
Creates an instance of Paging
Override:
Feature#constructorParams:
Name | Type | Attribute | Description |
tf | TableFilter | TableFilter instance |
Public Members
public initialized: boolean source
Field indicating whether Feature is initialized
Override:
Feature#initializedpublic pageLengthTgtId: String source
ID of custom container element for the results per page selector
public pageSelectorType: String source
Defines page selector type, two possible values: 'select', 'input'
Public Methods
public changePage(index: Number) source
Change the page based on passed index
Params:
Name | Type | Attribute | Description |
index | Number | Index of the page (0-n) |
public changeResultsPerPage(val: String) source
Change the number of results per page based on passed value
Params:
Name | Type | Attribute | Description |
val | String | The number of results per page |
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 reset(filterTable: Boolean) source
Reset paging when filters are already instantiated
Override:
Feature#resetParams:
Name | Type | Attribute | Description |
filterTable | Boolean | Execute filtering once paging instanciated |
public setPage(cmd: String}/{Number) source
Show page defined by passed argument (string or number):
Params:
Name | Type | Attribute | Description |
cmd | String}/{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