React Data GridGhostTable
Members
columns
Source codeghostTable.columns : Array
Added columns collection.
container
Source codeghostTable.container : HTMLElement | null
Container element where every table will be injected.
hot
Source codeghostTable.hot : Core
Handsontable instance.
injected
Source codeghostTable.injected : boolean
Flag which determine is table was injected to DOM.
rows
Source codeghostTable.rows : Array
Added rows collection.
samples
Source codeghostTable.samples : Map
Samples prepared for calculations.
Default: {null}
settings
Source codeghostTable.settings : object
Ghost table settings.
Default: {Object}
Methods
addColumn
Source codeghostTable.addColumn(column, samples)
Add column.
Param | Type | Description |
---|---|---|
column | number | Visual column index. |
samples | Map | A map with sampled table values. |
addColumnHeadersRow
Source codeghostTable.addColumnHeadersRow(samples)
Add a row consisting of the column headers.
Param | Type | Description |
---|---|---|
samples | Map | A map with sampled table values. |
addRow
Source codeghostTable.addRow(row, samples)
Add row.
Param | Type | Description |
---|---|---|
row | number | Visual row index. |
samples | Map | Samples Map object. |
appendColumnHeadersRow
Source codeghostTable.appendColumnHeadersRow()
Creates DOM elements for headers and appends them to the THEAD element of the table.
clean
Source codeghostTable.clean()
Remove table from document and reset internal state.
createCol
Source codeghostTable.createCol(column) ⇒ DocumentFragment
Create table column elements.
Param | Type | Description |
---|---|---|
column | number | Visual column index. |
Returns: DocumentFragment
- Returns created column table column elements.
createColElement
Source codeghostTable.createColElement(column, row) ⇒ HTMLElement
Create col element.
Param | Type | Description |
---|---|---|
column | number | Visual column index. |
row | number | Visual row index. |
createColGroupsCol
Source codeghostTable.createColGroupsCol(row) ⇒ DocumentFragment
Create colgroup col elements.
Param | Type | Description |
---|---|---|
row | number | Visual row index. |
createContainer
Source codeghostTable.createContainer(className) ⇒ object
Create container for tables.
Param | Type | Description |
---|---|---|
className | string | The CSS classes to add. |
createRow
Source codeghostTable.createRow(row) ⇒ DocumentFragment
Create table row element.
Param | Type | Description |
---|---|---|
row | number | Visual row index. |
Returns: DocumentFragment
- Returns created table row elements.
createTable
Source codeghostTable.createTable(className) ⇒ object
Create table element.
Param | Type | Description |
---|---|---|
className | string | The CSS classes to add. |
getHeights
Source codeghostTable.getHeights(callback)
Get calculated heights.
Param | Type | Description |
---|---|---|
callback | function | Callback which will be fired for each calculated row. |
getSetting
Source codeghostTable.getSetting(name) ⇒ boolean | null
Get a single Ghost Table setting.
Param | Type | Description |
---|---|---|
name | string | The setting name to get. |
getSettings
Source codeghostTable.getSettings() ⇒ object | null
Get the Ghost Table settings.
getWidths
Source codeghostTable.getWidths(callback)
Get calculated widths.
Param | Type | Description |
---|---|---|
callback | function | Callback which will be fired for each calculated column. |
injectTable
Source codeghostTable.injectTable([parent])
Inject generated table into document.
Param | Type | Default | Description |
---|---|---|---|
[parent] | HTMLElement | null | optional The element to which the ghost table is injected. |
isHorizontal
Source codeghostTable.isHorizontal() ⇒ boolean
Checks if table is raised horizontally (checking columns).
isVertical
Source codeghostTable.isVertical() ⇒ boolean
Checks if table is raised vertically (checking rows).
removeTable
Source codeghostTable.removeTable()
Remove table from document.
setSetting
Source codeghostTable.setSetting(name, value)
Set a single setting of the Ghost Table.
Param | Type | Description |
---|---|---|
name | string | Setting name. |
value | * | Setting value. |
setSettings
Source codeghostTable.setSettings(settings)
Set the Ghost Table settings to the provided object.
Param | Type | Description |
---|---|---|
settings | object | New Ghost Table Settings. |