Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/tables.utils"

Index

Functions

generateBody

  • generateBody(headers: TableHeading[], body: any[]): HTMLTableSectionElement
  • Generates the body for the HTMLTable.

    Parameters

    • headers: TableHeading[]

      List of headings

    • body: any[]

      Array of rows data.

    Returns HTMLTableSectionElement

    The tbody element for the body with all the rows.

generateCellValue

  • generateCellValue(value: any): HTMLTableDataCellElement
  • Generates the cell value for a table cell.

    If value is a array, it generates a ul list, else a plain text.

    Parameters

    • value: any

      Value to insert in the cell.

    Returns HTMLTableDataCellElement

    td element for the cell.

generateHead

  • generateHead(headers: TableHeading[]): HTMLTableSectionElement
  • Generates the heading for the HTMLTable.

    Parameters

    Returns HTMLTableSectionElement

    The thead element for the header with all the headings.

generateTable

  • generateTable(headers: TableHeading[], body: any[]): HTMLTableElement
  • Generates a HTMLTable with given headings and data.

    export

    Parameters

    • headers: TableHeading[]

      List of headings

    • body: any[]

      Rows of data

    Returns HTMLTableElement

    The HTMLTable with the data and headings.

getMaxRowSpan

  • Get's the maximum row a header can span.

    Parameters

    Returns number

    Returns 1 if no sub heading exists, 2 otherwise.

Generated using TypeDoc