Class: Row

TableComponents. Row


new Row()

Table row component

Properties:
Name Type Argument Description
data object
dataKeys array
options object <optional>
handleDragStart function
handleDragEnd function
handleDragOverRow function
Source:
See:

Methods


<private, static> _determineDeactivateStrings()

Determine if this row has been soft deleted and return the appropriate action name and button type.

Source:
Returns:
Type
object

<private, static> _shouldHighlightRow(classes)

Run tests to determine if this row is special

Parameters:
Name Type Description
classes object

Any classes that should be added to the html

Source:
Returns:

The classes to be added.

Type
object

<static> buildActionOptions()

Create action buttons for the row.
For example, an "edit" button will be added if the resource is editable.
When edit is clicked, renders a "save" and "cancel" button.

Adds any buttons to the last column in the row.

Source:
Returns:
Type
jsx

<static> buildRowData()

Build row data based on state passed from user parent component

Source:
Returns:
Type
Array.<jsx>

<static> cancelEdit(event)

Cancels an edit action

Parameters:
Name Type Description
event event
Source:
Returns:
Type
null

<static> componentDidMount()

The row component is only mounted when data exists (retrieved from the API or wherever its source is). This
means that there is no componentWillReceiveProps being fired as it does not fire on mount but when there is
a new set of props to compare to an old set. We can require props.data to be present and then be sure that
data props exist in this component on mount and handle any componentWillReceiveProps-esque logic here.

Source:
See:
Returns:
Type
null

<static> componentWillReceiveProps(nextProps)

Set up props when passed down
For subsequent updates (user presses cancel, etc)

Parameters:
Name Type Description
nextProps object
Source:
Returns:
Type
null

<static> doActionOnResource(action)

Fire a named action event to the parent component's registered callback

Parameters:
Name Type Description
action string

The action that is getting fired. Determines the path through this function

Source:
Returns:
Type
null

<static> getInitialState()

Gets the initial state of the component

Source:
Returns:
Type
object

<static> handleChange(key, value, component)

Receive changes to row's inputs and updates state.

Parameters:
Name Type Description
key string
value *
component *
Source:
Returns:
Type
null

<static> hideSave()

Handles hiding the save button by updating state.
This can't be a simple toggle because of repeated onFocus events from the Input.

Source:
Returns:
Type
null

<static> mutateData(column, value, index)

Handle any custom data presentation mutators.

Parameters:
Name Type Description
column object
value *
index number
Source:
Returns:
Type
*

<static> render()

Renders the component.

Source:
Returns:
Type
jsx

<static> rowClasses()

Classes for styling the table rows.

Source:
Returns:
Type
object

<static> selectRow(event)

Selecting a checkbox will set its bind resource's 'selected' property to selected true
fires the 'selectedRow' action

Parameters:
Name Type Description
event event
Source:
Returns:

null


<static> showSave()

Handles showing the save button by updating state.
This can't be a simple toggle because of repeated onFocus events from the Input.

Source:
Returns:
Type
null