TableView

Parameters:
Name Type Description
instance Hanstontable

Instance of Handsontable.

Members

TBODYHTMLTableSectionElement

Main element.

THEADHTMLTableSectionElement

Main element.

wtWalkontable

Main Walkontable instance.

Methods

countNotHiddenColumnIndexes(visualIndex, incrementBy){number}

Returns number of not hidden column indexes counting from the passed starting index.
The counting direction can be controlled by incrementBy argument.

Parameters:
Name Type Description
visualIndex number

The visual index from which the counting begins.

incrementBy number

If -1 then counting is backwards or forward when 1.

Returns: {number}

countNotHiddenIndexes(visualIndex, incrementBy, indexMapper, renderableIndexesCount){number}

Returns number of not hidden indexes counting from the passed starting index.
The counting direction can be controlled by incrementBy argument.

Parameters:
Name Type Description
visualIndex number

The visual index from which the counting begins.

incrementBy number

If -1 then counting is backwards or forward when 1.

indexMapper IndexMapper

The IndexMapper instance for specific axis.

renderableIndexesCount number

Total count of renderable indexes for specific axis.

Returns: {number}

countNotHiddenRowIndexes(visualIndex, incrementBy){number}

Returns number of not hidden row indexes counting from the passed starting index.
The counting direction can be controlled by incrementBy argument.

Parameters:
Name Type Description
visualIndex number

The visual index from which the counting begins.

incrementBy number

If -1 then counting is backwards or forward when 1.

Returns: {number}

countRenderableColumns(){number}

Returns the number of renderable columns.

Returns: {number}

countRenderableRows(){number}

Returns the number of renderable rows.

Returns: {number}

getCellAtCoords(coords, topmost){HTMLTableCellElement|null}

Returns td object given coordinates.

Parameters:
Name Type Description
coords CellCoords

Renderable cell coordinates.

topmost boolean

Indicates whether the cell should be calculated from the topmost.

Returns: {HTMLTableCellElement|null}

getLastSize(){object}

Returns cached dimensions.

Returns: {object}

render()

Renders WalkontableUI.

scrollViewport(coords, snapToTop, snapToRight, snapToBottom, snapToLeft){boolean}

Scroll viewport to a cell.

Parameters:
Name Type Description
coords CellCoords

Renderable cell coordinates.

snapToTop boolean optional

If true, viewport is scrolled to show the cell on the top of the table.

snapToRight boolean optional

If true, viewport is scrolled to show the cell on the right side of the table.

snapToBottom boolean optional

If true, viewport is scrolled to show the cell on the bottom side of the table.

snapToLeft boolean optional

If true, viewport is scrolled to show the cell on the left side of the table.

Returns: {boolean}

scrollViewportHorizontally(column, snapToRight, snapToLeft){boolean}

Scroll viewport to a column.

Parameters:
Name Type Description
column number

Renderable column index.

snapToRight boolean optional

If true, viewport is scrolled to show the cell on the right side of the table.

snapToLeft boolean optional

If true, viewport is scrolled to show the cell on the left side of the table.

Returns: {boolean}

scrollViewportVertically(row, snapToTop, snapToBottom){boolean}

Scroll viewport to a row.

Parameters:
Name Type Description
row number

Renderable row index.

snapToTop boolean optional

If true, viewport is scrolled to show the cell on the top of the table.

snapToBottom boolean optional

If true, viewport is scrolled to show the cell on the bottom side of the table.

Returns: {boolean}

setLastSize(width, height)

Sets new dimensions of the container.

Parameters:
Name Type Description
width number

The table width.

height number

The table height.

translateFromRenderableToVisualCoords(coords){CellCoords}

Translate renderable cell coordinates to visual coordinates.

Parameters:
Name Type Description
coords CellCoords

The cell coordinates.

Returns: {CellCoords}

translateFromRenderableToVisualIndex(renderableRow, renderableColumn){Array.<number>}

Translate renderable row and column indexes to visual row and column indexes.

Parameters:
Name Type Description
renderableRow number

Renderable row index.

renderableColumn number

Renderable columnIndex.

Returns: {Array.<number>}

updateCellHeader(element, index, content)

Updates header cell content.

Parameters:
Name Type Description
element HTMLElement

Element to update.

index number

Row index or column index.

content function

Function which should be returns content for this cell.

Since: 0.15.0-beta4
Class: TableView