Skip to content

Members

afterAddChild

Source code

afterAddChild(parent, element, index)

Fired by NestedRows plugin after adding a children to the NestedRows structure. This hook is fired when Options#nestedRows option is enabled.

ParamTypeDescription
parentobjectThe parent object.
elementobject
undefined
The element added as a child. If undefined, a blank child was added.
indexnumber
undefined
The index within the parent where the new child was added. If undefined, the element was added as the last child.

afterAutofill

Source code

afterAutofill(fillData, sourceRange, targetRange, direction)

Fired by Autofill plugin after populating the data in the autofill feature. This hook is fired when Options#fillHandle option is enabled.

Since: 8.0.0

ParamTypeDescription
fillDataArray<Array>The data that was used to fill the targetRange. If beforeAutofill was used and returned [[]], this will be the same object that was returned from beforeAutofill.
sourceRangeCellRangeThe range values will be filled from.
targetRangeCellRangeThe range new values will be filled into.
directionstringDeclares the direction of the autofill. Possible values: up, down, left, right.

afterBeginEditing

Source code

afterBeginEditing(row, column)

Fired after the editor is opened and rendered.

ParamTypeDescription
rownumberVisual row index of the edited cell.
columnnumberVisual column index of the edited cell.

afterCellMetaReset

Source code

afterCellMetaReset

Fired after resetting a cell’s meta. This happens when the Core#updateSettings method is called.

afterChange

Source code

afterChange(changes, [source])

Fired after one or more cells has been changed. The changes are triggered in any situation when the value is entered using an editor or changed using API (e.q setDataAtCell method).

Note: For performance reasons, the changes array is null for "loadData" source.

Example

new Handsontable(element, {
afterChange: (changes) => {
changes?.forEach(([row, prop, oldValue, newValue]) => {
// Some logic...
});
}
})
ParamTypeDescription
changesArray<Array>2D array containing information about each of the edited cells [[row, prop, oldVal, newVal], ...]. row is a visual row index.
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterColumnCollapse

Source code

afterColumnCollapse(currentCollapsedColumns, destinationCollapsedColumns, collapsePossible, successfullyCollapsed)

Fired by CollapsibleColumns plugin before columns collapse. This hook is fired when Options#collapsibleColumns option is enabled.

Since: 8.0.0

ParamTypeDescription
currentCollapsedColumnsArrayCurrent collapsible configuration - a list of collapsible physical column indexes.
destinationCollapsedColumnsArrayDestination collapsible configuration - a list of collapsible physical column indexes.
collapsePossiblebooleantrue, if all of the column indexes are withing the bounds of the collapsed sections, false otherwise.
successfullyCollapsedbooleantrue, if the action affected any non-collapsible column, false otherwise.

afterColumnExpand

Source code

afterColumnExpand(currentCollapsedColumns, destinationCollapsedColumns, expandPossible, successfullyExpanded)

Fired by CollapsibleColumns plugin before columns expand. This hook is fired when Options#collapsibleColumns option is enabled.

Since: 8.0.0

ParamTypeDescription
currentCollapsedColumnsArrayCurrent collapsible configuration - a list of collapsible physical column indexes.
destinationCollapsedColumnsArrayDestination collapsible configuration - a list of collapsible physical column indexes.
expandPossiblebooleantrue, if all of the column indexes are withing the bounds of the collapsed sections, false otherwise.
successfullyExpandedbooleantrue, if the action affected any non-collapsible column, false otherwise.

afterColumnFreeze

Source code

afterColumnFreeze(column, freezePerformed)

Fired by the ManualColumnFreeze plugin, right after freezing a column.

Since: 12.1.0

ParamTypeDescription
columnnumberThe visual index of the frozen column.
freezePerformedbooleanIf true: the column got successfully frozen. If false: the column didn’t get frozen.

afterColumnMove

Source code

afterColumnMove(movedColumns, finalIndex, dropIndex, movePossible, orderChanged)

Fired by ManualColumnMove plugin after changing order of the visual indexes. This hook is fired when Options#manualColumnMove option is enabled.

ParamTypeDescription
movedColumnsArrayArray of visual column indexes to be moved.
finalIndexnumberVisual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action. To check visualization of final index please take a look at documentation.
dropIndexnumber
undefined
Visual column index, being a drop index for the moved columns. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. It’s undefined when dragColumns function wasn’t called.
movePossiblebooleanIndicates if it was possible to move columns to the desired position.
orderChangedbooleanIndicates if order of columns was changed by move.

afterColumnResize

Source code

afterColumnResize(newSize, column, isDoubleClick)

Fired by ManualColumnResize plugin after rendering the table with modified column sizes. This hook is fired when Options#manualColumnResize option is enabled.

ParamTypeDescription
newSizenumberCalculated new column width.
columnnumberVisual index of the resized column.
isDoubleClickbooleanFlag that determines whether there was a double-click.

afterColumnSequenceCacheUpdate

Source code

afterColumnSequenceCacheUpdate(indexesChangesState)

Fired after the cache of the column sequence has been updated.

Since: 16.2.0

ParamTypeDescription
indexesChangesStateobjectObject containing information about the changes to the column sequence.
indexesChangesState.indexesSequenceChangedbooleanIndicates if the sequence of indexes has changed.
indexesChangesState.trimmedIndexesChangedbooleanIndicates if the trimmed indexes have changed.
indexesChangesState.hiddenIndexesChangedbooleanIndicates if the hidden indexes have changed.

afterColumnSequenceChange

Source code

afterColumnSequenceChange([source])

Fired after the order of columns has changed. This hook is fired by changing column indexes of any type supported by the IndexMapper.

ParamTypeDescription
[source]'init'
'remove'
'insert'
'move'
'update'
optional A string that indicates what caused the change to the order of columns.

afterColumnSort

Source code

afterColumnSort(currentSortConfig, destinationSortConfigs)

Fired by ColumnSorting and MultiColumnSorting plugins after sorting the column. This hook is fired when Options#columnSorting or Options#multiColumnSorting option is enabled.

ParamTypeDescription
currentSortConfigArrayCurrent sort configuration (for all sorted columns).
destinationSortConfigsArrayDestination sort configuration (for all sorted columns).

afterColumnUnfreeze

Source code

afterColumnUnfreeze(column, unfreezePerformed)

Fired by the ManualColumnFreeze plugin, right after unfreezing a column.

Since: 12.1.0

ParamTypeDescription
columnnumberThe visual index of the unfrozen column.
unfreezePerformedbooleanIf true: the column got successfully unfrozen. If false: the column didn’t get unfrozen.

afterContextMenuDefaultOptions

Source code

afterContextMenuDefaultOptions(predefinedItems)

Fired each time user opens ContextMenu and after setting up the context menu’s default options. These options are a collection which user can select by setting an array of keys or an array of objects in Options#contextMenu option.

ParamTypeDescription
predefinedItemsArrayAn array of objects containing information about the pre-defined context menu items.

afterContextMenuHide

Source code

afterContextMenuHide(context)

Fired by ContextMenu plugin after hiding the context menu. This hook is fired when Options#contextMenu option is enabled.

ParamTypeDescription
contextobjectThe ContextMenu plugin instance.

afterContextMenuShow

Source code

afterContextMenuShow(context)

Fired by ContextMenu plugin after opening the context menu. This hook is fired when Options#contextMenu option is enabled.

ParamTypeDescription
contextobjectThe ContextMenu plugin instance.

afterCopy

Source code

afterCopy(data, coords, copiedHeadersCount)

Fired by CopyPaste plugin after data are pasted into table. This hook is fired when Options#copyPaste option is enabled.

ParamTypeDescription
dataArray<Array>An array of arrays which contains the copied data.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) which was copied.
copiedHeadersCountObject(Since 12.3.0) The number of copied column headers.

afterCopyLimit

Source code

afterCopyLimit(selectedRows, selectedColumns, copyRowsLimit, copyColumnsLimit)

Fired by CopyPaste plugin after reaching the copy limit while copying data. This hook is fired when Options#copyPaste option is enabled.

ParamTypeDescription
selectedRowsnumberCount of selected copyable rows.
selectedColumnsnumberCount of selected copyable columns.
copyRowsLimitnumberCurrent copy rows limit.
copyColumnsLimitnumberCurrent copy columns limit.

afterCreateCol

Source code

afterCreateCol(index, amount, [source])

Fired after created a new column.

ParamTypeDescription
indexnumberRepresents the visual index of first newly created column in the data source.
amountnumberNumber of newly created columns in the data source.
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterCreateRow

Source code

afterCreateRow(index, amount, [source])

Fired after created a new row.

ParamTypeDescription
indexnumberRepresents the visual index of first newly created row in the data source array.
amountnumberNumber of newly created rows in the data source array.
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterCut

Source code

afterCut(data, coords)

Fired by CopyPaste plugin after data was cut out from the table. This hook is fired when Options#copyPaste option is enabled.

ParamTypeDescription
dataArray<Array>An array of arrays with the cut data.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) which was cut out.

afterDataProviderFetch

Source code

afterDataProviderFetch(result)

Fired after the dataProvider has fetched and loaded data.

Since: 17.1.0

ParamTypeDescription
resultobjectResult object: { rows, totalRows, queryParameters, columnSortConfig, filtersConditionsStack }.

afterDataProviderFetchAbort

Source code

afterDataProviderFetchAbort(queryParameters, reason)

Fired after a dataProvider fetchRows request ends without loading data because it was aborted (superseded by a newer fetch, AbortSignal, or plugin disable/destroy).

Since: 17.1.0

ParamTypeDescription
queryParametersobjectThe query parameters that were used for the aborted request.
reasonError
undefined
Abort reason when available (e.g. AbortError).

afterDataProviderFetchError

Source code

afterDataProviderFetchError(error, queryParameters)

Fired when the dataProvider fetch throws an error (e.g. network error).

Since: 17.1.0

ParamTypeDescription
errorErrorThe thrown error.
queryParametersobjectThe query parameters that were used for the request.

afterDeselect

Source code

afterDeselect

Fired after all selected cells are deselected.

afterDestroy

Source code

afterDestroy

Fired after destroying the Handsontable instance.

afterDetachChild

Source code

afterDetachChild(parent, element, finalElementPosition)

Fired by NestedRows plugin after detaching a child from its parent. This hook is fired when Options#nestedRows option is enabled.

ParamTypeDescription
parentobjectAn object representing the parent from which the element was detached.
elementobjectThe detached element.
finalElementPositionnumberThe final row index of the detached element.

afterDialogFocus

Source code

afterDialogFocus(focusSource)

Fired by Dialog plugin when the focus is set. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

ParamTypeDescription
focusSource'tab_from_above'
'tab_from_below'
'click'
'show'
The source of the focus.

afterDialogHide

Source code

afterDialogHide

Fired by Dialog plugin after hiding the dialog. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

afterDialogShow

Source code

afterDialogShow

Fired by Dialog plugin after showing the dialog. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

afterDocumentKeyDown

Source code

afterDocumentKeyDown(event)

Hook fired after keydown event is handled.

ParamTypeDescription
eventEventA native keydown event object.

afterDrawSelection

Source code

afterDrawSelection(currentRow, currentColumn, cornersOfSelection, layerLevel) ⇒ string | undefined

Fired inside the Walkontable’s selection draw method. Can be used to add additional class names to cells, depending on the current selection.

Since: 0.38.1

ParamTypeDescription
currentRownumberRow index of the currently processed cell.
currentColumnnumberColumn index of the currently cell.
cornersOfSelectionArray<number>Array of the current selection in a form of [startRow, startColumn, endRow, endColumn].
layerLevelnumber
undefined
Number indicating which layer of selection is currently processed.

Returns: string | undefined - Can return a String, which will act as an additional className to be added to the currently processed cell.

afterDropdownMenuDefaultOptions

Source code

afterDropdownMenuDefaultOptions(predefinedItems)

Fired by DropdownMenu plugin after setting up the dropdown menu’s default options. These options are a collection which user can select by setting an array of keys or an array of objects in Options#dropdownMenu option.

ParamTypeDescription
predefinedItemsArray<object>An array of objects containing information about the pre-defined dropdown menu items.

afterDropdownMenuHide

Source code

afterDropdownMenuHide(instance)

Fired by DropdownMenu plugin after hiding the dropdown menu. This hook is fired when Options#dropdownMenu option is enabled.

ParamTypeDescription
instanceDropdownMenuThe DropdownMenu instance.

afterDropdownMenuShow

Source code

afterDropdownMenuShow(dropdownMenu)

Fired by DropdownMenu plugin after opening the dropdown menu. This hook is fired when Options#dropdownMenu option is enabled.

ParamTypeDescription
dropdownMenuDropdownMenuThe DropdownMenu instance.

afterEmptyDataStateHide

Source code

afterEmptyDataStateHide

Fired by EmptyDataState plugin after hiding the empty data state overlay. This hook is fired when Options#emptyDataState option is enabled.

Since: 16.2.0

afterEmptyDataStateShow

Source code

afterEmptyDataStateShow

Fired by EmptyDataState plugin after showing the empty data state overlay. This hook is fired when Options#emptyDataState option is enabled.

Since: 16.2.0

afterFilter

Source code

afterFilter(conditionsStack)

Fired by the Filters plugin, after a column filter gets applied.

afterFilter takes one argument (conditionsStack), which is an array of objects. Each object represents one of your column filters, and consists of the following properties:

PropertyPossible valuesDescription
columnNumberA visual index of the column to which the filter was applied.
conditionsArray of objectsEach object represents one condition. For details, see addCondition().
operation'conjunction' | 'disjunction' | 'disjunctionWithExtraCondition'An operation to perform on your set of conditions. For details, see addCondition().

An example of the format of the conditionsStack argument:

[
{
column: 2,
conditions: [
{name: 'begins_with', args: [['S']]}
],
operation: 'conjunction'
},
{
column: 4,
conditions: [
{name: 'not_empty', args: []}
],
operation: 'conjunction'
},
]

Read more:

ParamTypeDescription
conditionsStackArray<object>An array of objects with your column filters.

afterFormulasValuesUpdate

Source code

afterFormulasValuesUpdate(changes)

Fired by the Formulas plugin, when any cell value changes.

Returns an array of objects that contains:

  • The addresses (sheet, row, col) and new values (newValue) of the changed cells.
  • The addresses and new values of any cells that had to be recalculated (because their formulas depend on the cells that changed).

This hook gets also fired on Handsontable’s initialization, returning the addresses and values of all cells.

Read more:

Since: 9.0.0

ParamTypeDescription
changesArrayThe addresses and new values of all the changed and recalculated cells.

afterGetCellMeta

Source code

afterGetCellMeta(row, column, cellProperties)

Fired after getting the cell settings.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
cellPropertiesobjectObject containing the cell properties.

afterGetColHeader

Source code

afterGetColHeader(column, TH, [headerLevel])

Fired after retrieving information about a column header and appending it to the table header.

ParamTypeDefaultDescription
columnnumberVisual column index.
THHTMLTableCellElementHeader’s TH element.
[headerLevel]number0optional (Since 12.2.0) Header level index. Accepts positive (0 to n) and negative (-1 to -n) values. For positive values, 0 points to the topmost header. For negative values, -1 points to the bottom-most header (the header closest to the cells).

afterGetColumnHeaderRenderers

Source code

afterGetColumnHeaderRenderers(renderers)

Fired after getting the column header renderers.

The renderers array initially contains one renderer function when colHeaders is enabled, or zero functions when it is disabled. Each function in the array renders one layer of column headers above the grid. By pushing additional renderer functions to the array, you can display more than one layer of column headers simultaneously.

Each renderer function receives the following arguments:

ArgumentTypeDescription
renderedColumnIndexnumberThe renderable index of the column.
THHTMLTableCellElementThe <th> element to modify.
new Handsontable(container, {
colHeaders: true,
afterGetColumnHeaderRenderers(renderers) {
// Add a second layer of column headers above the default one.
renderers.push((renderedColumnIndex, TH) => {
TH.innerText = `Extra: ${renderedColumnIndex}`;
});
},
});

Read more:

ParamTypeDescription
renderersArray<function()>An array of the column header renderers.

afterGetRowHeader

Source code

afterGetRowHeader(row, TH)

Fired after retrieving information about a row header and appending it to the table header.

ParamTypeDescription
rownumberVisual row index.
THHTMLTableCellElementHeader’s TH element.

afterGetRowHeaderRenderers

Source code

afterGetRowHeaderRenderers(renderers)

Fired after getting the row header renderers.

The renderers array initially contains one renderer function when rowHeaders is enabled, or zero functions when it is disabled. Each function in the array renders one layer of row headers to the left of the grid. By pushing additional renderer functions to the array, you can display more than one layer of row headers simultaneously.

Each renderer function receives the following arguments:

ArgumentTypeDescription
renderableRowIndexnumberThe renderable index of the row.
THHTMLTableCellElementThe <th> element to modify.
new Handsontable(container, {
rowHeaders: true,
afterGetRowHeaderRenderers(renderers) {
// Add a second layer of row headers next to the default one.
renderers.push((renderableRowIndex, TH) => {
TH.innerText = `Extra: ${renderableRowIndex}`;
});
},
});

Read more:

ParamTypeDescription
renderersArray<function()>An array of the row header renderers.

afterHideColumns

Source code

afterHideColumns(currentHideConfig, destinationHideConfig, actionPossible, stateChanged)

Fired by HiddenColumns plugin after marking the columns as hidden. Fired only if the Options#hiddenColumns option is enabled.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical column indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical column indexes.
actionPossiblebooleantrue, if the provided column indexes are valid, false otherwise.
stateChangedbooleantrue, if the action affected any non-hidden columns, false otherwise.

afterHideRows

Source code

afterHideRows(currentHideConfig, destinationHideConfig, actionPossible, stateChanged)

Fired by HiddenRows plugin after marking the rows as hidden. Fired only if the Options#hiddenRows option is enabled.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical row indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical row indexes.
actionPossiblebooleantrue, if provided row indexes are valid, false otherwise.
stateChangedbooleantrue, if the action affected any non-hidden rows, false otherwise.

afterInit

Source code

afterInit

Fired after the Handsontable instance is initiated.

afterLanguageChange

Source code

afterLanguageChange(languageCode)

Fired after successful change of language (when proper language code was set).

Since: 0.35.0

ParamTypeDescription
languageCodestringNew language code.

afterListen

Source code

afterListen

Fired after the table was switched into listening mode. This allows Handsontable to capture keyboard events and respond in the right way.

afterLoadData

Source code

afterLoadData(sourceData, initialLoad, source)

Fired after Handsontable’s data gets modified by the loadData() method or the updateSettings() method.

Read more:

ParamTypeDescription
sourceDataArrayAn array of arrays, or an array of objects, that contains Handsontable’s data
initialLoadbooleanA flag that indicates whether the data was loaded at Handsontable’s initialization (true) or later (false)
sourcestringThe source of the call

afterLoadingHide

Source code

afterLoadingHide

Fired by Loading plugin after hiding the loading indicator. This hook is fired when Options#loading option is enabled.

Since: 16.1.0

afterLoadingShow

Source code

afterLoadingShow

Fired by Loading plugin after showing the loading indicator. This hook is fired when Options#loading option is enabled.

Since: 16.1.0

afterMergeCells

Source code

afterMergeCells(cellRange, mergeParent, [auto])

Fired by MergeCells plugin after cell merging. This hook is fired when Options#mergeCells option is enabled.

ParamTypeDefaultDescription
cellRangeCellRangeSelection cell range.
mergeParentobjectThe parent collection of the provided cell range.
[auto]booleanfalseoptional true if called automatically by the plugin.

afterModifyTransformEnd

Source code

afterModifyTransformEnd(coords, rowTransformDir, colTransformDir)

Fired after the end of the selection is being modified (e.g. Moving the selection with the arrow keys).

ParamTypeDescription
coordsCellCoordsVisual coords of the freshly selected cell.
rowTransformDirnumber-1 if trying to select a cell with a negative row index. 0 otherwise.
colTransformDirnumber-1 if trying to select a cell with a negative column index. 0 otherwise.

afterModifyTransformFocus

Source code

afterModifyTransformFocus(coords, rowTransformDir, colTransformDir)

Fired after the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).

Since: 14.3.0

ParamTypeDescription
coordsCellCoordsCoords of the freshly focused cell.
rowTransformDirnumber-1 if trying to focus a cell with a negative row index. 0 otherwise.
colTransformDirnumber-1 if trying to focus a cell with a negative column index. 0 otherwise.

afterModifyTransformStart

Source code

afterModifyTransformStart(coords, rowTransformDir, colTransformDir)

Fired after the start of the selection is being modified (e.g. Moving the selection with the arrow keys).

ParamTypeDescription
coordsCellCoordsCoords of the freshly selected cell.
rowTransformDirnumber-1 if trying to select a cell with a negative row index. 0 otherwise.
colTransformDirnumber-1 if trying to select a cell with a negative column index. 0 otherwise.

afterMomentumScroll

Source code

afterMomentumScroll

Fired after a scroll event, which is identified as a momentum scroll (e.g. on an iPad).

afterNamedExpressionAdded

Source code

afterNamedExpressionAdded(namedExpressionName, changes)

Fired by the Formulas plugin when a named expression is added to the engine instance.

Since: 9.0.0

ParamTypeDescription
namedExpressionNamestringThe name of the added expression.
changesArrayThe values and location of applied changes.

afterNamedExpressionRemoved

Source code

afterNamedExpressionRemoved(namedExpressionName, changes)

Fired by the Formulas plugin when a named expression is removed from the engine instance.

Since: 9.0.0

ParamTypeDescription
namedExpressionNamestringThe name of the removed expression.
changesArrayThe values and location of applied changes.

afterNotificationHide

Source code

afterNotificationHide(id)

Fired by Notification plugin after a toast is hidden.

Since: 17.1.0

ParamTypeDescription
idstringToast id.

afterNotificationShow

Source code

afterNotificationShow(id, options)

Fired by Notification plugin after a toast is shown.

Since: 17.1.0

ParamTypeDescription
idstringToast id.
optionsobjectNormalized toast options.

afterOnCellContextMenu

Source code

afterOnCellContextMenu(event, coords, TD)

Fired after clicking right mouse button on a cell or row/column header.

For example clicking on the row header of cell (0, 0) results with afterOnCellContextMenu called with coordinates {row: 0, col: -1}.

Since: 4.1.0

ParamTypeDescription
eventEventcontextmenu event object.
coordsCellCoordsCoordinates object containing the visual row and visual column indexes of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

afterOnCellCornerDblClick

Source code

afterOnCellCornerDblClick(event)

Fired after a dblclick event is triggered on the cell corner (the drag handle).

ParamTypeDescription
eventEventdblclick event object.

afterOnCellCornerMouseDown

Source code

afterOnCellCornerMouseDown(event)

Fired after a mousedown event is triggered on the cell corner (the drag handle).

ParamTypeDescription
eventEventmousedown event object.

afterOnCellMouseDown

Source code

afterOnCellMouseDown(event, coords, TD)

Fired after clicking on a cell or row/column header. In case the row/column header was clicked, the coordinate indexes are negative.

For example clicking on the row header of cell (0, 0) results with afterOnCellMouseDown called with coordinates {row: 0, col: -1}.

ParamTypeDescription
eventEventmousedown event object.
coordsCellCoordsCoordinates object containing the visual row and visual column indexes of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

afterOnCellMouseOut

Source code

afterOnCellMouseOut(event, coords, TD)

Fired after leaving a cell or row/column header with the mouse cursor.

ParamTypeDescription
eventEventmouseout event object.
coordsCellCoordsLeaved cell’s visual coordinate object.
TDHTMLTableCellElementCell’s TD (or TH) element.

afterOnCellMouseOver

Source code

afterOnCellMouseOver(event, coords, TD)

Fired after hovering a cell or row/column header with the mouse cursor. In case the row/column header was hovered, the index is negative.

For example, hovering over the row header of cell (0, 0) results with afterOnCellMouseOver called with coords {row: 0, col: -1}.

ParamTypeDescription
eventEventmouseover event object.
coordsCellCoordsHovered cell’s visual coordinate object.
TDHTMLTableCellElementCell’s TD (or TH) element.

afterOnCellMouseUp

Source code

afterOnCellMouseUp(event, coords, TD)

Fired after clicking on a cell or row/column header. In case the row/column header was clicked, the coordinate indexes are negative.

For example clicking on the row header of cell (0, 0) results with afterOnCellMouseUp called with coordinates {row: 0, col: -1}.

ParamTypeDescription
eventEventmouseup event object.
coordsCellCoordsCoordinates object containing the visual row and visual column indexes of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

afterPageChange

Source code

afterPageChange(oldPage, newPage)

Fired by Pagination plugin after changing the page. This hook is fired when Options#pagination option is enabled. When a complete [[Options#dataProvider]] configuration handles paging, DataProvider loads the requested page via fetchRows. Pagination then aligns its UI from [[Hooks#afterDataProviderFetch]].

Since: 16.1.0

ParamTypeDescription
oldPagenumberThe old page number.
newPagenumberThe new page number.

afterPageCounterVisibilityChange

Source code

afterPageCounterVisibilityChange(isVisible)

Fired by Pagination plugin after changing the visibility state of the page counter section. This hook is fired when Options#pagination option is enabled.

Since: 16.1.0

ParamTypeDescription
isVisiblebooleanThe visibility state of the page size section.

afterPageNavigationVisibilityChange

Source code

afterPageNavigationVisibilityChange(isVisible)

Fired by Pagination plugin after changing the visibility state of the page navigation section. This hook is fired when Options#pagination option is enabled.

Since: 16.1.0

ParamTypeDescription
isVisiblebooleanThe visibility state of the page size section.

afterPageSizeChange

Source code

afterPageSizeChange(oldPageSize, newPageSize)

Fired by Pagination plugin after changing the page size. This hook is fired when Options#pagination option is enabled. When a complete [[Options#dataProvider]] configuration handles paging, DataProvider loads page 1 for the new size via fetchRows. Pagination then aligns its UI from [[Hooks#afterDataProviderFetch]].

Since: 16.1.0

ParamTypeDescription
oldPageSizenumber
'auto'
The old page size.
newPageSizenumber
'auto'
The new page size.

afterPageSizeVisibilityChange

Source code

afterPageSizeVisibilityChange(isVisible)

Fired by Pagination plugin after changing the visibility state of the page size section. This hook is fired when Options#pagination option is enabled.

Since: 16.1.0

ParamTypeDescription
isVisiblebooleanThe visibility state of the page size section.

afterPaste

Source code

afterPaste(data, coords)

Fired by CopyPaste plugin after values are pasted into table. This hook is fired when Options#copyPaste option is enabled.

ParamTypeDescription
dataArray<Array>An array of arrays with the pasted data.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) that correspond to the previously selected area.

afterPluginsInitialized

Source code

afterPluginsInitialized

Fired after initializing all the plugins. This hook should be added before Handsontable is initialized.

Example

Handsontable.hooks.add('afterPluginsInitialized', myCallback);

afterRedo

Source code

afterRedo(action)

Fired by UndoRedo plugin after the redo action. Contains information about the action that is being redone. This hook is fired when Options#undo option is enabled.

ParamTypeDescription
actionobjectThe action object. Contains information about the action being redone. The actionType property of the object specifies the type of the action in a String format (e.g. 'remove_row').

afterRedoStackChange

Source code

afterRedoStackChange(undoneActionsBefore, undoneActionsAfter)

Fired by UndoRedo plugin after changing redo stack.

Since: 8.4.0

ParamTypeDescription
undoneActionsBeforeArrayStack of actions which could be redone before performing new action.
undoneActionsAfterArrayStack of actions which can be redone after performing new action.

afterRefreshDimensions

Source code

afterRefreshDimensions(previousDimensions, currentDimensions, stateChanged)

Fired after the window was resized or the size of the Handsontable root element was changed.

ParamTypeDescription
previousDimensionsObjectPrevious dimensions of the container.
currentDimensionsObjectCurrent dimensions of the container.
stateChangedbooleantrue, if the container was re-render, false otherwise.

afterRemoveCellMeta

Source code

afterRemoveCellMeta(row, column, key, value)

Fired after cell meta is removed.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
keystringThe removed meta key.
value*Value which was under removed key of cell meta.

afterRemoveCol

Source code

afterRemoveCol(index, amount, physicalColumns, [source])

Fired after one or more columns are removed.

When consecutive columns are removed, this hook is fired once with the amount reflecting the total number of removed columns. When non-consecutive columns are removed (for example, by selecting columns with Ctrl/Cmd held), this hook is fired separately for each removed column, with amount equal to 1 each time. This is by design.

ParamTypeDescription
indexnumberVisual index of starter column.
amountnumberAn amount of removed columns.
physicalColumnsArray<number>An array of physical columns removed from the data source.
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterRemoveRow

Source code

afterRemoveRow(index, amount, physicalRows, [source])

Fired after one or more rows are removed.

When consecutive rows are removed, this hook is fired once with the amount reflecting the total number of removed rows. When non-consecutive rows are removed (for example, by selecting rows with Ctrl/Cmd held), this hook is fired separately for each removed row, with amount equal to 1 each time. This is by design.

ParamTypeDescription
indexnumberVisual index of starter row.
amountnumberAn amount of removed rows.
physicalRowsArray<number>An array of physical rows removed from the data source.
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterRender

Source code

afterRender(isForced)

Fired after Handsontable’s view-rendering engine updates the view.

ParamTypeDescription
isForcedbooleanIf set to true, the rendering gets triggered by a change of settings, a change of data, or a logic that needs a full Handsontable render cycle. If set to false, the rendering gets triggered by scrolling or moving the selection.

afterRenderer

Source code

afterRenderer(TD, row, column, prop, value, cellProperties)

Fired after finishing rendering the cell (after the renderer finishes).

ParamTypeDescription
TDHTMLTableCellElementCurrently rendered cell’s TD element.
rownumberVisual row index.
columnnumberVisual column index.
propstring
number
Column property name or a column index, if datasource is an array of arrays.
value*Value of the rendered cell.
cellPropertiesobjectObject containing the cell’s properties.

afterRowMove

Source code

afterRowMove(movedRows, finalIndex, dropIndex, movePossible, orderChanged)

Fired by ManualRowMove plugin after changing the order of the visual indexes. This hook is fired when Options#manualRowMove option is enabled.

ParamTypeDescription
movedRowsArrayArray of visual row indexes to be moved.
finalIndexnumberVisual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action. To check visualization of final index please take a look at documentation.
dropIndexnumber
undefined
Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. It’s undefined when dragRows function wasn’t called.
movePossiblebooleanIndicates if it was possible to move rows to the desired position.
orderChangedbooleanIndicates if order of rows was changed by move.

afterRowResize

Source code

afterRowResize(newSize, row, isDoubleClick)

Fired by ManualRowResize plugin after rendering the table with modified row sizes. This hook is fired when Options#manualRowResize option is enabled.

ParamTypeDescription
newSizenumberCalculated new row height.
rownumberVisual index of the resized row.
isDoubleClickbooleanFlag that determines whether there was a double-click.

afterRowSequenceCacheUpdate

Source code

afterRowSequenceCacheUpdate(indexesChangesState)

Fired after the cache of the row sequence has been updated.

Since: 16.2.0

ParamTypeDescription
indexesChangesStateobjectObject containing information about the changes to the row sequence.
indexesChangesState.indexesSequenceChangedbooleanIndicates if the sequence of indexes has changed.
indexesChangesState.trimmedIndexesChangedbooleanIndicates if the trimmed indexes have changed.
indexesChangesState.hiddenIndexesChangedbooleanIndicates if the hidden indexes have changed.

afterRowSequenceChange

Source code

afterRowSequenceChange([source])

Fired after the order of rows has changed. This hook is fired by changing row indexes of any type supported by the IndexMapper.

ParamTypeDescription
[source]'init'
'remove'
'insert'
'move'
'update'
optional A string that indicates what caused the change to the order of rows.

afterRowsMutation

Source code

afterRowsMutation(operation, payload)

Fired after rows mutation (create, update, remove) succeeds on the server.

Since: 17.1.0

ParamTypeDescription
operationstringOne of 'create', 'update', 'remove'.
payloadobjectOperation-specific payload.

afterRowsMutationError

Source code

afterRowsMutationError(operation, error, payload)

Fired when rows mutation (create, update, remove) fails on the server.

Since: 17.1.0

ParamTypeDescription
operationstringOne of 'create', 'update', 'remove'.
errorErrorThe thrown error.
payloadobjectOperation-specific payload.

afterScroll

Source code

afterScroll

Fired after the vertical or horizontal scroll event.

Since: 14.0.0

afterScrollHorizontally

Source code

afterScrollHorizontally

Fired after the horizontal scroll event.

afterScrollVertically

Source code

afterScrollVertically

Fired after the vertical scroll event.

afterSelectAll

Source code

afterSelectAll(from, to, [highlight])

Fired after all cells are selected (e.g. during mouse corner click or Core#selectAll API call).

Since: 16.1.0

ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
[highlight]CellCoordsoptional Selection cell focus coords object.

afterSelectColumns

Source code

afterSelectColumns(from, to, highlight)

Fired after one or more columns are selected (e.g. during mouse header click or Core#selectColumns API call).

Since: 14.0.0

ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
highlightCellCoordsSelection cell focus coords object.

afterSelection

Source code

afterSelection(row, column, row2, column2, preventScrolling, selectionLayerLevel)

Fired after one or more cells are selected (e.g. during mouse move).

Example

new Handsontable(element, {
afterSelection: (row, column, row2, column2, preventScrolling, selectionLayerLevel) => {
// If set to `false` (default): when cell selection is outside the viewport,
// Handsontable scrolls the viewport to cell selection's end corner.
// If set to `true`: when cell selection is outside the viewport,
// Handsontable doesn't scroll to cell selection's end corner.
preventScrolling.value = true;
}
})
ParamTypeDescription
rownumberSelection start visual row index.
columnnumberSelection start visual column index.
row2numberSelection end visual row index.
column2numberSelection end visual column index.
preventScrollingobjectA reference to the observable object with the value property. Property preventScrolling.value expects a boolean value that Handsontable uses to control scroll behavior after selection.
selectionLayerLevelnumberThe number which indicates what selection layer is currently modified.

afterSelectionByProp

Source code

afterSelectionByProp(row, prop, row2, prop2, preventScrolling, selectionLayerLevel)

Fired after one or more cells are selected.

The prop and prop2 arguments represent the source object property name instead of the column number.

Example

new Handsontable(element, {
afterSelectionByProp: (row, column, row2, column2, preventScrolling, selectionLayerLevel) => {
// setting if prevent scrolling after selection
preventScrolling.value = true;
}
})
ParamTypeDescription
rownumberSelection start visual row index.
propstringSelection start data source object property name.
row2numberSelection end visual row index.
prop2stringSelection end data source object property name.
preventScrollingobjectA reference to the observable object with the value property. Property preventScrolling.value expects a boolean value that Handsontable uses to control scroll behavior after selection.
selectionLayerLevelnumberThe number which indicates what selection layer is currently modified.

afterSelectionEnd

Source code

afterSelectionEnd(row, column, row2, column2, selectionLayerLevel)

Fired after one or more cells are selected (e.g. on mouse up).

ParamTypeDescription
rownumberSelection start visual row index.
columnnumberSelection start visual column index.
row2numberSelection end visual row index.
column2numberSelection end visual column index.
selectionLayerLevelnumberThe number which indicates what selection layer is currently modified.

afterSelectionEndByProp

Source code

afterSelectionEndByProp(row, prop, row2, prop2, selectionLayerLevel)

Fired after one or more cells are selected (e.g. on mouse up).

The prop and prop2 arguments represent the source object property name instead of the column number.

ParamTypeDescription
rownumberSelection start visual row index.
propstringSelection start data source object property index.
row2numberSelection end visual row index.
prop2stringSelection end data source object property index.
selectionLayerLevelnumberThe number which indicates what selection layer is currently modified.

afterSelectionFocusSet

Source code

afterSelectionFocusSet(row, column, preventScrolling)

Fired after the focus position within a selected range is changed.

Since: 14.3.0
Example

new Handsontable(element, {
afterSelectionFocusSet: (row, column, preventScrolling) => {
// If set to `false` (default): when focused cell selection is outside the viewport,
// Handsontable scrolls the viewport to that cell.
// If set to `true`: when focused cell selection is outside the viewport,
// Handsontable doesn't scroll the viewport.
preventScrolling.value = true;
}
})
ParamTypeDescription
rownumberThe focus visual row index position.
columnnumberThe focus visual column index position.
preventScrollingobjectA reference to the observable object with the value property. Property preventScrolling.value expects a boolean value that Handsontable uses to control scroll behavior after selection.

afterSelectRows

Source code

afterSelectRows(from, to, highlight)

Fired after one or more rows are selected (e.g. during mouse header click or Core#selectRows API call).

Since: 14.0.0

ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
highlightCellCoordsSelection cell focus coords object.

afterSetCellMeta

Source code

afterSetCellMeta(row, column, key, value)

Fired after cell meta is changed.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
keystringThe updated meta key.
value*The updated meta value.

afterSetDataAtCell

Source code

afterSetDataAtCell(changes, [source])

Fired after cell data was changed.

ParamTypeDescription
changesArrayAn array of changes in format [[row, column, oldValue, value], ...].
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterSetDataAtRowProp

Source code

afterSetDataAtRowProp(changes, [source])

Fired after cell data was changed. Called only when setDataAtRowProp was executed.

ParamTypeDescription
changesArrayAn array of changes in format [[row, prop, oldValue, value], ...].
[source]stringoptional String that identifies source of hook call (list of all available sources).

afterSetSourceDataAtCell

Source code

afterSetSourceDataAtCell(changes, [source])

Fired after cell source data was changed.

Since: 8.0.0

ParamTypeDescription
changesArrayAn array of changes in format [[row, column, oldValue, value], ...].
[source]stringoptional String that identifies source of hook call.

afterSetTheme

Source code

afterSetTheme(themeName, firstRun)

Fired after a theme is enabled, changed, or disabled.

Since: 15.0.0

ParamTypeDescription
themeNamestring
boolean
undefined
The theme name.
firstRunbooleantrue if it’s the initial setting of the theme, false otherwise.

afterSheetAdded

Source code

afterSheetAdded(addedSheetDisplayName)

Fired by the Formulas plugin when a new sheet is added to the engine instance.

Since: 9.0.0

ParamTypeDescription
addedSheetDisplayNamestringThe name of the added sheet.

afterSheetRemoved

Source code

afterSheetRemoved(removedSheetDisplayName, changes)

Fired by the Formulas plugin when a sheet is removed from the engine instance.

Since: 9.0.0

ParamTypeDescription
removedSheetDisplayNamestringThe removed sheet name.
changesArrayThe values and location of applied changes.

afterSheetRenamed

Source code

afterSheetRenamed(oldDisplayName, newDisplayName)

Fired by the Formulas plugin when a sheet in the engine instance is renamed.

Since: 9.0.0

ParamTypeDescription
oldDisplayNamestringThe old name of the sheet.
newDisplayNamestringThe new name of the sheet.

afterTrimRow

Source code

afterTrimRow(currentTrimConfig, destinationTrimConfig, actionPossible, stateChanged) ⇒ undefined | boolean

Fired by TrimRows plugin after trimming rows. This hook is fired when Options#trimRows option is enabled.

ParamTypeDescription
currentTrimConfigArrayCurrent trim configuration - a list of trimmed physical row indexes.
destinationTrimConfigArrayDestination trim configuration - a list of trimmed physical row indexes.
actionPossiblebooleantrue, if all of the row indexes are withing the bounds of the table, false otherwise.
stateChangedbooleantrue, if the action affected any non-trimmed rows, false otherwise.

Returns: undefined | boolean - If the callback returns false, the trimming action will not be completed.

afterUndo

Source code

afterUndo(action)

Fired by UndoRedo plugin after the undo action. Contains information about the action that is being undone. This hook is fired when Options#undo option is enabled.

ParamTypeDescription
actionobjectThe action object. Contains information about the action being undone. The actionType property of the object specifies the type of the action in a String format. (e.g. 'remove_row').

afterUndoStackChange

Source code

afterUndoStackChange(doneActionsBefore, doneActionsAfter)

Fired by UndoRedo plugin after changing undo stack.

Since: 8.4.0

ParamTypeDescription
doneActionsBeforeArrayStack of actions which could be undone before performing new action.
doneActionsAfterArrayStack of actions which can be undone after performing new action.

afterUnhideColumns

Source code

afterUnhideColumns(currentHideConfig, destinationHideConfig, actionPossible, stateChanged)

Fired by HiddenColumns plugin after marking the columns as not hidden. Fired only if the Options#hiddenColumns option is enabled.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical column indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical column indexes.
actionPossiblebooleantrue, if the provided column indexes are valid, false otherwise.
stateChangedbooleantrue, if the action affected any hidden columns, false otherwise.

afterUnhideRows

Source code

afterUnhideRows(currentHideConfig, destinationHideConfig, actionPossible, stateChanged)

Fired by HiddenRows plugin after marking the rows as not hidden. Fired only if the Options#hiddenRows option is enabled.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical row indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical row indexes.
actionPossiblebooleantrue, if provided row indexes are valid, false otherwise.
stateChangedbooleantrue, if the action affected any hidden rows, false otherwise.

afterUnlisten

Source code

afterUnlisten

Fired after the table was switched off from the listening mode. This makes the Handsontable inert for any keyboard events.

afterUnmergeCells

Source code

afterUnmergeCells(cellRange, [auto])

Fired by MergeCells plugin after unmerging the cells. This hook is fired when Options#mergeCells option is enabled.

ParamTypeDefaultDescription
cellRangeCellRangeSelection cell range.
[auto]booleanfalseoptional true if called automatically by the plugin.

afterUntrimRow

Source code

afterUntrimRow(currentTrimConfig, destinationTrimConfig, actionPossible, stateChanged) ⇒ undefined | boolean

Fired by TrimRows plugin after untrimming rows. This hook is fired when Options#trimRows option is enabled.

ParamTypeDescription
currentTrimConfigArrayCurrent trim configuration - a list of trimmed physical row indexes.
destinationTrimConfigArrayDestination trim configuration - a list of trimmed physical row indexes.
actionPossiblebooleantrue, if all of the row indexes are withing the bounds of the table, false otherwise.
stateChangedbooleantrue, if the action affected any trimmed rows, false otherwise.

Returns: undefined | boolean - If the callback returns false, the untrimming action will not be completed.

afterUpdateData

Source code

afterUpdateData(sourceData, initialLoad, source)

Fired after the updateData() method modifies Handsontable’s data.

Read more:

Since: 11.1.0

ParamTypeDescription
sourceDataArrayAn array of arrays, or an array of objects, that contains Handsontable’s data
initialLoadbooleanA flag that indicates whether the data was loaded at Handsontable’s initialization (true) or later (false)
sourcestringThe source of the call

afterUpdateSettings

Source code

afterUpdateSettings(newSettings)

Fired after calling the updateSettings method.

ParamTypeDescription
newSettingsobjectNew settings object.

afterValidate

Source code

afterValidate(isValid, value, row, prop, [source]) ⇒ undefined | boolean

A plugin hook executed after validator function, only if validator function is defined. Validation result is the first parameter. This can be used to determinate if validation passed successfully or not.

Returning false from the callback will mark the cell as invalid.

ParamTypeDescription
isValidbooleantrue if valid, false if not.
value*The value in question.
rownumberVisual row index.
propstring
number
Property name / visual column index.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: undefined | boolean - If false the cell will be marked as invalid, true otherwise.

afterViewportColumnCalculatorOverride

Source code

afterViewportColumnCalculatorOverride(calc)

Fired inside the viewportColumnCalculatorOverride method. Allows modifying the row calculator parameters.

ParamTypeDescription
calcobjectThe row calculator.

afterViewportRowCalculatorOverride

Source code

afterViewportRowCalculatorOverride(calc)

Fired inside the viewportRowCalculatorOverride method. Allows modifying the row calculator parameters.

ParamTypeDescription
calcobjectThe row calculator.

afterViewRender

Source code

afterViewRender(isForced)

Fired after Handsontable’s view-rendering engine is rendered, but before redrawing the selection borders and before scroll syncing.

Note: In Handsontable 9.x and earlier, the afterViewRender hook was named afterRender.

Since: 10.0.0

ParamTypeDescription
isForcedbooleanIf set to true, the rendering gets triggered by a change of settings, a change of data, or a logic that needs a full Handsontable render cycle. If set to false, the rendering gets triggered by scrolling or moving the selection.

beforeAddChild

Source code

beforeAddChild(parent, element, index)

Fired by NestedRows plugin before adding a children to the NestedRows structure. This hook is fired when Options#nestedRows option is enabled.

ParamTypeDescription
parentobjectThe parent object.
elementobject
undefined
The element added as a child. If undefined, a blank child was added.
indexnumber
undefined
The index within the parent where the new child was added. If undefined, the element was added as the last child.

beforeAlter

Source code

beforeAlter(action, index, amount, [source], [keepEmptyRows]) ⇒ * | boolean

Fired before an alter action is applied (e.g. insert_row_above, insert_row_below, remove_row). Return false to cancel the default alter behavior (e.g. so a plugin can handle it via server-side CRUD).

Since: 17.1.0

ParamTypeDescription
actionstringThe alter action: 'insert_row_above', 'insert_row_below', 'remove_row', 'insert_col_start', 'insert_col_end', 'remove_col'.
indexnumber
Array
Visual row/column index, or for remove actions an array of [[index, amount], ...].
amountnumberNumber of rows/columns to insert or remove (default 1).
[source]stringoptional Source of the alter call (e.g. 'ContextMenu.rowAbove').
[keepEmptyRows]booleanoptional Whether to keep empty rows (remove_row only).

Returns: * | boolean - Return false to cancel the alter; the table will not be modified locally.

beforeAutofill

Source code

beforeAutofill(selectionData, sourceRange, targetRange, direction) ⇒ boolean | Array<Array>

Fired by Autofill plugin before populating the data in the autofill feature. This hook is fired when Options#fillHandle option is enabled.

ParamTypeDescription
selectionDataArray<Array>Data the autofill operation will start from.
sourceRangeCellRangeThe range values will be filled from.
targetRangeCellRangeThe range new values will be filled into.
directionstringDeclares the direction of the autofill. Possible values: up, down, left, right.

Returns: boolean | Array<Array> - If false, the operation is cancelled. If array of arrays, the returned data will be passed into populateFromArray instead of the default autofill algorithm’s result.

beforeBeginEditing

Source code

beforeBeginEditing(row, column, initialValue, event, fullEditMode) ⇒ boolean | undefined

Fired before the editor is opened and rendered.

Since: 14.2.0

ParamTypeDescription
rownumberVisual row index of the edited cell.
columnnumberVisual column index of the edited cell.
initialValue*The initial editor value.
eventMouseEvent
KeyboardEvent
The event which was responsible for opening the editor.
fullEditModebooleantrue if the editor is opened in full edit mode, false otherwise. Editor opened in full edit mode does not close after pressing Arrow keys.

Returns: boolean | undefined - If the callback returns false, the editor won’t be opened after the mouse double click or after pressing the Enter key. Returning undefined (or other value than boolean) will result in default behavior, which disallows opening an editor for non-contiguous selection (while pressing Ctrl/Cmd) and for multiple selected cells (while pressing Shift). Returning true removes those restrictions.

beforeCellAlignment

Source code

beforeCellAlignment(stateBefore, range, type, alignmentClass)

Fired before aligning the cell contents.

ParamTypeDescription
stateBeforeobjectAn object with class names defining the cell alignment.
rangeArray<CellRange>An array of CellRange coordinates where the alignment will be applied.
typestringType of the alignment - either horizontal or vertical.
alignmentClassstringString defining the alignment class added to the cell. Possible values: htLeft , htCenter, htRight, htJustify, htTop, htMiddle, htBottom.

beforeChange

Source code

beforeChange(changes, [source]) ⇒ undefined | boolean

Fired before one or more cells are changed.

Use this hook to silently alter the user’s changes before Handsontable re-renders.

To ignore the user’s changes, use a nullified array or return false.

Example

// to alter a single change, overwrite the value with `changes[i][3]`
new Handsontable(element, {
beforeChange: (changes, source) => {
// [[row, prop, oldVal, newVal], ...]
changes[0][3] = 10;
}
});
// to ignore a single change, set `changes[i]` to `null`
// or remove `changes[i]` from the array, by using `changes.splice(i, 1)`
new Handsontable(element, {
beforeChange: (changes, source) => {
// [[row, prop, oldVal, newVal], ...]
changes[0] = null;
}
});
// to ignore all changes, return `false`
// or set the array's length to 0, by using `changes.length = 0`
new Handsontable(element, {
beforeChange: (changes, source) => {
// [[row, prop, oldVal, newVal], ...]
return false;
}
});
ParamTypeDescription
changesArray<Array>2D array containing information about each of the edited cells [[row, prop, oldVal, newVal], ...]. row is a visual row index.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: undefined | boolean - If false all changes were cancelled, true otherwise.

beforeChangeRender

Source code

beforeChangeRender(changes, [source])

Fired right before rendering the changes.

ParamTypeDescription
changesArray<Array>Array in form of [row, prop, oldValue, newValue].
[source]stringoptional String that identifies source of hook call (list of all available sources).

beforeColumnCollapse

Source code

beforeColumnCollapse(currentCollapsedColumns, destinationCollapsedColumns, collapsePossible) ⇒ undefined | boolean

Fired by CollapsibleColumns plugin before columns collapse. This hook is fired when Options#collapsibleColumns option is enabled.

Since: 8.0.0

ParamTypeDescription
currentCollapsedColumnsArrayCurrent collapsible configuration - a list of collapsible physical column indexes.
destinationCollapsedColumnsArrayDestination collapsible configuration - a list of collapsible physical column indexes.
collapsePossiblebooleantrue, if all of the column indexes are withing the bounds of the collapsed sections, false otherwise.

Returns: undefined | boolean - If the callback returns false, the collapsing action will not be completed.

beforeColumnExpand

Source code

beforeColumnExpand(currentCollapsedColumns, destinationCollapsedColumns, expandPossible) ⇒ undefined | boolean

Fired by CollapsibleColumns plugin before columns expand. This hook is fired when Options#collapsibleColumns option is enabled.

Since: 8.0.0

ParamTypeDescription
currentCollapsedColumnsArrayCurrent collapsible configuration - a list of collapsible physical column indexes.
destinationCollapsedColumnsArrayDestination collapsible configuration - a list of collapsible physical column indexes.
expandPossiblebooleantrue, if all of the column indexes are withing the bounds of the collapsed sections, false otherwise.

Returns: undefined | boolean - If the callback returns false, the expanding action will not be completed.

beforeColumnFreeze

Source code

beforeColumnFreeze(column, freezePerformed) ⇒ boolean | undefined

Fired by the ManualColumnFreeze plugin, before freezing a column.

Since: 12.1.0

ParamTypeDescription
columnnumberThe visual index of the column that is going to freeze.
freezePerformedbooleanIf true: the column is going to freeze. If false: the column is not going to freeze (which might happen if the column is already frozen).

Returns: boolean | undefined - If false: the column is not going to freeze, and the afterColumnFreeze hook won’t fire.

beforeColumnMove

Source code

beforeColumnMove(movedColumns, finalIndex, dropIndex, movePossible) ⇒ undefined | boolean

Fired by ManualColumnMove plugin before change order of the visual indexes. This hook is fired when Options#manualColumnMove option is enabled.

ParamTypeDescription
movedColumnsArrayArray of visual column indexes to be moved.
finalIndexnumberVisual column index, being a start index for the moved columns. Points to where the elements will be placed after the moving action. To check visualization of final index please take a look at documentation.
dropIndexnumber
undefined
Visual column index, being a drop index for the moved columns. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. It’s undefined when dragColumns function wasn’t called.
movePossiblebooleanIndicates if it’s possible to move rows to the desired position.

Returns: undefined | boolean - If false the column will not be moved, true otherwise.

beforeColumnResize

Source code

beforeColumnResize(newSize, column, isDoubleClick) ⇒ number

Fired by ManualColumnResize plugin before rendering the table with modified column sizes. This hook is fired when Options#manualColumnResize option is enabled.

ParamTypeDescription
newSizenumberCalculated new column width.
columnnumberVisual index of the resized column.
isDoubleClickbooleanFlag that determines whether there was a double-click.

Returns: number - Returns a new column size or undefined, if column size should be calculated automatically.

beforeColumnSort

Source code

beforeColumnSort(currentSortConfig, destinationSortConfigs) ⇒ boolean | undefined

Fired by ColumnSorting and MultiColumnSorting plugins before sorting the column. If you return false value inside callback for hook, then sorting will be not applied by the Handsontable (useful for server-side sorting).

This hook is fired when Options#columnSorting or Options#multiColumnSorting option is enabled.

ParamTypeDescription
currentSortConfigArrayCurrent sort configuration (for all sorted columns).
destinationSortConfigsArrayDestination sort configuration (for all sorted columns).

Returns: boolean | undefined - If false the column will not be sorted, true otherwise.

beforeColumnUnfreeze

Source code

beforeColumnUnfreeze(column, unfreezePerformed) ⇒ boolean | undefined

Fired by the ManualColumnFreeze plugin, before unfreezing a column.

Since: 12.1.0

ParamTypeDescription
columnnumberThe visual index of the column that is going to unfreeze.
unfreezePerformedbooleanIf true: the column is going to unfreeze. If false: the column is not going to unfreeze (which might happen if the column is already unfrozen).

Returns: boolean | undefined - If false: the column is not going to unfreeze, and the afterColumnUnfreeze hook won’t fire.

beforeColumnWrap

Source code

beforeColumnWrap(isWrapEnabled, newCoords, isFlipped)

When the focus position is moved to the next or previous column caused by the Options#autoWrapCol option the hook is triggered.

Since: 14.0.0

ParamTypeDescription
isWrapEnabledbooleanTells whether the column wrapping is going to happen. There may be situations where the option does not work even though it is enabled. This is due to the priority of other options that may block the feature. For example, when the Options#minSpareRows is defined, the Options#autoWrapCol option is not checked. Thus, column wrapping is off.
newCoordsCellCoordsThe new focus position. It is an object with keys row and col, where a value of -1 indicates a header.
isFlippedbooleantrue if the column index was flipped, false otherwise. Flipped index means that the user reached the last column and the focus is moved to the first column or vice versa.

beforeCompositionStart

Source code

beforeCompositionStart(event)

Hook fired after compositionstart event is handled.

Since: 15.3.0

ParamTypeDescription
eventEventA native composition event object.

beforeContextMenuSetItems

Source code

beforeContextMenuSetItems(menuItems)

Fired each time user opens ContextMenu plugin before setting up the context menu’s items but after filtering these options by user (contextMenu option). This hook can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.

ParamTypeDescription
menuItemsArray<object>An array of objects containing information about to generated context menu items.

beforeContextMenuShow

Source code

beforeContextMenuShow(context)

Fired by ContextMenu plugin before opening the context menu. This hook is fired when Options#contextMenu option is enabled.

ParamTypeDescription
contextobjectThe ContextMenu instance.

beforeCopy

Source code

beforeCopy(data, coords, copiedHeadersCount) ⇒ *

Fired before values are copied to the clipboard.

Example

// To disregard a single row, remove it from array using data.splice(i, 1).
...
new Handsontable(document.getElementById('example'), {
beforeCopy: (data, coords) => {
// data -> [[1, 2, 3], [4, 5, 6]]
data.splice(0, 1);
// data -> [[4, 5, 6]]
// coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
}
});
...
// To cancel copying, return false from the callback.
...
new Handsontable(document.getElementById('example'), {
beforeCopy: (data, coords) => {
return false;
}
});
...
ParamTypeDescription
dataArray<Array>An array of arrays which contains data to copied.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) which will copied.
copiedHeadersCountObject(Since 12.3.0) The number of copied column headers.

Returns: * - If returns false then copying is canceled.

beforeCreateCol

Source code

beforeCreateCol(index, amount, [source]) ⇒ *

Fired before created a new column.

Example

// Return `false` to cancel column inserting.
new Handsontable(element, {
beforeCreateCol: function(data, coords) {
return false;
}
});
ParamTypeDescription
indexnumberRepresents the visual index of first newly created column in the data source array.
amountnumberNumber of newly created columns in the data source array.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: * - If false then creating columns is cancelled.

beforeCreateRow

Source code

beforeCreateRow(index, amount, [source]) ⇒ * | boolean

Fired before created a new row.

ParamTypeDescription
indexnumberRepresents the visual index of first newly created row in the data source array.
amountnumberNumber of newly created rows in the data source array.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: * | boolean - If false is returned the action is canceled.

beforeCut

Source code

beforeCut(data, coords) ⇒ *

Fired by CopyPaste plugin before copying the values to the clipboard and before clearing values of the selected cells. This hook is fired when Options#copyPaste option is enabled.

Example

// To disregard a single row, remove it from the array using data.splice(i, 1).
new Handsontable(element, {
beforeCut: function(data, coords) {
// data -> [[1, 2, 3], [4, 5, 6]]
data.splice(0, 1);
// data -> [[4, 5, 6]]
// coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
}
});
// To cancel a cutting action, just return `false`.
new Handsontable(element, {
beforeCut: function(data, coords) {
return false;
}
});
ParamTypeDescription
dataArray<Array>An array of arrays which contains data to cut.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) which will be cut out.

Returns: * - If returns false then operation of the cutting out is canceled.

beforeDataProviderFetch

Source code

beforeDataProviderFetch(queryParameters) ⇒ * | boolean

Fired before the dataProvider fetches data. Return false to cancel the fetch.

Since: 17.1.0

ParamTypeDescription
queryParametersobjectCurrent query parameters: { page, pageSize, sort, filters }. May include skipLoading when the fetch was triggered internally (for example after column sort or CRUD); not sent to fetchRows.

Returns: * | boolean - Return false to cancel the fetch; otherwise the fetch proceeds.

beforeDetachChild

Source code

beforeDetachChild(parent, element)

Fired by NestedRows plugin before detaching a child from its parent. This hook is fired when Options#nestedRows option is enabled.

ParamTypeDescription
parentobjectAn object representing the parent from which the element is to be detached.
elementobjectThe detached element.

beforeDialogHide

Source code

beforeDialogHide

Fired by Dialog plugin before hiding the dialog. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

beforeDialogShow

Source code

beforeDialogShow

Fired by Dialog plugin before showing the dialog. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

beforeDrawBorders

Source code

beforeDrawBorders(corners, borderClassName)

Fired before drawing the borders.

ParamTypeDescription
cornersArrayArray specifying the current selection borders.
borderClassNamestringSpecifies the border class name.

beforeDropdownMenuSetItems

Source code

beforeDropdownMenuSetItems(menuItems)

Fired by DropdownMenu plugin before setting up the dropdown menu’s items but after filtering these options by user (dropdownMenu option). This hook can by helpful to determine if user use specified menu item or to set up one of the menu item to by always visible.

ParamTypeDescription
menuItemsArray<object>An array of objects containing information about to generated dropdown menu items.

beforeDropdownMenuShow

Source code

beforeDropdownMenuShow(dropdownMenu)

Fired by DropdownMenu plugin before opening the dropdown menu. This hook is fired when Options#dropdownMenu option is enabled.

ParamTypeDescription
dropdownMenuDropdownMenuThe DropdownMenu instance.

beforeEmptyDataStateHide

Source code

beforeEmptyDataStateHide

Fired by EmptyDataState plugin before hiding the empty data state overlay. This hook is fired when Options#emptyDataState option is enabled.

Since: 16.2.0

beforeEmptyDataStateShow

Source code

beforeEmptyDataStateShow

Fired by EmptyDataState plugin before showing the empty data state overlay. This hook is fired when Options#emptyDataState option is enabled.

Since: 16.2.0

beforeFilter

Source code

beforeFilter(conditionsStack, previousConditionsStack) ⇒ boolean

Fired by the Filters plugin, before a column filter gets applied.

beforeFilter takes two arguments: conditionsStack and previousConditionsStack, both are arrays of objects.

Each object represents one of your column filters, and consists of the following properties:

PropertyPossible valuesDescription
columnNumberA visual index of the column to which the filter will be applied.
conditionsArray of objectsEach object represents one condition. For details, see addCondition().
operation'conjunction' | 'disjunction' | 'disjunctionWithExtraCondition'An operation to perform on your set of conditions. For details, see addCondition().

An example of the format of the conditionsStack argument:

[
{
column: 2,
conditions: [
{name: 'begins_with', args: [['S']]}
],
operation: 'conjunction'
},
{
column: 4,
conditions: [
{name: 'not_empty', args: []}
],
operation: 'conjunction'
},
]

To perform server-side filtering (i.e., to not apply filtering to Handsontable’s UI), set beforeFilter to return false:

new Handsontable(document.getElementById('example'), {
beforeFilter: (conditionsStack) => {
return false;
}
});

Read more:

ParamTypeDescription
conditionsStackArray<object>An array of objects with your column filters.
previousConditionsStackArray<object>
null
An array of objects with your previous column filters. It can also be null if there was no previous filters applied or the conditions did not change between performing the filter action.

Returns: boolean - To perform server-side filtering (i.e., to not apply filtering to Handsontable’s UI), return false.

beforeGetCellMeta

Source code

beforeGetCellMeta(row, column, cellProperties)

Fired before getting cell settings.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
cellPropertiesobjectObject containing the cell’s properties.

beforeHeightChange

Source code

beforeHeightChange(height) ⇒ number | string

Fired before the height of the table is changed.

Since: 16.1.0

ParamTypeDescription
heightnumber
string
Table height.

Returns: number | string - Modified table height.

beforeHideColumns

Source code

beforeHideColumns(currentHideConfig, destinationHideConfig, actionPossible) ⇒ undefined | boolean

Fired by HiddenColumns plugin before marking the columns as hidden. Fired only if the Options#hiddenColumns option is enabled. Returning false in the callback will prevent the hiding action from completing.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical column indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical column indexes.
actionPossiblebooleantrue, if the provided column indexes are valid, false otherwise.

Returns: undefined | boolean - If the callback returns false, the hiding action will not be completed.

beforeHideRows

Source code

beforeHideRows(currentHideConfig, destinationHideConfig, actionPossible) ⇒ undefined | boolean

Fired by HiddenRows plugin before marking the rows as hidden. Fired only if the Options#hiddenRows option is enabled. Returning false in the callback will prevent the hiding action from completing.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical row indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical row indexes.
actionPossiblebooleantrue, if provided row indexes are valid, false otherwise.

Returns: undefined | boolean - If the callback returns false, the hiding action will not be completed.

beforeHighlightingColumnHeader

Source code

beforeHighlightingColumnHeader(column, headerLevel, highlightMeta) ⇒ number | undefined

Allows modify the visual column index that is used to retrieve the column header element (TH) before it’s highlighted (proper CSS class names are added). Modifying the visual column index allows building a custom implementation of the nested headers feature or other features that require highlighting other DOM elements than that the rendering engine, by default, would have highlighted.

Since: 8.4.0

ParamTypeDescription
columnnumberVisual column index.
headerLevelnumberRow header level (0 = most distant to the table).
highlightMetaobjectAn object that contains additional information about processed selection.

beforeHighlightingRowHeader

Source code

beforeHighlightingRowHeader(row, headerLevel, highlightMeta) ⇒ number | undefined

Allows modify the visual row index that is used to retrieve the row header element (TH) before it’s highlighted (proper CSS class names are added). Modifying the visual row index allows building a custom implementation of the nested headers feature or other features that require highlighting other DOM elements than that the rendering engine, by default, would have highlighted.

Since: 8.4.0

ParamTypeDescription
rownumberVisual row index.
headerLevelnumberColumn header level (0 = most distant to the table).
highlightMetaobjectAn object that contains additional information about processed selection.

beforeInit

Source code

beforeInit

Fired before the Handsontable instance is initiated.

beforeInitWalkontable

Source code

beforeInitWalkontable(walkontableConfig)

Fired before the Walkontable instance is initiated.

ParamTypeDescription
walkontableConfigobjectWalkontable configuration object.

beforeKeyDown

Source code

beforeKeyDown(event)

Hook fired before keydown event is handled. It can be used to stop default key bindings.

Note: To prevent default behavior you need to call false in your beforeKeyDown handler.

ParamTypeDescription
eventEventOriginal DOM event.

beforeLanguageChange

Source code

beforeLanguageChange(languageCode)

Fired before successful change of language (when proper language code was set).

Since: 0.35.0

ParamTypeDescription
languageCodestringNew language code.

beforeLoadData

Source code

beforeLoadData(sourceData, initialLoad, source) ⇒ Array

Fired before Handsontable’s data gets modified by the loadData() method or the updateSettings() method.

Read more:

Since: 8.0.0

ParamTypeDescription
sourceDataArrayAn array of arrays, or an array of objects, that contains Handsontable’s data
initialLoadbooleanA flag that indicates whether the data was loaded at Handsontable’s initialization (true) or later (false)
sourcestringThe source of the call

Returns: Array - The returned array will be used as Handsontable’s new dataset.

beforeLoadingHide

Source code

beforeLoadingHide ⇒ boolean | undefined

Fired by Loading plugin before hiding the loading indicator. This hook is fired when Options#loading option is enabled.

Since: 16.1.0

Returns: boolean | undefined - If returns false, the action will be skipped.

beforeLoadingShow

Source code

beforeLoadingShow ⇒ boolean | undefined

Fired by Loading plugin before showing the loading indicator. This hook is fired when Options#loading option is enabled. The callback can return false to prevent the loading indicator from being shown.

Since: 16.1.0

Returns: boolean | undefined - If returns false, the action will be skipped.

beforeMergeCells

Source code

beforeMergeCells(cellRange, [auto])

Fired by MergeCells plugin before cell merging. This hook is fired when Options#mergeCells option is enabled.

ParamTypeDefaultDescription
cellRangeCellRangeSelection cell range.
[auto]booleanfalseoptional true if called automatically by the plugin.

beforeNotificationHide

Source code

beforeNotificationHide(id) ⇒ boolean | undefined

Fired by Notification plugin before a toast is hidden. Return false to keep it visible. Timed toasts keep their auto-dismiss countdown; if the hide was triggered because the countdown reached zero, the countdown restarts from the configured duration.

Since: 17.1.0

ParamTypeDescription
idstringToast id.

Returns: boolean | undefined - If returns false, the toast stays visible.

beforeNotificationShow

Source code

beforeNotificationShow(options) ⇒ boolean | undefined

Fired by Notification plugin before a toast is shown or enqueued. This hook is fired when Options#notification option is enabled. Return false to cancel Notification#showMessage (no id returned, nothing enqueued). Queued toasts already passed this hook once when Notification#showMessage ran; it is not fired again when a slot opens.

Since: 17.1.0

ParamTypeDescription
optionsobjectNormalized toast options including id, variant, message, duration, position, closable, and actions.

Returns: boolean | undefined - If returns false, the toast is not shown and not queued.

beforeOnCellContextMenu

Source code

beforeOnCellContextMenu(event, coords, TD)

Fired after the user clicked a cell, but before all the calculations related with it.

Since: 4.1.0

ParamTypeDescription
eventEventThe contextmenu event object.
coordsCellCoordsCell coords object containing the visual coordinates of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

beforeOnCellMouseDown

Source code

beforeOnCellMouseDown(event, coords, TD, controller)

Fired after the user clicked a cell, but before all the calculations related with it.

ParamTypeDescription
eventEventThe mousedown event object.
coordsCellCoordsCell coords object containing the visual coordinates of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.
controllerobjectAn object with properties row, column and cell. Each property contains a boolean value that allows or disallows changing the selection for that particular area.

beforeOnCellMouseOut

Source code

beforeOnCellMouseOut(event, coords, TD)

Fired after the user moved cursor out from a cell, but before all the calculations related with it.

ParamTypeDescription
eventEventThe mouseout event object.
coordsCellCoordsCellCoords object containing the visual coordinates of the leaved cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

beforeOnCellMouseOver

Source code

beforeOnCellMouseOver(event, coords, TD, controller)

Fired after the user moved cursor over a cell, but before all the calculations related with it.

ParamTypeDescription
eventEventThe mouseover event object.
coordsCellCoordsCellCoords object containing the visual coordinates of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.
controllerobjectAn object with properties row, column and cell. Each property contains a boolean value that allows or disallows changing the selection for that particular area.

beforeOnCellMouseUp

Source code

beforeOnCellMouseUp(event, coords, TD)

Fired after the user clicked a cell.

ParamTypeDescription
eventEventThe mouseup event object.
coordsCellCoordsCell coords object containing the visual coordinates of the clicked cell.
TDHTMLTableCellElementCell’s TD (or TH) element.

beforePageChange

Source code

beforePageChange(oldPage, newPage) ⇒ * | boolean

Fired by Pagination plugin before changing the page. This hook is fired when Options#pagination option is enabled.

Since: 16.1.0

ParamTypeDescription
oldPagenumberThe old page number.
newPagenumberThe new page number.

Returns: * | boolean - If false is returned the action is canceled.

beforePageSizeChange

Source code

beforePageSizeChange(oldPageSize, newPageSize) ⇒ * | boolean

Fired by Pagination plugin before changing the page size. This hook is fired when Options#pagination option is enabled.

Since: 16.1.0

ParamTypeDescription
oldPageSizenumber
'auto'
The old page size.
newPageSizenumber
'auto'
The new page size.

Returns: * | boolean - If false is returned the action is canceled.

beforePaste

Source code

beforePaste(data, coords) ⇒ *

Fired by CopyPaste plugin before values are pasted into table. This hook is fired when Options#copyPaste option is enabled.

Example

// To disregard a single row, remove it from array using data.splice(i, 1).
new Handsontable(example, {
beforePaste: (data, coords) => {
// data -> [[1, 2, 3], [4, 5, 6]]
data.splice(0, 1);
// data -> [[4, 5, 6]]
// coords -> [{startRow: 0, startCol: 0, endRow: 1, endCol: 2}]
}
});
// To cancel pasting, return false from the callback.
new Handsontable(example, {
beforePaste: (data, coords) => {
return false;
}
});
ParamTypeDescription
dataArray<Array>An array of arrays which contains data to paste.
coordsArray<object>An array of objects with ranges of the visual indexes (startRow, startCol, endRow, endCol) that correspond to the previously selected area.

Returns: * - If returns false then pasting is canceled.

beforeRedo

Source code

beforeRedo(action) ⇒ * | boolean

Fired by UndoRedo plugin before the redo action. Contains information about the action that is being redone. This hook is fired when Options#undo option is enabled.

ParamTypeDescription
actionobjectThe action object. Contains information about the action being redone. The actionType property of the object specifies the type of the action in a String format (e.g. 'remove_row').

Returns: * | boolean - If false is returned the action is canceled.

beforeRedoStackChange

Source code

beforeRedoStackChange(undoneActions)

Fired by UndoRedo plugin before changing redo stack.

Since: 8.4.0

ParamTypeDescription
undoneActionsArrayStack of actions which may be redone.

beforeRefreshDimensions

Source code

beforeRefreshDimensions(previousDimensions, currentDimensions, actionPossible) ⇒ undefined | boolean

Cancellable hook, called after resizing a window or after detecting size change of the Handsontable root element, but before redrawing a table.

ParamTypeDescription
previousDimensionsObjectPrevious dimensions of the container.
currentDimensionsObjectCurrent dimensions of the container.
actionPossiblebooleantrue, if current and previous dimensions are different, false otherwise.

Returns: undefined | boolean - If the callback returns false, the refresh action will not be completed.

beforeRemoveCellClassNames

Source code

beforeRemoveCellClassNames ⇒ Array<string> | undefined

Fired inside the Walkontable’s refreshSelections method. Can be used to remove additional class names from all cells in the table.

Since: 0.38.1

Returns: Array<string> | undefined - Can return an Array of Strings. Each of these strings will act like class names to be removed from all the cells in the table.

beforeRemoveCellMeta

Source code

beforeRemoveCellMeta(row, column, key, value) ⇒ * | boolean

Fired before cell meta is removed.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
keystringThe removed meta key.
value*Value which is under removed key of cell meta.

Returns: * | boolean - If false is returned the action is canceled.

beforeRemoveCol

Source code

beforeRemoveCol(index, amount, physicalColumns, [source]) ⇒ * | boolean

Fired before one or more columns are about to be removed.

ParamTypeDescription
indexnumberVisual index of starter column.
amountnumberAmount of columns to be removed.
physicalColumnsArray<number>An array of physical columns removed from the data source.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: * | boolean - If false is returned the action is canceled.

beforeRemoveRow

Source code

beforeRemoveRow(index, amount, physicalRows, [source]) ⇒ * | boolean

Fired when one or more rows are about to be removed.

ParamTypeDescription
indexnumberVisual index of starter row.
amountnumberAmount of rows to be removed.
physicalRowsArray<number>An array of physical rows removed from the data source.
[source]stringoptional String that identifies source of hook call (list of all available sources).

Returns: * | boolean - If false is returned the action is canceled.

beforeRender

Source code

beforeRender(isForced)

Fired before Handsontable’s view-rendering engine updates the view.

The beforeRender event is fired right after the Handsontable business logic is executed and right before the rendering engine starts calling the Core logic, renderers, cell meta objects etc. to update the view.

ParamTypeDescription
isForcedbooleanIf set to true, the rendering gets triggered by a change of settings, a change of data, or a logic that needs a full Handsontable render cycle. If set to false, the rendering gets triggered by scrolling or moving the selection.

beforeRenderer

Source code

beforeRenderer(TD, row, column, prop, value, cellProperties)

Fired before starting rendering the cell.

ParamTypeDescription
TDHTMLTableCellElementCurrently rendered cell’s TD element.
rownumberVisual row index.
columnnumberVisual column index.
propstring
number
Column property name or a column index, if datasource is an array of arrays.
value*Value of the rendered cell.
cellPropertiesobjectObject containing the cell’s properties.

beforeRowMove

Source code

beforeRowMove(movedRows, finalIndex, dropIndex, movePossible) ⇒ * | boolean

Fired by ManualRowMove plugin before changing the order of the visual indexes. This hook is fired when Options#manualRowMove option is enabled.

ParamTypeDescription
movedRowsArrayArray of visual row indexes to be moved.
finalIndexnumberVisual row index, being a start index for the moved rows. Points to where the elements will be placed after the moving action. To check visualization of final index please take a look at documentation.
dropIndexnumber
undefined
Visual row index, being a drop index for the moved rows. Points to where we are going to drop the moved elements. To check visualization of drop index please take a look at documentation. It’s undefined when dragRows function wasn’t called.
movePossiblebooleanIndicates if it’s possible to move rows to the desired position.

Returns: * | boolean - If false is returned the action is canceled.

beforeRowResize

Source code

beforeRowResize(newSize, row, isDoubleClick) ⇒ number | undefined

Fired by ManualRowResize plugin before rendering the table with modified row sizes. This hook is fired when Options#manualRowResize option is enabled.

ParamTypeDescription
newSizenumberCalculated new row height.
rownumberVisual index of the resized row.
isDoubleClickbooleanFlag that determines whether there was a double-click.

Returns: number | undefined - Returns the new row size or undefined if row size should be calculated automatically.

beforeRowsMutation

Source code

beforeRowsMutation(operation, payload)

Fired before rows mutation (create, update, remove) is sent to the server. Return false to cancel.

Since: 17.1.0

ParamTypeDescription
operationstringOne of 'create', 'update', 'remove'.
payloadobjectOperation-specific payload ({ rowsCreate }, { rows: [...] }, or { rowsRemove: [...] }).

beforeRowWrap

Source code

beforeRowWrap(isWrapEnabled, newCoords, isFlipped)

When the focus position is moved to the next or previous row caused by the Options#autoWrapRow option the hook is triggered.

Since: 14.0.0

ParamTypeDescription
isWrapEnabledbooleanTells whether the row wrapping is going to happen. There may be situations where the option does not work even though it is enabled. This is due to the priority of other options that may block the feature. For example, when the Options#minSpareCols is defined, the Options#autoWrapRow option is not checked. Thus, row wrapping is off.
newCoordsCellCoordsThe new focus position. It is an object with keys row and col, where a value of -1 indicates a header.
isFlippedbooleantrue if the row index was flipped, false otherwise. Flipped index means that the user reached the last row and the focus is moved to the first row or vice versa.

beforeSelectAll

Source code

beforeSelectAll(from, to, [highlight])

Fired before all cells are selected (e.g. during mouse corner click or Core#selectAll API call).

Since: 16.1.0
Example

new Handsontable(element, {
beforeSelectAll: (from, to, highlight) => {
// moves the focus to a new position
if (highlight) {
highlight.row = 3;
highlight.col = 3;
}
}
})
ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
[highlight]CellCoordsoptional Selection cell focus coords object.

beforeSelectColumns

Source code

beforeSelectColumns(from, to, highlight)

Fired before one or more columns are selected (e.g. during mouse header click or Core#selectColumns API call).

Since: 14.0.0
Example

new Handsontable(element, {
beforeSelectColumns: (from, to, highlight) => {
// Extend the column selection by one column left and one column right.
from.col = Math.max(from.col - 1, 0);
to.col = Math.min(to.col + 1, this.countCols() - 1);
}
})
ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
highlightCellCoordsSelection cell focus coords object.

beforeSelectionFocusSet

Source code

beforeSelectionFocusSet(coords)

Fired before setting focus selection.

Since: 14.3.0

ParamTypeDescription
coordsCellCoordsCellCoords instance.

beforeSelectionHighlightSet

Source code

beforeSelectionHighlightSet

Fired before applying selection coordinates to the renderable coordinates for Walkontable (rendering engine). It occurs even when cell coordinates remain unchanged and activates during cell selection and drag selection. The behavior of Shift+Tab differs from when there’s no further movement possible.

Since: 14.0.0

beforeSelectRows

Source code

beforeSelectRows(from, to, highlight)

Fired before one or more rows are selected (e.g. during mouse header click or Core#selectRows API call).

Since: 14.0.0
Example

new Handsontable(element, {
beforeSelectRows: (from, to, highlight) => {
// Extend the row selection by one row up and one row bottom more.
from.row = Math.max(from.row - 1, 0);
to.row = Math.min(to.row + 1, this.countRows() - 1);
}
})
ParamTypeDescription
fromCellCoordsSelection start coords object.
toCellCoordsSelection end coords object.
highlightCellCoordsSelection cell focus coords object.

beforeSetCellMeta

Source code

beforeSetCellMeta(row, column, key, value) ⇒ boolean | undefined

Fired before cell meta is changed.

Since: 8.0.0

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
keystringThe updated meta key.
value*The updated meta value.

Returns: boolean | undefined - If false is returned the action is canceled.

beforeSetRangeEnd

Source code

beforeSetRangeEnd(coords)

Fired before setting range is ended.

ParamTypeDescription
coordsCellCoordsCellCoords instance.

beforeSetRangeStart

Source code

beforeSetRangeStart(coords)

Fired before setting range is started.

ParamTypeDescription
coordsCellCoordsCellCoords instance.

beforeSetRangeStartOnly

Source code

beforeSetRangeStartOnly(coords)

Fired before setting range is started but not finished yet.

ParamTypeDescription
coordsCellCoordsCellCoords instance.

beforeStretchingColumnWidth

Source code

beforeStretchingColumnWidth(stretchedWidth, column) ⇒ number | undefined

Fired before applying stretched column width to column.

ParamTypeDescription
stretchedWidthnumberCalculated width.
columnnumberVisual column index.

Returns: number | undefined - Returns new width which will be applied to the column element.

beforeTouchScroll

Source code

beforeTouchScroll

Fired before the logic of handling a touch scroll, when user started scrolling on a touch-enabled device.

beforeTrimRow

Source code

beforeTrimRow(currentTrimConfig, destinationTrimConfig, actionPossible) ⇒ undefined | boolean

Fired by TrimRows plugin before trimming rows. This hook is fired when Options#trimRows option is enabled.

ParamTypeDescription
currentTrimConfigArrayCurrent trim configuration - a list of trimmed physical row indexes.
destinationTrimConfigArrayDestination trim configuration - a list of trimmed physical row indexes.
actionPossiblebooleantrue, if all of the row indexes are withing the bounds of the table, false otherwise.

Returns: undefined | boolean - If the callback returns false, the trimming action will not be completed.

beforeUndo

Source code

beforeUndo(action) ⇒ * | boolean

Fired by UndoRedo plugin before the undo action. Contains information about the action that is being undone. This hook is fired when Options#undo option is enabled.

ParamTypeDescription
actionobjectThe action object. Contains information about the action being undone. The actionType property of the object specifies the type of the action in a String format. (e.g. 'remove_row').

Returns: * | boolean - If false is returned the action is canceled.

beforeUndoStackChange

Source code

beforeUndoStackChange(doneActions, [source]) ⇒ * | boolean

Fired by UndoRedo plugin before changing undo stack.

Since: 8.4.0

ParamTypeDescription
doneActionsArrayStack of actions which may be undone.
[source]stringoptional String that identifies source of action (list of all available sources).

Returns: * | boolean - If false is returned the action of changing undo stack is canceled.

beforeUnhideColumns

Source code

beforeUnhideColumns(currentHideConfig, destinationHideConfig, actionPossible) ⇒ undefined | boolean

Fired by HiddenColumns plugin before marking the columns as not hidden. Fired only if the Options#hiddenColumns option is enabled. Returning false in the callback will prevent the column revealing action from completing.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical column indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical column indexes.
actionPossiblebooleantrue, if the provided column indexes are valid, false otherwise.

Returns: undefined | boolean - If the callback returns false, the hiding action will not be completed.

beforeUnhideRows

Source code

beforeUnhideRows(currentHideConfig, destinationHideConfig, actionPossible) ⇒ undefined | boolean

Fired by HiddenRows plugin before marking the rows as not hidden. Fired only if the Options#hiddenRows option is enabled. Returning false in the callback will prevent the row revealing action from completing.

ParamTypeDescription
currentHideConfigArrayCurrent hide configuration - a list of hidden physical row indexes.
destinationHideConfigArrayDestination hide configuration - a list of hidden physical row indexes.
actionPossiblebooleantrue, if provided row indexes are valid, false otherwise.

Returns: undefined | boolean - If the callback returns false, the revealing action will not be completed.

beforeUnmergeCells

Source code

beforeUnmergeCells(cellRange, [auto])

Fired by MergeCells plugin before unmerging the cells. This hook is fired when Options#mergeCells option is enabled.

ParamTypeDefaultDescription
cellRangeCellRangeSelection cell range.
[auto]booleanfalseoptional true if called automatically by the plugin.

beforeUntrimRow

Source code

beforeUntrimRow(currentTrimConfig, destinationTrimConfig, actionPossible) ⇒ undefined | boolean

Fired by TrimRows plugin before untrimming rows. This hook is fired when Options#trimRows option is enabled.

ParamTypeDescription
currentTrimConfigArrayCurrent trim configuration - a list of trimmed physical row indexes.
destinationTrimConfigArrayDestination trim configuration - a list of trimmed physical row indexes.
actionPossiblebooleantrue, if all of the row indexes are withing the bounds of the table, false otherwise.

Returns: undefined | boolean - If the callback returns false, the untrimming action will not be completed.

beforeUpdateData

Source code

beforeUpdateData(sourceData, initialLoad, source) ⇒ Array

Fired before the updateData() method modifies Handsontable’s data.

Read more:

Since: 11.1.0

ParamTypeDescription
sourceDataArrayAn array of arrays, or an array of objects, that contains Handsontable’s data
initialLoadbooleanA flag that indicates whether the data was loaded at Handsontable’s initialization (true) or later (false)
sourcestringThe source of the call

Returns: Array - The returned array will be used as Handsontable’s new dataset.

beforeValidate

Source code

beforeValidate(value, row, prop, [source])

Fired before cell validation, only if validator function is defined. This can be used to manipulate the value of changed cell before it is applied to the validator function.

Note: this will not affect values of changes. This will change value ONLY for validation.

ParamTypeDescription
value*Value of the cell.
rownumberVisual row index.
propstring
number
Property name / column index.
[source]stringoptional String that identifies source of hook call (list of all available sources).

beforeValueRender

Source code

beforeValueRender(value, cellProperties)

Fired before cell value is rendered into the DOM (through renderer function). This can be used to manipulate the value which is passed to the renderer without modifying the renderer itself.

ParamTypeDescription
value*Cell value to render.
cellPropertiesobjectAn object containing the cell properties.

beforeViewportScroll

Source code

beforeViewportScroll

Fired before the vertical or horizontal viewport scroll. Triggered by the scrollViewportTo() method or table internals.

Since: 14.0.0

beforeViewportScrollHorizontally

Source code

beforeViewportScrollHorizontally(visualColumn, [snapping]) ⇒ number | boolean

Fired before the horizontal viewport scroll. Triggered by the scrollViewportTo() method or table internals.

Since: 14.0.0

ParamTypeDefaultDescription
visualColumnnumberVisual column index.
[snapping]'auto'
'start'
'end'
’auto’optional If 'start', viewport is scrolled to show the cell on the left of the table. If 'end', viewport is scrolled to show the cell on the right of the table. When 'auto', the viewport is scrolled only when the column is outside of the viewport.

Returns: number | boolean - Returns modified column index (or the same as passed in the method argument) to which the viewport will be scrolled. If the returned value is false, the scrolling will be canceled.

beforeViewportScrollVertically

Source code

beforeViewportScrollVertically(visualRow, [snapping]) ⇒ number | boolean

Fired before the vertical viewport scroll. Triggered by the scrollViewportTo() method or table internals.

Since: 14.0.0

ParamTypeDefaultDescription
visualRownumberVisual row index.
[snapping]'auto'
'top'
'bottom'
’auto’optional If 'top', viewport is scrolled to show the cell on the top of the table. If 'bottom', viewport is scrolled to show the cell on the bottom of the table. When 'auto', the viewport is scrolled only when the row is outside of the viewport.

Returns: number | boolean - Returns modified row index (or the same as passed in the method argument) to which the viewport will be scrolled. If the returned value is false, the scrolling will be canceled.

beforeViewRender

Source code

beforeViewRender(isForced, skipRender)

Fired before Handsontable’s view-rendering engine is rendered.

Note: In Handsontable 9.x and earlier, the beforeViewRender hook was named beforeRender.

Since: 10.0.0

ParamTypeDescription
isForcedbooleanIf set to true, the rendering gets triggered by a change of settings, a change of data, or a logic that needs a full Handsontable render cycle. If set to false, the rendering gets triggered by scrolling or moving the selection.
skipRenderobjectObject with skipRender property, if it is set to true the next rendering cycle will be skipped.

beforeWidthChange

Source code

beforeWidthChange(width) ⇒ number | string

Fired before the width of the table is changed.

Since: 16.1.0

ParamTypeDescription
widthnumber
string
Table width.

Returns: number | string - Modified table width.

construct

Source code

construct

Fired after Handsontable instance is constructed (using new operator).

dialogFocusNextElement

Source code

dialogFocusNextElement

Fired by Dialog plugin before focusing the next element. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

dialogFocusPreviousElement

Source code

dialogFocusPreviousElement

Fired by Dialog plugin before focusing the previous element. This hook is fired when Options#dialog option is enabled.

Since: 16.1.0

hasExternalDataSource

Source code

hasExternalDataSource ⇒ boolean | void

Queried to determine if the instance uses an external data source (complete [[Options#dataProvider]] configuration). When the DataProvider plugin is enabled, it adds an instance handler in enablePlugin(). Callbacks may return true, false, or undefined; the value propagates through the hook chain like other [[Hooks#run]] hooks.

Since: 17.1.0

init

Source code

init

Fired after Handsontable instance is initiated but before table is rendered.

modifyAutoColumnSizeSeed

Source code

modifyAutoColumnSizeSeed(seed, cellProperties, cellValue)

Fired by AutoColumnSize plugin within SampleGenerator utility.

Since: 8.4.0

ParamTypeDescription
seedstring
undefined
Seed ID, unique name to categorize samples.
cellPropertiesobjectObject containing the cell properties.
cellValue*Value of the cell.

modifyAutofillRange

Source code

modifyAutofillRange(entireArea, startArea) ⇒ Array<number>

Fired by Autofill plugin to allow modifying the autofill range. This hook is fired when Options#fillHandle option is enabled.

ParamTypeDescription
entireAreaArray<number>Visual coordinates of the entire area of the drag-down operation ([startRow, startColumn, endRow, endColumn]).
startAreaArray<number>Visual coordinates of the starting point for the drag-down operation ([startRow, startColumn, endRow, endColumn]).

Returns: Array<number> - The modified autofill range ([startRow, startColumn, endRow, endColumn]).

modifyColHeader

Source code

modifyColHeader(column)

Fired when a column header index is about to be modified by a callback function.

ParamTypeDescription
columnnumberVisual column header index.

modifyColumnHeaderHeight

Source code

modifyColumnHeaderHeight

Fired while retrieving the column header height.

modifyColumnHeaderValue

Source code

modifyColumnHeaderValue(value, visualColumnIndex, [headerLevel]) ⇒ string

Fired while retrieving a column header’s value.

Since: 12.3.0

ParamTypeDefaultDescription
valuestringA column header value.
visualColumnIndexnumberA visual column index.
[headerLevel]number0optional Header level index. Accepts positive (0 to n) and negative (-1 to -n) values. For positive values, 0 points to the topmost header. For negative values, -1 points to the bottom-most header (the header closest to the cells).

Returns: string - The column header value to be updated.

modifyColWidth

Source code

modifyColWidth(width, column, [source])

Fired when a column width is about to be modified by a callback function.

ParamTypeDescription
widthnumberCurrent column width.
columnnumberVisual column index.
[source]stringoptional String that identifies source of hook call.

modifyCopyableRange

Source code

modifyCopyableRange(copyableRanges)

Fired to allow modifying the copyable range with a callback function.

ParamTypeDescription
copyableRangesArray<Array>Array of objects defining copyable cells.

modifyData

Source code

modifyData(row, column, valueHolder, ioMode)

Fired when a data was retrieved or modified.

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
valueHolderobjectObject which contains original value which can be modified by overwriting .value property.
ioModestringString which indicates for what operation hook is fired (get or set).

modifyFiltersMultiSelectValue

Source code

modifyFiltersMultiSelectValue(item, meta)

Fired when rendering the list of values in the multiple-selection component of the Filters dropdown. The hook allows modifying the displayed values in that component.

Since: 14.2.0

ParamTypeDescription
itemobjectThe item in the list of values.
metaobjectThe cell properties object.

modifyFocusedElement

Source code

modifyFocusedElement(row, column, focusedElement)

Fired when focusing a cell or a header element. Allows replacing the element to be focused by returning a different HTML element.

Since: 14.0.0

ParamTypeDescription
rownumberRow index.
columnnumberColumn index.
focusedElementHTMLElement
undefined
The element to be focused. null for focusedElement is intended when focused cell is hidden.

modifyFocusOnTabNavigation

Source code

modifyFocusOnTabNavigation(tabActivationDir, visualCoords) ⇒ undefined | boolean

Used to modify the cell coordinates when the table is activated (going into the listen mode).

Since: 14.0.0

ParamTypeDescription
tabActivationDir'from_above'
'from_below'
The browsers Tab navigation direction. Depending on whether the user activated the table from the element above or below, another cell can be selected.
visualCoordsCellCoordsThe coords that will be used to select a cell.

Returns: undefined | boolean - If false is returned, the table will not be focused.

modifyGetCellCoords

Source code

modifyGetCellCoords(row, column, topmost, source) ⇒ undefined | Array<number>

Used to modify the cell coordinates when using the getCell method, opening editor, getting value from the editor and saving values from the closed editor.

Since: 0.36.0

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.
topmostbooleanIf set to true, it returns the TD element from the topmost overlay. For example, if the wanted cell is in the range of fixed rows, it will return a TD element from the top overlay.
sourcestringString that identifies how this coords change will be processed. Possible values: meta the change will affect the cell meta and data; render the change will affect the DOM element that will be returned by the getCell method.

modifyGetCoordsElement

Source code

modifyGetCoordsElement(row, column) ⇒ undefined | Array<number>

Used to modify the returned cell coordinates of clicked cells (TD or TH elements).

Since: 14.6.0

ParamTypeDescription
rownumberVisual row index.
columnnumberVisual column index.

modifyRowData

Source code

modifyRowData(row)

Fired when a data was retrieved or modified.

ParamTypeDescription
rownumberPhysical row index.

modifyRowHeader

Source code

modifyRowHeader(row)

Fired when a row header index is about to be modified by a callback function.

ParamTypeDescription
rownumberVisual row header index.

modifyRowHeaderWidth

Source code

modifyRowHeaderWidth(rowHeaderWidth)

Fired while retrieving the row header width.

ParamTypeDescription
rowHeaderWidthnumberRow header width.

modifyRowHeight

Source code

modifyRowHeight(height, row, [source])

Fired when a row height is about to be modified by a callback function.

ParamTypeDescription
heightnumberRow height.
rownumberVisual row index.
[source]stringoptional String that identifies source of hook call.

modifyRowHeightByOverlayName

Source code

modifyRowHeightByOverlayName(height, row, overlayName)

Fired when a row height is about to be modified by a callback function. The hook allows to change the row height for the specified overlay type.

Since: 14.5.0

ParamTypeDescription
heightnumberRow height.
rownumberVisual row index.
overlayName'inline_start'
'top'
'top_inline_start_corner'
'bottom'
'bottom_inline_start_corner'
'master'
Overlay name.

modifySourceData

Source code

modifySourceData(row, column, valueHolder, ioMode)

Fired when a data was retrieved or modified from the source data set.

Since: 8.0.0

ParamTypeDescription
rownumberPhysical row index.
columnnumberPhysical column index or property name.
valueHolderobjectObject which contains original value which can be modified by overwriting .value property.
ioModestringString which indicates for what operation hook is fired (get or set).

modifyTransformEnd

Source code

modifyTransformEnd(delta)

Fired when the end of the selection is being modified (e.g. Moving the selection with the arrow keys).

ParamTypeDescription
deltaCellCoordsCell coords object declaring the delta of the new selection relative to the previous one.

modifyTransformFocus

Source code

modifyTransformFocus(delta)

Fired when the focus of the selection is being modified (e.g. Moving the focus with the enter/tab keys).

Since: 14.3.0

ParamTypeDescription
deltaCellCoordsCell coords object declaring the delta of the new selection relative to the previous one.

modifyTransformStart

Source code

modifyTransformStart(delta)

Fired when the start of the selection is being modified (e.g. Moving the selection with the arrow keys).

ParamTypeDescription
deltaCellCoordsCell coords object declaring the delta of the new selection relative to the previous one.