lib/Utils.js
function renderCell(cellData, column, rowData, rowNumber, tableData, columns, isBottomData, columnSummary) {
  var renderer = column.renderer;
  var renderOnNull = column.renderOnNull;

  // render if not bottom data-- bottomData's cellData is already rendered.

  if (!isBottomData) {
    // do not render if value is null and `renderOnNull` is not explicitly set to true
    if (cellData == null && renderOnNull !== true) {
      return null;

      // render normally if a renderer is provided
    } else if (renderer != null) {
      return renderer(cellData, { column: column, rowData: rowData, rowNumber: rowNumber, tableData: tableData, columns: columns, columnSummary: columnSummary });
    }
  }

  // otherwise, render the raw cell data
  return cellData;
}
function renderCell(cellData, column, rowData, rowNumber, tableData, columns, isBottomData, columnSummary) {
  var renderer = column.renderer;
  var renderOnNull = column.renderOnNull;

  // render if not bottom data-- bottomData's cellData is already rendered.

  if (!isBottomData) {
    // do not render if value is null and `renderOnNull` is not explicitly set to true
    if (cellData == null && renderOnNull !== true) {
      return null;

      // render normally if a renderer is provided
    } else if (renderer != null) {
      return renderer(cellData, { column: column, rowData: rowData, rowNumber: rowNumber, tableData: tableData, columns: columns, columnSummary: columnSummary });
    }
  }

  // otherwise, render the raw cell data
  return cellData;
}
function renderCell ( cellData , column , rowData , rowNumber , tableData , columns , isBottomData , columnSummary ) { var renderer = column . renderer ; var renderOnNull = column . renderOnNull ; // render if not bottom data-- bottomData's cellData is already rendered. if ( ! isBottomData ) { // do not render if value is null and `renderOnNull` is not explicitly set to true if ( cellData == null && renderOnNull !== true ) { return null ; // render normally if a renderer is provided } else if ( renderer != null ) { return renderer ( cellData , { column : column , rowData : rowData , rowNumber : rowNumber , tableData : tableData , columns : columns , columnSummary : columnSummary } ) ; } } // otherwise, render the raw cell data return cellData ; }
Renders a cell's contents based on the renderer function. If no
renderer is provided, it just returns the raw cell data. In such
cases, the user should take care that cellData can be rendered
directly.

@param {Any} cellData The data for the cell
@param {Object} column The column definition
@param {Object} rowData The data for the row
@param {Number} rowNumber The number of the row
@param {Object[]} tableData The array of data for the whole table
@param {Object[]} columns The column definitions for the whole table
@return {Renderable} The contents of the cell
Renders a cell s contents based on the renderer function . If no renderer is provided it just returns the raw cell data . In such cases the user should take care that cellData can be rendered directly .