Class: GhostTable

GhostTable

handsontable/src/utils/ghostTable.js, line 4

Members

columnsArray

Added columns collection.

containerHTMLElement null

Container element where every table will be injected.

container*

Temporary element created to get minimal headers widths.

hotCore

Handsontable instance.

injectedBoolean

Flag which determine is table was injected to DOM.

nestedHeadersNestedHeaders

Reference to NestedHeaders plugin.

rowsArray

Added rows collection.

samplesMap

Samples prepared for calculations.

Default Value:
  • {null}

settingsObject

Ghost table settings.

Default Value:
  • {Object}

widthsCacheArray

Cached the headers widths.

Methods

handsontable/src/utils/ghostTable.js, line 109

addColumn(column, samples)

Add column.

Parameters:
Name Type Description
column Number

Column index.

samples Map

Samples Map object.

handsontable/src/utils/ghostTable.js, line 86

addColumnHeadersRow()

Add a row consisting of the column headers.

handsontable/src/utils/ghostTable.js, line 64

addRow(row, samples)

Add row.

Parameters:
Name Type Description
row Number

Row index.

samples Map

Samples Map object.

handsontable/src/utils/ghostTable.js, line 322

clean()

Remove table from document and reset internal state.

handsontable-pro/src/plugins/nestedHeaders/utils/ghostTable.js, line 115

clear()

Clear the widths cache.

handsontable/src/utils/ghostTable.js, line 294

createCol(column){DocumentFragment}

Create table column elements.

Parameters:
Name Type Description
column Number

Column index.

Returns: {DocumentFragment} Returns created column table column elements.
handsontable/src/utils/ghostTable.js, line 363

createColElement(column){HTMLElement}

Create col element.

Parameters:
Name Type Description
column Number

Column index.

Returns: {HTMLElement}
handsontable/src/utils/ghostTable.js, line 211

createColGroupsCol(){DocumentFragment}

Create colgroup col elements.

Returns: {DocumentFragment}
handsontable/src/utils/ghostTable.js, line 415

createContainer(className){Object}

Create container for tables.

Parameters:
Name Type Description
className String
Returns: {Object}
handsontable/src/utils/ghostTable.js, line 234

createRow(row){DocumentFragment}

Create table row element.

Parameters:
Name Type Description
row Number

Row index.

Returns: {DocumentFragment} Returns created table row elements.
handsontable/src/utils/ghostTable.js, line 378

createTable(className){Object}

Create table element.

Parameters:
Name Type Description
className String
Returns: {Object}
handsontable/src/utils/ghostTable.js, line 136

getHeights(callback)

Get calculated heights.

Parameters:
Name Type Description
callback function

Callback which will be fired for each calculated row.

handsontable/src/utils/ghostTable.js, line 198

getSetting(name){Boolean|null}

Get a single Ghost Table setting.

Parameters:
Name Type Description
name String
Returns: {Boolean|null}
handsontable/src/utils/ghostTable.js, line 188

getSettings(){Object|null}

Get the Ghost Table settings.

Returns: {Object|null}
handsontable/src/utils/ghostTable.js, line 151

getWidths(callback)

Get calculated widths.

Parameters:
Name Type Description
callback function

Callback which will be fired for each calculated column.

handsontable/src/utils/ghostTable.js, line 339

injectTable(parent)

Inject generated table into document.

Parameters:
Name Type Default Description
parent HTMLElement null optional
handsontable/src/utils/ghostTable.js, line 441

isHorizontal(){Boolean}

Checks if table is raised horizontally (checking columns).

Returns: {Boolean}
handsontable/src/utils/ghostTable.js, line 432

isVertical(){Boolean}

Checks if table is raised vertically (checking rows).

Returns: {Boolean}
handsontable/src/utils/ghostTable.js, line 349

removeTable()

Remove table from document.

handsontable/src/utils/ghostTable.js, line 175

setSetting(name, value)

Set a single setting of the Ghost Table.

Parameters:
Name Type Description
name String

Setting name.

value *

Setting value.

handsontable/src/utils/ghostTable.js, line 165

setSettings(settings)

Set the Ghost Table settings to the provided object.

Parameters:
Name Type Description
settings Object

New Ghost Table Settings