Module: table

Generic table component

Source:

Example

<Table />

Methods

(function) beforeRouteEnter()

Method beforeRouteEnter
Source:

(function) beforeRouteUpdate()

Method beforeRouteUpdate
Source:

(computed) btnSize()

Method btnSize
Source:

(computed) editColumns()

Method editColumns
Source:

(computed) editStyle()

Method editStyle
Source:

(computed) filterStyle()

Method filterStyle
Source:

(computed) nRows()

Method nRows
Source:

(computed) rowsFiltered()

Method rowsFiltered
Source:

(computed) tableStyle()

Method tableStyle
Source:

(function) data()

Method data
Source:

(method) clearFilter()

Clear the filter

Source:

(method) handleKeyDown(event, isParent)

Handles the keydown event.

Parameters:
Name Type Description
event Event

The keydown event object.

isParent boolean

Indicates whether the event is triggered by a parent component.

Source:

(method) openDetails(row)

Opens the details view for a given row.

Parameters:
Name Type Description
row Object

The row object containing the data for the selected row.

Source:

(method) scroll(details)

Scroll event

Parameters:
Name Type Description
details *
Source:

(method) selectedRowsLabel()

Text displaying the number of selected rows

Source:

(watcher) filter()

Method filter
Source:

(function) handler()

Method handler
Source:

(function) data()

Method data
Source:

(method) calcWidth(type) → {string}

Calculates the width of a column based on its type.

Parameters:
Name Type Description
type string

The type of the column.

Source:
Returns:

The width of the column.

Type
string

(method) createContentForExport(exportRows, columns) → {string}

Creates content for export based on the provided export rows and columns.

Parameters:
Name Type Description
exportRows Array

The rows to be exported.

columns Array

The columns to be exported.

Source:
Returns:

The content for export.

Type
string

(method) deleteInStore(row) → {void}

Deletes a row from the array in store, if necessary.

Parameters:
Name Type Description
row Object

The row to be deleted.

Source:
Returns:
Type
void

(method) exportTable()

Exports the tableAPI to a CSV file.

Source:

(method) init()

Initializes the tableAPI component.

Source:

(method) initPopupProps(action, rowToPass, rows)

Initializes the properties for custom component in popup.

Parameters:
Name Type Description
action string

The action to be performed.

rowToPass Object

The row object to be passed to the popup.

rows Array

The array of rows in the table.

Source:

(method) prepareRoute(action, row, rows) → {void}

Prepares and activates a route based on the provided action, row, and rows.

Parameters:
Name Type Description
action Object

The action object containing route information.

row Object

The row object.

rows Array

The array of rows.

Source:
Returns:
Type
void

(method) reload()

Method reload
Source:

(method) replaceVariables(obj, rowToPass)

Replaces moustache variables in an object with corresponding values from row.

Parameters:
Name Type Description
obj Object

The object containing variables to be replaced.

rowToPass Object

The object containing values to replace the variables.

Source:

(method) runRowAction(action, row)

Runs a row action.

Parameters:
Name Type Description
action Object

Action to be run.

row Object

The row to be acted upon.

Source:

(method) runTableAction(action)

Runs a tableAPI action (custom function).

Parameters:
Name Type Description
action Object

Action to be run.

Source:

(method) showRowInfo(row)

Shows the row info in a popup.

Parameters:
Name Type Description
row Object

The row to show info for.

Source:

(method) swapIdAndValColumns(columns)

Swaps the id and value columns for lookup fields.

Parameters:
Name Type Description
columns *
Source:

(method) wrapCsvValue(val, formatFn, row) → {string}

Wraps a value in a CSV cell.

Parameters:
Name Type Description
val *

The value to be wrapped.

formatFn *

The function to format the value.

row *

The row containing the value.

Source:
Returns:

The wrapped value.

Type
string

(function) format()

Method format
Source:

(function) "timestamp with time zone"()

Method "timestamp with time zone"
Source:

(function) date()

Method date
Source:

(function) numeric()

Method numeric
Source:

A mixin object containing methods for table initalization and action invocations

Source:

Methods

(function) beforeRouteEnter()

Method beforeRouteEnter
Source:

(function) beforeRouteUpdate()

Method beforeRouteUpdate
Source:

(computed) btnSize()

Method btnSize
Source:

(computed) editColumns()

Method editColumns
Source:

(computed) editStyle()

Method editStyle
Source:

(computed) filterStyle()

Method filterStyle
Source:

(computed) nRows()

Method nRows
Source:

(computed) rowsFiltered()

Method rowsFiltered
Source:

(computed) tableStyle()

Method tableStyle
Source:

(function) data()

Method data
Source:

(method) clearFilter()

Clear the filter

Source:

(method) handleKeyDown(event, isParent)

Handles the keydown event.

Parameters:
Name Type Description
event Event

The keydown event object.

isParent boolean

Indicates whether the event is triggered by a parent component.

Source:

(method) openDetails(row)

Opens the details view for a given row.

Parameters:
Name Type Description
row Object

The row object containing the data for the selected row.

Source:

(method) scroll(details)

Scroll event

Parameters:
Name Type Description
details *
Source:

(method) selectedRowsLabel()

Text displaying the number of selected rows

Source:

(watcher) filter()

Method filter
Source:

(function) handler()

Method handler
Source:

(function) data()

Method data
Source:

(method) calcWidth(type) → {string}

Calculates the width of a column based on its type.

Parameters:
Name Type Description
type string

The type of the column.

Source:
Returns:

The width of the column.

Type
string

(method) createContentForExport(exportRows, columns) → {string}

Creates content for export based on the provided export rows and columns.

Parameters:
Name Type Description
exportRows Array

The rows to be exported.

columns Array

The columns to be exported.

Source:
Returns:

The content for export.

Type
string

(method) deleteInStore(row) → {void}

Deletes a row from the array in store, if necessary.

Parameters:
Name Type Description
row Object

The row to be deleted.

Source:
Returns:
Type
void

(method) exportTable()

Exports the tableAPI to a CSV file.

Source:

(method) init()

Initializes the tableAPI component.

Source:

(method) initPopupProps(action, rowToPass, rows)

Initializes the properties for custom component in popup.

Parameters:
Name Type Description
action string

The action to be performed.

rowToPass Object

The row object to be passed to the popup.

rows Array

The array of rows in the table.

Source:

(method) prepareRoute(action, row, rows) → {void}

Prepares and activates a route based on the provided action, row, and rows.

Parameters:
Name Type Description
action Object

The action object containing route information.

row Object

The row object.

rows Array

The array of rows.

Source:
Returns:
Type
void

(method) reload()

Method reload
Source:

(method) replaceVariables(obj, rowToPass)

Replaces moustache variables in an object with corresponding values from row.

Parameters:
Name Type Description
obj Object

The object containing variables to be replaced.

rowToPass Object

The object containing values to replace the variables.

Source:

(method) runRowAction(action, row)

Runs a row action.

Parameters:
Name Type Description
action Object

Action to be run.

row Object

The row to be acted upon.

Source:

(method) runTableAction(action)

Runs a tableAPI action (custom function).

Parameters:
Name Type Description
action Object

Action to be run.

Source:

(method) showRowInfo(row)

Shows the row info in a popup.

Parameters:
Name Type Description
row Object

The row to show info for.

Source:

(method) swapIdAndValColumns(columns)

Swaps the id and value columns for lookup fields.

Parameters:
Name Type Description
columns *
Source:

(method) wrapCsvValue(val, formatFn, row) → {string}

Wraps a value in a CSV cell.

Parameters:
Name Type Description
val *

The value to be wrapped.

formatFn *

The function to format the value.

row *

The row containing the value.

Source:
Returns:

The wrapped value.

Type
string

(function) format()

Method format
Source:

(function) "timestamp with time zone"()

Method "timestamp with time zone"
Source:

(function) date()

Method date
Source:

(function) numeric()

Method numeric
Source: