State
Extends:
Features state object persistable with localStorage, cookie or URL hash
Constructor Summary
Public Constructor | ||
public |
constructor(tf: TableFilter) Creates an instance of State |
Member Summary
Public Members | ||
public |
Cookie duration in hours |
|
public |
Determines whether state is persisted with localStorage |
|
public |
Determines whether state is persisted with URL hash |
|
public |
Determines whether state is persisted with localStorage |
|
public |
|
|
public |
Persist columns visibility |
|
public |
Persist filters values, enabled by default |
|
public |
Persist filters row visibility |
|
public |
Persist page length when paging is enabled |
|
public |
Persist current page number when paging is enabled |
|
public |
Persist column sorting |
Method Summary
Public Methods | ||
public |
destroy() Destroy State instance |
|
public |
init() Initializes State instance |
|
public |
override(state: *) Override state field |
|
public |
overrideAndSync(state: Object) Override current state with passed one and sync features |
|
public |
sync() Sync stored features state |
|
public |
update() Update state object based on current features state |
|
public |
updateColsVisibility(hiddenCols: Array) Refresh hidden columns information on columns visibility changes |
|
public |
updateFiltersVisibility(visible: Boolean) Refresh filters visibility on filters visibility change |
|
public |
updatePage(pageNb: Number) Refresh page number field on page number changes |
|
public |
updatePageLength(pageLength: Number) Refresh page length field on page length changes |
|
public |
updateSort(index: *, descending: Boolean) Refresh column sorting information on sort changes |
Inherited Summary
From class Feature | ||
public |
TableFilter configuration |
|
public |
TableFilter emitter instance |
|
public |
TableFilter feature setting |
|
public |
Feature name |
|
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 State
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 Methods
public override(state: *) source
Override state field
Params:
Name | Type | Attribute | Description |
state | * | State object |
public overrideAndSync(state: Object) source
Override current state with passed one and sync features
Params:
Name | Type | Attribute | Description |
state | Object | State object |
public updateColsVisibility(hiddenCols: Array) source
Refresh hidden columns information on columns visibility changes
Params:
Name | Type | Attribute | Description |
hiddenCols | Array | Columns indexes |
public updateFiltersVisibility(visible: Boolean) source
Refresh filters visibility on filters visibility change
Params:
Name | Type | Attribute | Description |
visible | Boolean | Visibility flad |
public updatePage(pageNb: Number) source
Refresh page number field on page number changes
Params:
Name | Type | Attribute | Description |
pageNb | Number | Current page number |