Class: State

FooTable. State

new State(table) → {FooTable.State}

The state component adds the ability for the table to remember its basic state for filtering, paging and sorting.
Parameters:
Name Type Description
table FooTable.Table The parent FooTable.Table object for the component.
Returns:
Type
FooTable.State

Extends

Members

enabled :boolean

Whether or not this component is enabled. Disabled components only have there preinit method called allowing for this value to be overridden.
Type:
  • boolean
Inherited From:

filtering :boolean

Whether or not to allow the filtering component to store it's state.
Type:
  • boolean

ft :FooTable.Table

The parent FooTable.Table for the component.
Type:
Inherited From:

key :null|string

The key to use to store the state for this table.
Type:
  • null | string

paging :boolean

Whether or not to allow the paging component to store it's state.
Type:
  • boolean

sorting :boolean

Whether or not to allow the sorting component to store it's state.
Type:
  • boolean

Methods

<private> _uid() → {*}

Generates a unique identifier for the current FooTable.Table if one is not supplied through the options. This value is a combination of the url hash and either the element ID or an incremented global int value.
Returns:
Type
*

clear()

Executes the FooTable.Component#clearState function on all components.

<protected> destroy()

This method is called from the FooTable.Table#destroy method.
Inherited From:

<protected> draw()

This method is called from the FooTable.Table#draw method.
Inherited From:

get(key) → {*|null}

Gets the state value for the specified key for this table.
Parameters:
Name Type Description
key string The key to get the value for.
Returns:
Type
* | null

<protected> init()

The init method is called during the parent FooTable.Table constructor call.
Inherited From:

<protected> postdraw()

This method is called from the FooTable.Table#draw method.
Inherited From:

<protected> predraw()

This method is called from the FooTable.Table#draw method.
Inherited From:

<protected> preinit(data)

Checks the supplied data and options for the state component.
This:
Parameters:
Name Type Description
data object The jQuery data object from the parent table.
Fires:

read()

Executes the FooTable.Component#readState function on all components.

remove(key)

Clears the state value for the specified key for this table.
Parameters:
Name Type Description
key string The key to clear the value for.

set(key, data)

Sets the state value for the specified key for this table.
Parameters:
Name Type Description
key string The key to set the value for.
data * The value to store for the key. This value must be JSON.stringify friendly.

write()

Executes the FooTable.Component#writeState function on all components.
Copyright © 2016
Documentation generated by JSDoc 3.4.1 on 2017-07-06T21:37:43+02:00