Plugin, which allows merging cells in the table (using the initial configuration, API or context menu).
Example
...
let hot = new Handsontable(document.getElementById('example'), {
data: getData(),
mergeCells: [
{row: 0, col: 3, rowspan: 3, colspan: 3},
{row: 2, col: 6, rowspan: 2, colspan: 2},
{row: 4, col: 8, rowspan: 3, colspan: 3}
],
...
Members
-
mergedCellsCollectionMergedCellsCollection
-
A container for all the merged cells.
Methods
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 269
clearCollections()
-
Clear the merged cells from the merged cell container.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 124
disablePlugin()
-
Disable the plugin.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 86
enablePlugin()
-
Enable the plugin.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 79
isEnabled(){Boolean}
-
Check if the plugin is enabled in the Handsontable settings.
Returns: {Boolean}
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 467
merge(startRow, startColumn, endRow, endColumn)
-
Merge the specified range.
Parameters:
Name Type Description startRow
Number Start row of the merged cell.
startColumn
Number Start column of the merged cell.
endRow
Number End row of the merged cell.
endColumn
Number End column of the merged cell.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 310
mergeSelection(cellRange)
-
Merge the selection provided as a cell range.
Parameters:
Name Type Description cellRange
CellRange optional Selection cell range.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 482
unmerge(startRow, startColumn, endRow, endColumn)
-
Unmerge the merged cell in the provided range.
Parameters:
Name Type Description startRow
Number Start row of the merged cell.
startColumn
Number Start column of the merged cell.
endRow
Number End row of the merged cell.
endColumn
Number End column of the merged cell.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 329
unmergeSelection(cellRange)
-
Unmerge the selection provided as a cell range.
Parameters:
Name Type Description cellRange
CellRange optional Selection cell range.
-
handsontable/src/plugins/mergeCells/mergeCells.js, line 133
updatePlugin()
-
Update the plugin (after using the
updateSettings
method)