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:
- Array.<FooTable.Row>
- Default Value:
- []
(protected) array :Array.<FooTable.Row>
The current working array of
FooTable.Row
objects.
Type:
- Array.<FooTable.Row>
- Default Value:
- []
(protected) destroy
This method is called from the
FooTable.Table#destroy
method.
- Inherited From:
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:
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
(protected) draw()
Performs the actual drawing of the table rows.
- Overrides:
(protected) init()
Initializes the rows class using the supplied table and options.
- Overrides:
Fires:
(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.
- Overrides:
(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. |
- Overrides: