Constructor
new TableColumns(options)
- Source:
Creates an array of objects corresponding to the cells of defaultHeaderRow, that contain sortable property, denoting the column is sortable,
index of the column and reference to the cell. Adds .sortable to a sortable cell
Parameters:
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | options passed to configure the Sorting Properties
|
Methods
(static) computeColumns(theadnon-null, refTheadnon-null, defaultHeaderRowIndex) → (nullable) {Array}
- Source:
Gets an array of columns from the table
Parameters:
| Name | Type | Description |
|---|---|---|
thead |
HTMLTableElement | source table header |
refThead |
HTMLTableElement | reference table header from floating header if any |
defaultHeaderRowIndex |
Number | index of the row in |
Returns:
Returns an array of header cell nodes or null if thead is not specified
- Type
- Array
(static) getDefaultHeaderRow(theadnon-null, defaultHeaderRowIndexnon-null) → {Object}
- Source:
Calculates defaultHeaderRow for a passed thead
Parameters:
| Name | Type | Description |
|---|---|---|
thead |
HTMLTableElement | source table header |
defaultHeaderRowIndex |
Number | index of the row in |
Returns:
- Type
- Object
(static) getHeader(source)
- Source:
Gets a header
Parameters:
| Name | Type | Description |
|---|---|---|
source |
HTMLTableElement | source table headers are created for |
(static) getHeaderCells(theadnullable, defaultHeaderRowIndexnon-null) → (nullable) {Array}
- Source:
Gets an array of header cell nodes from default header row
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
thead |
HTMLTableElement |
<nullable> |
source table header |
defaultHeaderRowIndex |
Number | index of the row in |
Returns:
Returns an array of header cell nodes or null if thead is not specified
- Type
- Array