Class: SumRow

TableComponents. SumRow


new SumRow()

Table sum rows component
If the summableRows option is a property of the options object on a table,
this component will sum the value for that column, and add it to the last row
of the table. Any columns that are not summable are rendered as an empty cell.

Adjacent empty cells will be collapsed into a single cell.

Properties:
Name Type Argument Description
data object

The data to display for this row.

dataKeys object

The data keys to display from data. Each key maps to a single cell.

rows array

All the rows for the table.

options object <optional>

Additional options to configure that data.

Source:
See:

Methods


<static> buildRowData()

Builds the data for the row one step at a time.
First, loop through the keys to find all summable rows.
Then, start adding the jsx to an array to be rendered as the final row.

Source:
Returns:
Type
jsx

<static> mutateData(column, value, row)

Handle any custom data presentation mutators

Parameters:
Name Type Description
column object

The column to mutate.

value *

The value that is being mutated.

row object

The row being mutated.

Source:
Returns:
Type
*

<static> render()

Renders the SortButton component next to the column header.

Source:
Returns:
Type
jsx

<static> render()

Renders the finished SumRow component.

Source:
Returns:
Type
jsx

<static> toggleSort(event)

Toggles the sort direction for the clicked column header.

Parameters:
Name Type Description
event event

A click event triggering a sort.

Source:
Returns:
Type
null