TdClassNames

TdClassNames is a collection of utility functions that can be used in column definitions as the tdClassName attribute.

These functions typically combine cell data and summary information to produce a meaningful class name.

They can take the following arguments:

  • cellData {Object} The data for the cell
  • columnSummary {Object} The summary for the column
  • column {Object} The definition for the column
  • rowData {Object} The data for the row
  • highlightedColumn {Boolean} true if this column is highlighted
  • highlightedRow {Boolean} true if this row is highlighted
  • rowNumber {Number} The row number
  • tableData {Array} the data for the whole table
  • columns {Array} the definitions for all columns
Source:

Methods

(static) maxClassName(cellData, props) → {String}

Adds highlight-max to the cells that match max in the summary.

Parameters:
Name Type Description
cellData Any

the data for the cell

props Object

Additional props for the cell

Properties
Name Type Description
columnSummary Object

The column summary

column Object

The column definition

rowData Array

the data for the row

Source:
Returns:

classnames

Type
String

(static) minClassName(cellData, props) → {String}

Adds highlight-min to the cells that match min in the summary.

Parameters:
Name Type Description
cellData Any

the data for the cell

props Object

Additional props for the cell

Properties
Name Type Description
columnSummary Object

The column summary

column Object

The column definition

rowData Array

the data for the row

Source:
Returns:

classnames

Type
String

(static) minMaxClassName(cellData, props) → {String}

Adds highlight-min-max and one of highlight-min, highlight-max to the cells that match min and max in the summary

Parameters:
Name Type Description
cellData Any

the data for the cell

props Object

Additional props for the cell

Properties
Name Type Description
columnSummary Object

The column summary

column Object

The column definition

rowData Array

the data for the row

Source:
Returns:

classnames

Type
String