new Export(table)
This component provides some basic export functionality.
Parameters:
Name | Type | Description |
---|---|---|
table |
FooTable.Table | The current instance of the plugin. |
Members
-
snapshot :Array.<FooTable.Row>
A snapshot of the working set of rows prior to being trimmed by the paging component.
-
Type:
- Array.<FooTable.Row>
Methods
-
columns() → {Array.<Object>}
Return the columns as simple JavaScript objects in an array.
-
Returns:
- Type
- Array.<Object>
-
csv(filtered) → {string}
Return the columns and rows as a properly formatted CSV value.
-
Parameters:
Name Type Argument Default Description filtered
boolean <optional>
false Whether or not to exclude filtered rows from the result. Returns:
- Type
- string
-
json(filtered) → {Object}
Return the columns and rows as a properly formatted JSON object.
-
Parameters:
Name Type Argument Default Description filtered
boolean <optional>
false Whether or not to exclude filtered rows from the result. Returns:
- Type
- Object
-
predraw()
Hooks into the predraw pipeline after sorting and filtering have taken place but prior to paging.
-
This method allows us to take a snapshot of the working set of rows before they are trimmed by the paging component and is called by the plugin instance.
-
rows(filtered) → {Array.<Object>}
Return the rows as simple JavaScript objects in an array.
-
Parameters:
Name Type Argument Default Description filtered
boolean <optional>
false Whether or not to exclude filtered rows from the result. Returns:
- Type
- Array.<Object>