Class: Rows

FooTable. Rows

new Rows(table) → {FooTable.Rows}

The rows class contains all the logic for handling rows.
Parameters:
Name Type Description
table FooTable.Table The parent FooTable.Table this component belongs to.
Returns:
Type
FooTable.Rows

Extends

Members

$empty :jQuery

The jQuery object that contains the empty row control.
Type:

<protected> all :Array.<FooTable.Row>

The base array of rows parsed from either the DOM or the constructor options. The FooTable.Rows#current member is populated with a shallow clone of this array during the predraw operation before any core or custom components are executed.
Type:
Default Value:
  • []

<protected> array :Array.<FooTable.Row>

The current working array of FooTable.Row objects.
Type:
Default Value:
  • []

emptyString :string

The text to display when the table has no rows.
Type:
  • string

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:

expandAll :boolean

Whether or not all row details are expanded by default when displayed on a device that hides any columns.
Type:
  • boolean

expandFirst :boolean

Whether or not the first rows details are expanded by default when displayed on a device that hides any columns.
Type:
  • boolean

ft :FooTable.Table

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

<protected> o :FooTable.Table#options

This provides a shortcut to the FooTable.Table#options object.
Type:
  • FooTable.Table#options

showToggle :boolean

Whether or not to display a toggle in each row when it contains hidden columns.
Type:
  • boolean
Default Value:
  • true

toggleColumn :string

Specifies which column the row toggle is appended to. Supports only two values; "first" and "last"
Type:
  • string

toggleSelector :string

The CSS selector used to filter row click events. If the event.target property matches the selector the row will be toggled.
Type:
  • string
Default Value:
  • "tr,td,.footable-toggle"

Methods

collapse()

Collapses all visible rows.

<protected> destroy()

Destroys the rows component removing any UI generated from the table.
Fires:

<protected> draw()

Performs the actual drawing of the table rows.

expand()

Expands all visible rows.

<protected> init()

Initializes the rows class using the supplied table and options.
Fires:

load(data, append)

Loads a JSON array of row objects into the table
Parameters:
Name Type Argument Default Description
data Array.<object> An array of row objects to load.
append boolean <optional>
false Whether or not to append the new rows to the current rows array or to replace them entirely.

<protected> parse() → {jQuery.Promise}

This parses the rows from either the tables rows or the supplied options.
Returns:
Type
jQuery.Promise

<protected> parseFinalize(deferred, rows)

Used to finalize the parsing of rows it is supplied the parse deferred object which must be resolved with an array of FooTable.Row objects or rejected with an error.
Parameters:
Name Type Description
deferred jQuery.Deferred The deferred object used for parsing.
rows Array.<object> | jQuery An array of row values and options or the jQuery object containing all rows.

<protected> postdraw()

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

<protected> predraw()

Performs the predraw operations that are required including creating the shallow clone of the FooTable.Rows#array to work with.

<protected> preinit(data)

The columns preinit method is used to parse and check the column options supplied from both static content and through the constructor.
Parameters:
Name Type Description
data object The jQuery data object from the root table element.
Fires:
Copyright © 2016
Documentation generated by JSDoc 3.4.1 on 2017-07-06T21:37:43+02:00