Migrating from 18.1 to 19.0
Migrate from Handsontable 18.1 to Handsontable 19.0.
The changes are grouped by how many apps they reach, from the ones that stop a grid from working to the ones that affect a few setups. Read Before you upgrade in full. For every other group, scan its table and open only the changes that match your setup. Each change lists who it affects and what to do. Edge cases sit in a collapsed Details block.
For a full list of changes in this release, see the Changelog.
Before you upgrade
Most of these changes stop the grid from working: it shows a lock screen, throws an error, or runs in a browser 19.0 no longer supports. The rest fail at compile time or drop an option with a console warning. Check each one before you upgrade.
| Change | Affects | Do |
|---|---|---|
non-commercial-and-evaluation key no longer works | Apps that pass this key, or the Angular NON_COMMERCIAL_LICENSE constant | Get a trial key, a free license for non-commercial projects, or a commercial license before you upgrade |
| Higher minimum browser versions | Apps that support Chrome or Edge older than 130, Firefox older than 132, or Safari older than 18.2 | Raise your browser targets, or stay on 18.1 |
| Stricter license key check | Entitlement keys passed in a shortened or edited form | Pass the key exactly as you received it |
| Removed deprecated APIs | Calls to APIs deprecated in 17.1 and 18.0 | Switch to the replacements |
Loading needs Dialog | Apps that register modules one by one | Register Dialog next to Loading |
beforeInit in settings runs | Settings that declare a beforeInit callback | Move code that reads the grid to afterInit |
The
non-commercial-and-evaluationlicense key no longer worksHandsontable 19.0 no longer recognizes the
'non-commercial-and-evaluation'key or the'ht68e-1f2b7-47158-70b05-0842f'key. Both read as invalid: a lock screen covers the grid, and the console shows “The license key for Handsontable is invalid.” Handsontable 18.1 and older still accept both.Affects: You pass either key (in any letter case) as the
licenseKeyoption, or you importNON_COMMERCIAL_LICENSEfrom@handsontable/angular-wrapper.Do: Before you upgrade, get a license key and pass it instead. See Get a license key.
- To evaluate Handsontable, get a trial key at handsontable.com/pricing.
- For non-commercial projects, such as teaching or academic research, you may qualify for a free license. To apply, contact our sales team and tell us about your project.
- For commercial use, buy a commercial license.
Before:
const hot = new Handsontable(container, {data,licenseKey: 'non-commercial-and-evaluation',});After:
const hot = new Handsontable(container, {data,licenseKey: 'your-license-key',});In the Angular wrapper, stop using
NON_COMMERCIAL_LICENSEand pass your key inHOT_GLOBAL_CONFIG:Before:
import { HOT_GLOBAL_CONFIG, NON_COMMERCIAL_LICENSE } from '@handsontable/angular-wrapper';providers: [{ provide: HOT_GLOBAL_CONFIG, useValue: { license: NON_COMMERCIAL_LICENSE } }];After:
import { HOT_GLOBAL_CONFIG } from '@handsontable/angular-wrapper';providers: [{ provide: HOT_GLOBAL_CONFIG, useValue: { license: 'your-license-key' } }];Details: The non-commercial-and-evaluation license key no longer works
NON_COMMERCIAL_LICENSEholds the removed key. It is deprecated, and 20.0.0 removes it. Importing it still compiles, but a grid configured with it shows the lock screen.
The minimum browser versions are higher
Handsontable 19.0 runs on Chrome and Edge 130, Firefox 132, and Safari 18.2 on macOS and iOS. Handsontable 18.1 ran on Chrome 110, Firefox 110, and Safari 14.1. In an older browser, the grid can throw errors or render without parts of its theme.
Affects: Your app must run in a browser older than the 19.0 minimum, on desktop or on an iPhone or iPad. Handsontable 19.0 isn’t tested in those versions.
Do: Before you upgrade, check which browser versions your users run. Raise the browsers you declare (for example in a Browserslist config) to at least the 19.0 minimum. If you must keep supporting older browsers, stay on Handsontable 18.1 until you can drop them.
# BeforeChrome >= 110Firefox >= 110Safari >= 14.1# AfterChrome >= 130Edge >= 130Firefox >= 132Safari >= 18.2iOS >= 18.2Details: The minimum browser versions are higher
- The theme stylesheets use CSS nesting, logical properties, and the
light-dark()color function. The 18.1 build rewrote them into older CSS, which dropped some theme icons and, in right-to-left grids, drew rounded corners on the wrong cells. The 19.0 build no longer rewrites them. - The JavaScript targets the same browsers, so Handsontable 19.0 can use built-in methods up to ES2024 (#13232).
- Polyfills do not cover the theme stylesheets. Rewriting them for older browsers yourself brings back the bugs.
- For the minimum versions of both releases, see Supported browsers.
- The theme stylesheets use CSS nesting, logical properties, and the
License keys are checked more strictly
Handsontable 19.0 checks an entitlement license key more strictly than 18.1. A key that 18.1 accepts in a shortened or changed form can read as invalid in 19.0, and an invalid key shows the lock screen over the grid.
Affects: You use an entitlement license key (plain-English text followed by a bracketed block) and pass it in another form than you received it: only the bracketed block, changed text, or anything after the block, such as an email signature or a closing quote.
Do: Before you upgrade, check the
licenseKeyvalue. Pass the whole key exactly as you received it: the text and the bracketed block, with nothing after the block. For where to keep the key, see License key.Details: License keys are checked more strictly
- Spaces and line breaks in an entitlement key are ignored, so a key that an email client wrapped across lines keeps working.
- A key in the 25-character format is not read that way: only spaces and line breaks around the whole key are trimmed,
and a space between its groups makes it invalid. The stricter check does not affect these keys, except
'ht68e-1f2b7-47158-70b05-0842f'. That key and'non-commercial-and-evaluation'are invalid for another reason: see Thenon-commercial-and-evaluationlicense key no longer works.
Removed deprecated APIs
Handsontable 19.0 removes the APIs that 17.1 and 18.0 deprecated. A removed method throws
TypeError: ... is not a function, a removed type alias is a TypeScript error, andcolumnHeadersis ignored with a one-time console warning that namescolHeaders.Affects: Your code uses any API in the list below.
Do: Replace each removed API:
saveManualColumnWidths()andloadManualColumnWidths()(ManualColumnResize), andsaveManualRowHeights()andloadManualRowHeights()(ManualRowResize), deprecated in 18.0: remove the calls. To persist sizes, see the example below.Handsontable.helper.sanitize(), deprecated in 18.0: remove the call and use its argument directly. To sanitize the HTML the grid renders, set thesanitizeroption.- The
columnHeadersexport option of theExportFileplugin, deprecated in 17.1: rename it tocolHeaders. The value keeps its meaning. For example,hot.getPlugin('exportFile').downloadFile('csv', { colHeaders: true }). - The
Settingstype (handsontable/plugins/exportFile), deprecated in 18.0: importExportFileSettings. - The
DataProviderOptionstype (handsontable/plugins/dataProvider), deprecated in 18.0: importDataProviderFetchOptions.
// Beforeimport type { Settings } from 'handsontable/plugins/exportFile';import type { DataProviderOptions } from 'handsontable/plugins/dataProvider';// Afterimport type { ExportFileSettings } from 'handsontable/plugins/exportFile';import type { DataProviderFetchOptions } from 'handsontable/plugins/dataProvider';To persist sizes, collect them in
afterColumnResizeorafterRowResize, and restore them throughmanualColumnResizeormanualRowResize. The plugins read the arrays by physical index, and the hooks pass a visual index. Record each resize at its physical index, so a size survives a filter, trimmed rows, and hidden columns:const colWidths = JSON.parse(localStorage.getItem('colWidths')) ?? [];const rowHeights = JSON.parse(localStorage.getItem('rowHeights')) ?? [];const hot = new Handsontable(container, {manualColumnResize: colWidths.length ? colWidths : true,manualRowResize: rowHeights.length ? rowHeights : true,afterColumnResize(newSize, column) {colWidths[this.toPhysicalColumn(column)] = newSize;localStorage.setItem('colWidths', JSON.stringify(colWidths));},afterRowResize(newSize, row) {rowHeights[this.toPhysicalRow(row)] = newSize;localStorage.setItem('rowHeights', JSON.stringify(rowHeights));},});Details: Removed deprecated APIs
- In 18.x, the resize-state methods did nothing and logged a deprecation warning. See Migrate from 17.1 to 18.0: Resize-state methods.
Handsontable.helper.sanitize()has returned its input unchanged since 18.0, so removing it does not change the output.columnHeadersapplies toexportAsString(),exportAsBlob(),downloadFile(), their asynchronous forms, and asheetsentry of an XLSX export. An export that still passes it writes no header row.- The methods and
columnHeadersprinted a one-time warning in 18.x. The type aliases only showed as deprecated in your editor.
The
Loadingplugin needs theDialogplugin registeredThe
Loadingplugin shows its overlay through theDialogplugin. In 18.1, registeringLoadingwithoutDialogmadeshow()do nothing, with no error. In 19.0,new Handsontable()throws:The Loading plugin requires the following modules:- Dialog (plugin)You have to import and register them manually.Affects: You register modules one by one with
registerPlugin()and registerLoadingwithoutDialog. The fullhandsontablepackage andregisterAllModules()register both.Do: Register the
Dialogplugin next to theLoadingplugin:import Handsontable from 'handsontable/base';import { registerPlugin, Dialog, Loading } from 'handsontable/plugins';registerPlugin(Dialog);registerPlugin(Loading);A
beforeInitcallback in your settings now runsA
beforeInitcallback in the settings object never ran in 18.1. That was a bug. It now runs, so a callback that reads the data throws and the grid never finishes building.Affects: Your settings object declares
beforeInit. Hooks added withHandsontable.hooks.add('beforeInit', ...)oraddHook()are unchanged.Do: If the callback touches the grid, move that part to
afterInit.Before:
const hot = new Handsontable(container, {data,beforeInit() {this.rowCount = this.countRows(); // Throws, the data is not loaded yet.},});After:
const hot = new Handsontable(container, {data,afterInit() {this.rowCount = this.countRows();},});Details: A beforeInit callback in your settings now runs
-
Nothing catches the error. In the wrappers, it comes out of the component’s mount.
-
beforeInitfires before the data loads and the table renders.getSettings()works, butcountRows(),getData(), and any method onhot.viewdo not. -
constructandafterPluginsInitializedrun before Handsontable reads the callbacks from your settings, so declaring either as an option still does nothing. Register them globally:Handsontable.hooks.add('construct', () => {// your code});
-
Changes in every grid
These changes apply under the default settings or common options. Most need no code change, but the grid behaves differently.
| Change | Affects | Do |
|---|---|---|
| Undo and redo restore a recorded state | Every grid with undo, and apps that call undo() with undo: false | Keep undo: true for your own buttons; clear the history after setup |
| Unchanged editor confirm writes nothing | Code that counts afterChange calls or vetoes the confirm in beforeChange | Use afterBeginEditing to detect an opened editor |
| Wrappers pass only changed settings | React and Angular apps that rely on a render to reset sort, filter, or page | Reset through the plugin API |
| Auto-sized columns are not capped | Grids with autoColumnSize and text wider than the grid | Cap the width in modifyColWidth, or set width |
height: 'auto' no longer clips | Grids with height: 'auto', a CSS keyword as width or height, or a var() or container-query width | Set a numeric height to keep an inner scrollbar |
rowHeights is an exact height | Grids with rowHeights and taller content, without autoRowSize | Rename rowHeights to minRowHeights to keep the minimum |
| Cmd/Ctrl + click moves the highlight | Grids with the default selectionMode | Nothing, unless your code expects one click to deselect |
A null hook is removed | Wrapper hook props set to null or dropped, and updateSettings() calls with null | Keep passing the callback |
editor: false reaches typed columns | Typed or checkbox columns under an editor: false | Set editor: true on the column |
| List cells default to one line | autocomplete, dropdown, and handsontable columns | Set textEllipsis: false to wrap |
| Wider auto-sized list columns | Auto-sized autocomplete, dropdown, and handsontable columns | Set a column width to keep the old size |
| List editors overflow the grid | Every grid with list editors, most visibly a short grid or a clipped container | Size the containing area, not the grid |
Undo and redo restore a recorded state
The
UndoRedoplugin used to undo an action by running a reverse action, which could send a value to the wrong row after a row move, a trim, or a sort. In 19.0, it stores the grid state before and after each action, plus the values and cell metadata the action changed. An undo puts back the state from before the action, and a redo puts back the state from after it. Withundo: false, nothing is recorded, so the plugin’sundo()andredo()do nothing.Affects: Everyone who uses the
UndoRedoplugin, and everyone who setsundo: falsebut calls the plugin’sundo()orredo().Do:
-
Undo from your own buttons: keep
undo: trueand remove the shortcuts you do not want (code below).const gridContext = hot.getShortcutManager().getContext('grid');gridContext.removeShortcutsByKeys(['control/meta', 'z']);gridContext.removeShortcutsByKeys(['control/meta', 'y']);gridContext.removeShortcutsByKeys(['control/meta', 'shift', 'z']); -
Setup calls: call
hot.getPlugin('undoRedo').clear()after the setup code, or move the setup into the settings. -
Blocking or changing an undo with
beforeChange, avalueSetter, or an action hook: usebeforeUndoandbeforeRedo(they receive the step with itsactionType, andfalsecancels it). To react to restored values, useafterChangewith theUndoRedo.undoandUndoRedo.redosources. -
Separate steps inside
batch()orbatchExecution(): move those calls out of the batch. -
Custom actions: remove the
done()calls that record a change to the grid, such as asetCellMeta()call. UndoRedo records it already, so each change otherwise takes two undo steps. -
HyperFormula: remove your calls to its
undo()andredo(), and use the grid’s undo and redo. -
Code that reads steps: update code that reads a step’s properties or calls
cellRange,range, orrangesmethods. Steps are plain objects (see the details).
Details: Undo and redo restore a recorded state
-
undo: false. In 18.1, the plugin still recorded changes, and only its shortcuts were off, so an app could callundo()from its own buttons. -
Recorded from the start. API changes are recorded from the moment the grid exists, including setup: a
setCellMeta()call, hidden rows, a page, or a column width set afternew Handsontable(). The first undo reverts your setup. -
More undoable actions. Hiding, showing, and trimming rows and columns, resizing, freezing, collapsing nested rows and column headers, custom borders, comments, the pagination page and page size, and
setCellMeta()writes. The full list is in Undo and redo. -
Batches. Every call inside
batch()orbatchExecution()is one undo step, with the'batch'action type. The newrunOperation()method groups calls the same way. -
Hooks during an undo or redo. Values go straight to the source data.
beforeChangeand the cell’svalueSetterdo not run.afterChangeruns once, with theUndoRedo.undoorUndoRedo.redosource. Restored visible cells are validated again, and only theirvalidstate changes. -
The action’s own hooks do not run, so they cannot cancel an undo or redo: for example
beforeColumnSort,beforeFilter,beforeRowMove, andbeforeMoveCells. ReturningfalsefrombeforeMoveCellsno longer blocks the redo of a cell move. -
beforeMoveCells. A listener that returns anything other thanundefinedor the range it received cancels the move, whether or not UndoRedo is on (this applies withundo: falsetoo). In 18.1, with the defaultundo: true, UndoRedo’s own listener canceled such a move. Withundo: false, onlyfalsedid. -
beforeUndoandbeforeRedo. ReturningfalsefrombeforeUndokeeps the step on the undo stack, asbeforeRedodoes on the redo stack. In 18.1, a canceled undo removed the step for good. Stack hooks such asafterUndoStackChangeno longer fire for a canceled undo. Both hooks fire before the stack hooks, so inbeforeUndothe plugin’sdoneActionsstill holds the step (in 18.1, it was already taken off). -
A hook that cancels an undo. A row or column hook that returns
falseduring an undo, such asbeforeRemoveRow, cancels the whole undo. The grid is put back, and the step stays on its stack.beforeUndohas fired, andafterUndodoes not. The exception is a replayed removal that removes a different number of rows or columns than it recorded (for example, a listener removes more rows along with them): the undo stops there, and the rows that removal took are not put back. -
The step object. Code that reads a step in the undo, redo, or stack hooks, or reads
doneActionsorundoneActions, must follow this. The undo hooks receive the stored step, not a copy, so changing it changes the stored step. Treat it as read-only. UseactionType,source, and the properties in Hooks and stack lifecycle. Do not callundo()orredo()on a step: call the plugin’s. To read the stack after the step left it, listen toafterUndoStackChange. -
Step properties. A step is a plain object with no
undo()orredo()methods, and the internal properties are gone:'change':countCols,countRows,countSourceRows,mergedCells,physicalRows, andprops.'remove_row':fixedRowsTop,fixedRowsBottom,removedCellMetas,removedMergedCells,removedHiddenRows,rowIndexesSequence, and thenested...properties.'remove_col':columnPositions,rowPositions,fixedColumnsStart,removedCellMetas, andremovedMergedCells.'move_cells':data,meta,fromRow,fromCol,toRow,toCol,sourceSnapshot, andtargetSnapshot. It hassourceRangeandtargetRangeinstead.'nested_rows_detach':amount,rowPath,detachedRowPath,formulasUndoRedoSteps, andremoveAction.
Every recorded step now has
source,operations, andsources. -
Ranges. A
cellRange,range, orrangesfield holds plain objects with the same coordinates, notCellRangeinstances, so it has no methods. Read the coordinates directly, for examplestep.cellRange.from.rowandstep.cellRange.to.col. -
Custom actions. Keep
done()for state outside the grid. -
HyperFormula. With the
Formulasplugin, the grid no longer calls HyperFormula’sundo()andredo(). The grid restores the formulas itself and updates the engine. When several grids share one engine, an undo also puts back the formulas that the step changed in the other grids’ sheets and in named expressions. A formula edited since the step keeps its new text, and the grid logs a warning. -
A long session. To cap the history’s memory, set
undo: { maxHistory: <number> }. By default, the stack has no size limit, as before. -
Asynchronous validators.
- An edit that waits for one is recorded when the validation finishes. Overlapping edits sit on the stack in the order they finished.
- An action that changed the grid before it started to wait, such as a
batch()that removes a row and then edits a validated cell, keeps the grid until the validation finishes. Anything changed meanwhile is part of its step, so one undo reverts both. A validator that throws ends the wait, and the step keeps what the action did before the error. - While such an action waits,
isUndoAvailable()andisRedoAvailable()returnfalse, andundo()andredo()do nothing. An edit on its own does not block them. - What a validator or an
afterValidatelistener changes during validation (a corrected value, or cell metadata) is part of that edit’s step. In 18.1, each such change was its own step.
-
updateData().updateData()clears both stacks when it brings other data, asloadData()always did. It keeps them when the new data is what the grid shows: the same array, a copy of it (rows.slice()), or rows that hold the same values, such as an immutable row update gives. A wrapper passesdataon every render, so a render with the same rows keeps the history, as in 18.1.- Rows added or removed in the array in place still clear it. Reordering or replacing rows in the array in place clears it too, even when you pass a copy of it.
- Cells are compared with
===, so a copied nested object counts as a different value. - With
NestedRows, a copy of the array clears the history too. - Up to 1000 rows may be new objects with the same values. If more are, the data counts as other data.
- A value you change in place in a row, outside the grid, is not seen: the history stays, and an undo writes the old value back over it. Change values through the grid, or pass other data.
- Turning a plugin that keeps its own index map on or off at runtime clears both stacks too:
HiddenRows,HiddenColumns,TrimRows, the sorting plugins, andFilters. The move plugins do not. The stack hooks announce each drop.
-
columns. Acolumnsupdate keeps the history. It drops a step that changed something on a column whose field changed or is gone (a cell’s metadata, a hidden or frozen column, a merge, or a filter), with every step that can only be undone or redone after it. Oncecolumnsis set, it also drops a step that inserted or removed columns. An edit is recorded by field, so acolumnsupdate drops it only together with such a step. A column whosedatais a function created on every render (an inline function in React) reads as a new field each time, so each render drops the steps that changed something on that column. The stack hooks announce the drop. -
colWidths,rowHeights, andminRowHeights. SwitchingcolWidths,rowHeights, orminRowHeightsto or from an array, or passing a new array of any of them toupdateSettings(), clears both stacks, as enabling a plugin does: earlier steps hold the columns or rows of the previous array. The same array keeps them. A framework wrapper forwards the prop only when it changed.
-
Confirming an editor without typing writes nothing
Opening a cell editor and pressing Enter without typing used to write the editor’s string back over the cell:
nullandundefinedbecame'',truebecame'true', and a number in atextcolumn became a string. Each write also firedbeforeChangeandafterChange. In 19.0, such a confirm writes nothing, and neither hook fires. That includes an editor whosegetValue()returns the cell value it was opened with, as a custom editor’ssetValue()receives the cell value describes.Affects: Apps that count
afterChangeevents to drive a dirty flag, an autosave, or a change tracker (the events you lose reported an edit the user did not make), and apps that returnfalsefrombeforeChangeand rely on that closing the editor.Do: Nothing in most cases. To know that the user opened and closed an editor, use
afterBeginEditing.afterChangewas never the right signal for that.Details: Confirming an editor without typing writes nothing
- Validation is unchanged. A cell with a
validatoris still validated on that confirm, against the value the cell already holds (the value it would have been handed before).allowInvalid: falsestill holds the editor open on a value the validator rejects. beforeChangeclosing the editor. ReturningfalsefrombeforeChangestill closes the editor on a real edit. A confirm that changed nothing has no change to cancel, so the hook does not run and the validator decides. With no validator, or a value that passes, the editor closes as before. If the validator rejects the value andallowInvalidisfalse, the editor stays open, the same as whenbeforeChangereturnedtrue. Escape closes the editor and leaves the value alone.- To choose what an emptied cell stores, see the
emptyValueoption under Also new in 19.0. It is opt-in and the default is unchanged. See Empty cell values.
- Validation is unchanged. A cell with a
The React and Angular wrappers pass only the settings that changed
In 18.1, the React wrapper passed every prop to
updateSettings()on each render, and the Angular wrapper passed every key of thesettingsinput whenever it changed. A setting passed again re-applied the plugin it names, which could reset state the user gave that plugin, such as the filter conditions or the page. In 19.0, both wrappers leave out a setting whose value is the same as the value they passed last time.Affects: Apps that use
@handsontable/react-wrapperor@handsontable/angular-wrapperand rely on a render or asettingschange to reset a sort, filter, or page that the grid’s settings did not change, or that change a setting throughhot.updateSettings()and rely on the next render to put the prop’s unchanged value back.Do: Reset the state through the plugin, for example
hot.getPlugin('columnSorting').clearSort(), or pass a setting with another value. To put a prop’s value back after a change made through the instance, callhot.updateSettings()with that value.Details: The React and Angular wrappers pass only the settings that changed
- Objects and arrays are compared by content with a copy of the value passed last time, so an object or array you
change in place is still passed. Functions are compared by reference, and so is
sheetsBar. datais passed every time, as before: React’sdataprop, adatakey in Angular’ssettingsinput, and Angular’sdatainput, which still callsupdateData()when it changes. A render that passes the same rows, or rows with the same values, keeps the undo and redo history. A render that passes other values replaces the dataset and clears it.
- Objects and arrays are compared by content with a copy of the value passed last time, so an object or array you
change in place is still passed. Functions are compared by reference, and so is
An auto-sized column is no longer capped at the width of the grid
In 18.1, the width of the grid’s root element limited the width of an auto-sized column. A column whose widest value was longer than the grid stopped at the grid’s width, its text wrapped, and its rows grew taller. In 19.0, a column is measured at the width of its widest value, whatever the size of the grid. The text stays on one line, the rows keep their default height, and the grid scrolls horizontally.
Affects: Grids that leave
autoColumnSizeon (the default) and have a column with text wider than the grid.Do: To keep a column from growing past a limit, cap it in the
modifyColWidthhook, or set itswidthin thecolumnsoption. For an example, see Set a dynamic maximum column width.Details: An auto-sized column is no longer capped at the width of the grid
- The 18.1 measurement also followed the size of the root at the moment of measuring, so a grid whose container collapsed to a few pixels and came back kept narrow, wrapped columns.
- 19.0 restores the behavior Handsontable had before 16.2.0.
height: 'auto'no longer clips the gridSetting the
heightoption to'auto'used to writeheight: auto; overflow: clip;on the grid’s root element, so the grid scrolled inside that root, rendered every row at once, and cut off a dropdown editor on the last row. It now writesheight: autoand nothing else. The grid behaves like a plain block element: it grows to fit its rows, the nearest scrolling ancestor or the page scrolls it, and off-screen rows stay virtualized.Affects: Anyone using
height: 'auto', passing a CSS keyword or an unreadable value aswidthorheight, or passing avar()or container-query-unitwidthwithheightunset or'auto'.Do: Nothing for the common case. To keep an internal vertical scrollbar, set a numeric
height, or place the grid in a parent with a fixed height andoverflow: auto. If you passed an unsupported CSS keyword aswidthorheight, use'auto'or a length instead (see the details).To keep an internal vertical scrollbar:
// Beforeheight: 'auto',// Afterheight: 500,Details: height: 'auto' no longer clips the grid
-
A fixed-height parent. In a parent with a fixed height and
overflow: auto, aheight: 'auto'grid fills the parent and scrolls inside it:<div style="height: 500px; overflow: auto;"><div id="grid"></div></div>new Handsontable(document.querySelector('#grid'), {height: 'auto',// ...}); -
Fixed
width. Withheight: 'auto', a fixedwidthclips the horizontal axis only: the grid scrolls its columns inside that width, and the page scrolls its rows. -
Other effects. The
EmptyDataStateandStretchColumnsplugins read where the grid scrolls, so they are affected too.hot.view.isVerticallyScrollableByWindow()now returnstrueforheight: 'auto'. -
Unreadable sizes. A
widthorheightthe browser cannot read as a size ('abc',-100,true) is ignored with a one-time console warning. It used to be written to the root element as it was. These CSS keywords are ignored too:'inherit','initial','unset','revert','revert-layer','none', and'normal'do not set a size.'min-content','max-content','fit-content', andfit-content()size the grid to its full content, so it cannot scroll inside its box and renders every row or column.'stretch','-webkit-fill-available', and'-moz-available'fill the container but read as a fixed size, so the grid would clip the columns past the container with no scrollbar.
For a grid that fills its container, use
'100%'or'auto'. -
External widths. With a free height (
'auto'or unset), awidththat resolves against something outside the grid, such as'var(--grid-width)'or'50cqw', is no longer clipped withoverflow-x: cliplike a fixed width. The page now scrolls the columns, as with'100%'. To keep the grid scrolling its own columns, give it a fixed width, such as a number or apxoremlength. A sizedheightstill clips both axes, whatever the width. -
width: nullclears the inline width, asheight: nullclears the height. It used to writewidth: nullpx. Each reset restores its own property only, soheight: nullno longer removes awidthset through the option.
-
rowHeightssets an exact row heightThe
rowHeightsoption now sets the exact height of a row. Before, it set a minimum: a value below the default row height was raised to the default, and a row grew to fit taller content. Now a row renders at the height you set and clips content that doesn’t fit, as in Excel, so rows can be as thin as you want.getRowHeight()returns the height you set, too.minRowHeightsis no longer an alias ofrowHeights: it keeps the old minimum behavior.Affects: Grids that set
rowHeights, leaveautoRowSizeoff, and have a row with content taller than that height (multiline text, a custom renderer, or custom cell styles): those rows now clip.Do: To keep rows that grow to fit their content, rename the option to
minRowHeights, or enableautoRowSize, whererowHeightsstays a minimum. To keep the clipping, raise the height to fit your content, or shorten the content.Before:
rowHeights: 50,After:
minRowHeights: 50,Details: rowHeights sets an exact row height
Setting Before Now rowHeightsbelow the default row heightThe row has the default height The row has the height you set rowHeightsbelow the content’s heightThe row grows to fit the content The row keeps its height and clips the content rowHeightsof0orundefinedThe row has the default height The same, or the minRowHeightsheight if you set itrowHeightswithautoRowSizeenabledA minimum, the row grows to fit The same minRowHeightsA minimum, the row grows to fit The same - Not affected: grids that use
minRowHeights, enableautoRowSize, or have rows that already fit. - You can set both options:
rowHeightssets the rows it gives a height, andminRowHeightsapplies to the others. - A
rowHeightsequal to the default row height is affected too: the first row of a grid without column headers draws its top border inside the height you set. It was 1 px taller than the other rows before. - Clipped content stays in the DOM, and screen readers still read it. Larger text or overridden text spacing no longer
makes your rows taller, so test with larger text if you set
rowHeightsbelow your content’s height. ImportFileapplies an imported workbook’s row heights throughminRowHeights, so an imported row keeps the default row height when the workbook’s height is smaller, as before.ExportFilewrites the heightsgetRowHeight()returns, so a row you set below the default exports at that height. It writes a hidden row’s height fromrowHeightsorminRowHeights, whichever you set.ManualRowResizeis not part of this change. Dragging a row border, or callingsetManualSize(), still doesn’t make a row shorter than the default row height. WithmanualRowResizeenabled, a row that arowHeightsheight covers stays at the height the user drags it to and clips its content. A row without arowHeightsheight grows to fit its content, as before.
- Not affected: grids that use
Cmd/Ctrl + click on a selected cell moves the highlight
In a grid with the default
selectionModeofmultiple, a Cmd/Ctrl + click on a selected cell now depends on where the highlight is. If the cell does not hold the highlight, the highlight moves to it and every selected cell stays selected. If the cell already holds the highlight, the cell is deselected (clicking the last remaining cell still clears the selection). Since 16.0.0, the click always deselected the cell, so the highlight appeared to jump to a cell you clicked earlier.Affects: Apps that rely on one Cmd/Ctrl + click removing a cell from the selection, or that count
afterDeselectevents or readgetSelected()after such a click.Do: Nothing in most cases. If your own code removed a selection layer in response to such a click, drop that workaround: the grid no longer removes the layer for you.
Details: Cmd/Ctrl + click on a selected cell moves the highlight
- A click that moves the highlight keeps the layer instead of dropping it, and no longer clears the selection.
- Two clicks on the same cell still deselect it: the first moves the highlight there, the second removes it. Click speed makes no difference, so a Cmd/Ctrl + double-click moves the highlight onto the cell and then removes it.
- A grid with
selectionModeset tosingleorrangeis unaffected, because neither supports more than one selection layer.
A hook set to
nullthroughupdateSettings()is removedIn 18.1, a hook you passed in the settings could not be removed:
updateSettings()with the hook set tonulldid nothing, the callback kept running, andgetSettings()still returned it. In 19.0,nullremoves every callback that settings passed for that hook, including the callbacks of an array passed earlier, andgetSettings()returnsnullfor it.Affects: Apps that pass
nullfor a hook inupdateSettings()and expect the earlier callback to keep running, and apps that use a framework wrapper and set a hook prop tonullorundefined, or stop passing it, for exampleafterChange={isTracking ? logChange : null}in React.Do: To keep the callback, leave the hook out of the
updateSettings()call, or pass the callback again. In a framework wrapper, keep passing the callback in the prop.const hot = new Handsontable(container, {afterChange: logChange,});// 18.1: `logChange` keeps running// 19.0: `logChange` is removedhot.updateSettings({ afterChange: null });Details: A hook set to null through updateSettings() is removed
- Angular. The change applies to a hook that a new
settingsobject sets tonullorundefined, or leaves out. Keep passing the callback in thesettingsobject. - A listener you added with
addHook()is never removed this way, even when it is the same function.undefinedstill leaves the hook as it is. - In TypeScript, the settings object of
updateSettings()acceptsnullfor every hook. The ReactHotTablecomponent’s hook props also acceptnull, so code that reads a hook prop back must handlenull.
- Angular. The change applies to a hook that a new
editor: falseis honored by typed and checkbox columnsTwo cases where
editor: falsehad no effect are fixed, so a cell you could edit in 18.1 is non-editable in 19.0. A columntypeno longer re-enables editing: it still applies itsrendererandvalidator, but not itseditor. Acheckboxcell witheditor: falseoreditor: nullrenders a disabled checkbox that a click or Space cannot toggle (you can still select the cell).Affects: Grids that set
editor: falseon the grid, on a column, or throughcellswhile a lower configuration level sets atypeon the same cells, and grids with acheckboxcolumn that users toggle andeditor: falseoreditor: nullon that column or the grid (typically a non-editable grid with a checkbox column for selecting rows).Do: To keep a typed column editable under
editor: false, give the column its owneditorat the same configuration level as itstype:editor: truekeeps the editor thetypeprovides, or name an editor. To keep a checkbox column toggleable, removeeditor: falsefrom it, or seteditor: trueoreditor: 'checkbox'on the column (under a grid-leveleditor: false, this is the only option).editor: false,columns: [{ type: 'text' },// 18.1: editable. 19.0: non-editable, still rendered and validated as numeric.{ type: 'numeric' },// Editable again:{ type: 'numeric', editor: true },{ type: 'numeric', editor: 'numeric' },// 18.1: toggleable. 19.0: a disabled checkbox. Add editor: true to toggle.{ data: 'selected', type: 'checkbox' }]Details: editor: false is honored by typed and checkbox columns
- In 18.1, a
typeset on a column replaced aneditor: falsefrom a higher configuration level, so the column stayed editable, andeditor: falsedidn’t stop a click or Space from toggling a checkbox. - The two changes combine: a grid-level
editor: falsenow reaches acheckboxcolumn, because the column’stypeno longer supplies the checkbox editor. - A custom cell type that declares
editor: falseisn’t affected: that is the type’s default, so a column with atypeof its own still replaces it, as in 18.1. - To make a checkbox non-toggleable, prefer
readOnly, which also announces the cell as read-only to screen readers.
- In 18.1, a
The list cell types default to a single line
The
autocomplete,dropdown, andhandsontablecell types, which render a dropdown arrow, now defaulttextEllipsistotrue. A value stays on a single line and truncates with an ellipsis, clear of the arrow (the arrow’s space is reserved, see the column width change). Before, a value in a narrow column wrapped onto several lines and tangled with the arrow.Affects: Columns with
type: 'autocomplete','dropdown', or'handsontable'that relied on the value wrapping onto multiple lines.Do: To turn wrapping back on, set
textEllipsistofalseon the column, incells, or withsetCellMeta(): the layer that declares thetype, or one below it.Before:
columns: [{ type: 'autocomplete', source: countries },],After:
columns: [{ type: 'autocomplete', source: countries, textEllipsis: false },],Details: The list cell types default to a single line
- It is a default, not a fixed rule:
textEllipsisandwordWrapstill work. - A grid-level
textEllipsis: falsedoes not reach a column that declares the type, because the type’s own value shadows it. - The default comes from the cell type. A column that only sets
renderer: 'autocomplete'without the type keeps its previous wrapping. - A value with its own line breaks (a
<br>or block-level HTML in anallowHtmlcell) can still render on more than one line. autoRowSizemeasures each row by rendering the real cell. On such a column a long value used to wrap and grow the row. It now stays on one line, so those rows size to a single line.
- It is a default, not a fixed rule:
AutoColumnSize includes the list-cell arrow in the column width
The arrow of an
autocomplete,dropdown, orhandsontablecell is now out of flow, and its width is reserved as trailing padding on the cell.AutoColumnSizerenders the real cell renderer off-DOM, so that padding is part of the measured width and the column grows by the reserved arrow slot. Before, it measured the text alone, so a long value wrapped the arrow onto a second line.Affects: Grids that leave
autoColumnSizeon (the default) for those columns without pinning them with a columnwidthorcolWidths. Those columns become wider on upgrade.Do: Nothing, if the extra width is acceptable. To keep the previous size on one column, set that column’s
width. To pin every column, setcolWidths, which disables AutoColumnSize for the whole grid.Before:
columns: [{ type: 'autocomplete', source: countries },{ type: 'text' },],After:
columns: [{ type: 'autocomplete', source: countries, width: 120 },{ type: 'text' },],Details: AutoColumnSize includes the list-cell arrow in the column width
- A column you pin with
widthorcolWidthskeeps the width you set.
- A column you pin with
Dropdown editor lists are no longer confined to the grid
The lists of the
autocomplete,dropdown,handsontable, andmultiselectcell types are now positioned against the viewport instead of inside the grid’s root element. With a setheight, that root used to clip a list opened near the bottom row, and the editor trimmed it to the rows that fit inside the grid (on a short grid, as few as two choices). Now every choice that fits on screen is shown.Affects: Every grid with these editors, in particular grids with a set
heightwhose last rows carry one of them, grids inside a parent with a fixed height andoverflow: autooroverflow: hidden, and code or tests that read the list’s position or assert that it opens above the edited cell when the grid has no room below.Do: Nothing for the common case. If the list has to stay inside a specific area, size that area rather than the grid. Give a transformed container room if you want the whole list visible (see the details).
Details: Dropdown editor lists are no longer confined to the grid
-
The list can now paint outside the grid’s box. It still belongs to the grid’s stacking context, so a host page that puts the grid inside its own layer keeps its own chrome on top.
-
Transformed ancestors. An ancestor with any of these properties becomes the box the list is laid out in, instead of the browser window (the grid reads it for you):
transform,translate,rotate, orscaleperspectivefilterorbackdrop-filtercontainset topaint,layout,strict, orcontentwill-changenaming any of the above
A centered modal with
transform: translate(-50%, -50%)is the common case, butscale: 0.9andcontain: contentdo it too. The list is placed and bounded against that element: it cannot leave it, and a taller list is trimmed to fit and scrolls. Acontainer-typedoes not do this, so a grid in a container-query layout places its list against the browser window. -
Above or below. The space left in the viewport, not inside the grid, decides whether the list opens above or below the cell. A list that used to flip above the cell to fit a short grid now opens downwards and overhangs the grid. Sideways placement is unchanged: the grid’s own width decides it.
-
The list can render more choices than before, since it is no longer trimmed to the space inside the grid.
visibleRowsstill caps it.
-
Changes in specific features
These changes apply only if you use the feature, option, or API the change names.
| Change | Affects | Do |
|---|---|---|
Icons are <i> elements | Custom icon CSS, custom themes, and DOM tests | Target .ht-icon-<name>, or override --ht-icon-<name> |
colToProp() and propToCol() return null | Code that uses the result as an index without a check | Check the result for null |
setValue() receives the cell value | Custom editors, and React and Angular editor components | Convert the value to a string yourself |
Vue 3 handsontable and getValue props reach the grid | Vue 3 apps that pass handsontable or getValue to HotTable or HotColumn | Check the applied value, or remove the prop |
| Sizes follow their column or row | Array or function colWidths, rowHeights, or minRowHeights with moved, sorted, filtered, trimmed, collapsed, inserted, or removed columns or rows | List sizes in data order; remove sync workarounds |
| Plugin settings apply before the first render | Hooks such as afterColumnSort that read the drawn grid while it builds | Read the grid in afterInit |
| A validated change stays on its record | Validated cells whose rows move while the validator runs; typed afterChange listeners | Handle a null row; use AppliedCellChange |
loadData() drops a pending change | loadData() during an edit or right after setDataAtCell(), on validated cells | Load after afterChange, or use updateData() |
| XLSX export without ExcelJS | Apps that set exportFile or export to XLSX | Nothing to keep exporting; check the file changes |
updateSettings() keeps server-backed rows | dataProvider grids | Reload with fetchData() |
rowId reads dotted property names | dataProvider rows with dots in property names | Use a function rowId |
Key/value source cells store objects | autocomplete and dropdown columns with a { key, value } source | Read .value when the value matches an option |
dropdown with strict: false validates | dropdown columns with strict: false | Switch to autocomplete with strict: false |
date cells in formulas | Formulas with date columns holding non-ISO values, or a cells() function or meta hook with side effects | Use numeric columns for numbers; make cells() and the meta hooks free of side effects |
afterRender engine writes loop | Formulas apps that write to the engine from afterRender | Write only when the value differs |
SHEET() keeps a sheet’s number | Formulas apps that remove sheets and read SHEET() as a position | Count positions yourself |
| Frozen columns can be dragged | manualColumnFreeze with manualColumnMove, and freeze hook listeners | Guard the move in beforeColumnMove |
| Theme-based minimum column width | dropdownMenu with column resizing | Update expected minimum widths |
| Menu borders use a theme color | customBorders with the context menu | Read color as a CSS value |
maxLength is built in | Cell settings with your own maxLength key | Rename your key, or use the built-in option |
| Removing a parent removes all descendants | NestedRows with three or more levels | Read the rows from the hook argument |
| Cmd/Ctrl + arrows on row headers | NestedRows with navigableHeaders | Update your shortcut docs |
| Arrow off a merged cell lands on its top row | mergeCells with keyboard navigation | Nothing, unless your code compensates |
| Dragged rows land after hidden rows | manualRowMove with hiddenRows | Check orderChanged in move hooks |
numeric cells align by type | numeric cells that can hold non-numbers | Check the value, not the class name |
loading: false turns Dialog off | Dialog used after loading is turned off, without dialog: true | Set dialog: true |
Changing dataSchema resets state | updateSettings() that changes dataSchema without columns | Save the state and apply it again |
Non-null dataSchema values create columns | dataSchema with non-null values and no columns | Set columns, or use null values |
colWidths: null acts like undefined | colWidths or width set to null | Set colWidths: 50 for the old width |
| Row elements move on scroll | Code that holds tr or td references or observes tbody | Read rows through getCell() |
getCopyableData() returns a string | Code that reads the stored value from it | Use getDataAtCell() |
Clipboard shortcuts in the grid context | Code that reads or removes the copy, cut, or paste shortcut | Remove your shortcut by group |
checked is reserved in menu items | Custom menu items with a checked property, and themes without icons (-no-icons bundles) | Rename your property; give the mark icons a mask on a theme without icons |
| HTML output and the sanitizer | TrustedHTML sanitizers, toHTML() header markup, and named character references | Check TrustedHTML paste, toHTML() header markup, and named character references |
removeCellMeta() accepts any index | Code that relies on the out-of-range error | Guard the index yourself |
AutoRowSize settings drop useHeaders | Code that reads useHeaders from the AutoRowSize settings | Remove the read |
Icons are rendered as
<i>elementsEvery built-in icon used to be a CSS
::beforeor::afterpseudo-element, generated from aniconsMapstylesheet. In 19.0, it is a real DOM element,<i class="ht-icon ht-icon-<name>" aria-hidden="true"></i>, inserted into the cell, header, or menu item it belongs to. The glyph still comes from a--ht-icon-<name>CSS variable, applied by an unscoped.ht-icon-<name>rule.Affects: Apps that style a built-in icon through a
::beforeor::afterselector (such as.changeType::beforeor.ht-page-next::before), tests that assert the DOM structure of a cell, header, or menu item that holds an icon, and stylesheets or scripts with a bareiselector. Three cases fail silently:- A
-no-iconstheme bundle drawscheckboxcells and the Filters value list with no tick. - A Theme API icon path with no file extension (such as
icons/check) paints nothing. - An
afterGetColHeaderorafterGetRowHeaderhook that rewritesTH.innerHTMLremoves the hidden-column and hidden-row carets.
Do:
- Replace each pseudo-element selector with the matching
.ht-icon-<name>class (see the table in the details), or override--ht-icon-<name>to change only the glyph. Both are documented in Icons in the Themes guide. - Use the selector form that matches where the icon sits: a descendant selector for a child of the old element (as in
.changeType .ht-icon-menu),~for the sort arrow (.columnSorting.sortAction ~ .ht-icon), and+for the checkbox, radio, and multi-select editor ticks (.htCheckboxRendererInput + .ht-icon). An input can’t hold children, so.htCheckboxRendererInput .ht-iconnever matches. - Scope your own bare
iselectors, such astd iortd.querySelector('i'), and your:first-childor index-based child selectors. Icons are inserted into cells and headers, in some renderers before the existing content, so these can now resolve to a Handsontable icon. Exclude icons with:not(.ht-icon).
Before:
.changeType::before { background-color: blue; }td i { color: red; }After, target the icon element, and exclude icons from your own
irules:.changeType .ht-icon-menu { background-color: blue; }td i:not(.ht-icon) { color: red; }To change only the glyph and keep the built-in color and mask behavior, override the variable:
.ht-theme-main .changeType .ht-icon-menu { --ht-icon-menu: url("/icons/menu.svg"); }Details: Icons are rendered as <i> elements
-
Selector mapping. The table lists every selector the old
iconsMapstylesheet generated. A[dir="rtl"]-prefixed selector used to point at a different, mirrored icon. The single new class mirrors itself when the grid’slayoutDirectionis RTL.Old selector New selector .htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper::after,.htContextMenu table tbody tr td.htSubmenu .htItemWrapper::after,.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper::after.ht-icon-arrow-right.ht-page-size-section__select-wrapper::after.ht-icon-arrow-down.changeType::before.ht-icon-menu.htUISelectCaption::after,.htAutocompleteArrow::after.ht-icon-select-arrow.columnSorting.sortAction.ascending::before.ht-icon-arrow-narrow-up.columnSorting.sortAction.descending::before.ht-icon-arrow-narrow-down.ht-page-navigation-section .ht-page-first::before(and its[dir="rtl"]pair).ht-icon-arrow-left-with-bar.ht-page-navigation-section .ht-page-prev::before(and its[dir="rtl"]pair).ht-icon-arrow-left.ht-page-navigation-section .ht-page-next::before(and its[dir="rtl"]pair).ht-icon-arrow-right.ht-page-navigation-section .ht-page-last::before(and its[dir="rtl"]pair).ht-icon-arrow-right-with-bar.htDropdownMenu table tbody tr td .htItemWrapper span.selected::after,.htContextMenu table tbody tr td .htItemWrapper span.selected::after,.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected::after.ht-icon-check.htCheckboxRendererInput::after.ht-icon-checkboxth.beforeHiddenColumn::after.ht-icon-caret-hidden-leftth.afterHiddenColumn::before.ht-icon-caret-hidden-rightth.beforeHiddenRow::after.ht-icon-caret-hidden-upth.afterHiddenRow::before.ht-icon-caret-hidden-down.collapsibleIndicator::before,.ht_nestingButton::before.ht-icon-collapse-off.collapsibleIndicator.collapsed::before,.ht_nestingButton.ht_nestingExpand::before.ht-icon-collapse-on.htUIRadio > input[type="radio"]::after.ht-icon-radio.ht-multi-select-chip-remove::before.ht-icon-chip-close.ht-notification__close::before.ht-icon-chip-close.ht-multi-select-editor-item-selected input::after.ht-icon-checkbox.ht-multi-select-editor-search-icon(a class on the search icon’s own element, not a pseudo-element; kept on the new element as a legacy class).ht-icon-searchThe sheets bar and the mixed-state menu mark are new in 19.0, so no 18.1 selector exists for them. Their icons use
.ht-icon-plus(add sheet),.ht-icon-menu-list(all sheets),.ht-icon-select-arrow(tab chevron),.ht-icon-arrow-leftand.ht-icon-arrow-right(tab paging),.ht-icon-check(the selected sheet), and.ht-icon-collapse-off(a mixed-state menu item). -
Multi-select editor search icon. In 18.1,
.ht-multi-select-editor-search-iconwas a<div>. It is now an<i class="ht-icon ht-icon-search">that keeps the class as a legacy hook, so a selector that namesdivno longer matches. Override--ht-icon-searchto change the glyph. -
Hand-built markup that reuses
htUIRadioorhtCheckboxRendererInput. These inputs got their glyph from a pseudo-element. Now Handsontable’s own components insert a sibling<i class="ht-icon ht-icon-<name>">. A custom renderer that copies the classes renders the input with no glyph, with no error or warning. Add the icon element immediately after the input. -
checkboxcell structure.span.htCheckboxRendererBox > input.htCheckboxRendererInput + i.ht-icon.ht-icon-checkbox. The wrapper takes the place of the bare input, so the cell has the same number of children as in 18.1, andtd.querySelector('input')andinput + .ht-iconselectors still match. UsequerySelector('input')instead of the first child. If a custom renderer hides the input, hide the wrapper too (or the icon, through.htCheckboxRendererInput + .ht-icon), or the tick stays visible. -
Multi-select editor option list. The gap between a checkbox and its label is now one
--ht-gap-sizeon the label’s inline-start side, in both LTR and RTL. In 18.1, the list set a physical left padding, so an RTL list had no gap. This matters when you compare screenshots. -
Filters condition dropdown caption.
.htUISelectCaptionused to hold its text directly. It now holds a<span class="htUISelectCaptionLabel">with the text, then the caret icon element. Read.htUISelectCaptionLabelto get the label alone. Code that assumes the caption has no child elements, or reads its first text node, must target.htUISelectCaptionLabelinstead.textContentstill returns only the text for a built-in mask glyph. An icon mapped to a ligature font, or a renderer callback that writes text, adds its characters. -
Theme API
iconsstring values. In 18.1, every string was a glyph, wrapped inurl(...). In 19.0, a string can also be a class list for an icon font. Markup,data:,http(s):, andblob:URLs, absolute and./or../paths,url(...), and a file name with an image extension (a query string or fragment included, such asicons/check.svg?v=2) are still glyphs. A relative path with no file extension, such asicons/check, is now a class list and paints nothing. Start it with./or wrap it inurl(...). See How a string value is read. -
iconsMapis deprecated, and 20.0.0 removes it. The pseudo-element selectors it generated no longer exist. Until removal, importing it fromhandsontable/themes/static/variables/helpers/iconsMaplogs a one-time warning and returns theiconStyles()output: the--ht-icon-*variables and the.ht-icon-<name>rules. Switch toiconStyles(icons, scopeSelector)fromhandsontable/themes/static/variables/helpers/iconStyles. It takes a full scope selector (such as.ht-theme-main) instead of a theme class prefix. -
RTL. Mirrored icons (pagination and sheets bar arrows, the submenu arrow) now follow the grid’s own
layoutDirection. Before, the pagination arrows followed anydir="rtl"ancestor through the[dir="rtl"]prefix, so an LTR grid on an RTL page mirrored them (a defect). The RTL submenu arrow used to flip withrotate(180deg), which also flipped it vertically. It now mirrors withscaleX(-1), so it sits about 0.5px higher. The RTL pagination arrows used to swap to the opposite glyph. They now mirror the same glyph withscaleX(-1), which can move them by a fraction of a pixel. No Filters arrow is mirrored. The hidden-column carets still turn withrotate(180deg). -
Header hooks that rewrite
TH.innerHTML. The hidden-column and hidden-row carets are now children of the header cell, and anafterGetColHeaderorafterGetRowHeaderhook runs after the plugin’s, so rewriting the whole cell removes the carets. ThebeforeHiddenColumn/afterHiddenColumn(andbeforeHiddenRow/afterHiddenRow) classes stay on the cell. Write into the header’s.colHeaderlabel to keep the carets. -
-no-iconstheme bundles.checkboxcells used to fall back to a native checkbox. They now render the theme’s styled box with no tick, becauseappearance: nonemoved into the base stylesheet. The Filters “Filter by value” list changes the same way. Load the matching icon file to get the tick back:ht-icons-main.cssfor the main and classic themes,ht-icons-horizon.cssfor horizon.- Pagination and sheets bar buttons now hold an empty
.ht-iconelement, which the base.ht-iconrule inhandsontable.csssizes to--ht-icon-size(16px by default). An icon-less button keeps its size with icons, instead of collapsing to its padding, as the pagination buttons did in 18.1.
-
TypeScript (type-level breaking change). A value in
getThemeConfig().iconsis now typedstring | IconRenderer(a renderer callback is a valid value), so code that passes it where astringis expected stops compiling. Narrow it withtypeof value === 'string'first.IconKeyalso gainedchipClose,search,plus, andmenuList, so an exhaustiveswitchoverIconKeyneeds four more cases.
- A
colToProp()andpropToCol()returnnullfor an unknown columncolToProp()andpropToCol()used to hand your argument straight back when it named no column. They now returnnull, matchingtoVisualColumn()and the other index translators. The old result could not be told apart from a real answer, so code that used it as an index read or wrote the wrong cell, with nothing to signal it.Affects: Apps that call either method and use the result without checking it. You are not affected if you only pass indexes you know are in range.
Do: Check the result before using it. Use
Number.isInteger()forpropToCol(), not a comparison againstcountCols():nullcompares as0, so acolumn < countCols()test lets it through as if it were the first column. Give amodifyDatacallback anullcheck too: its second argument is nownullinstead of the index when a numeric property names no column.// Beforehot.colToProp(999); // 999hot.propToCol(999); // 999// 19.0 and laterhot.colToProp(999); // nullhot.propToCol(999); // nullCheck the result of
propToCol()before you use it:const column = hot.propToCol(prop);if (Number.isInteger(column)) {hot.selectCell(0, column);}Check the result of
colToProp()before you use it:const prop = hot.colToProp(column);if (prop !== null) {hot.setDataAtRowProp(0, prop, 'new value');}Details: colToProp() and propToCol() return null for an unknown column
-
What returns
null. An index past the last column or a negative index (the argument came back before), andpropToCol()for a trimmed column (the physical index came back). A property name your data does not use is still handed back unchanged, because only indexes resolve. The old result was ambiguous: on an array-of-arrays grid,propToCol(3)returning3might mean “column 3” or “no such column”, and where the visual and physical column order had diverged, it named a different column than you asked about. -
TypeScript. Both declarations widened, so under
strictNullChecks,const col: number = hot.propToCol(prop)stops compiling. Narrow it once withif (column !== null).// BeforepropToCol(prop: string | number): number;colToProp(column: number): string | number;// 19.0 and laterpropToCol(prop: string | number): number | null;colToProp(column: number): string | number | null; -
getDataAtProp().getDataAtProp()built a column range from the resolved property. When a numeric property named no column, the range collapsed to column0:hot.getDataAtProp(99)on a grid with three columns and 100 rows returned 100nullentries. It now returns[]. A property name your data does not use is unaffected. -
modifyData. A property name your data does not use still arrives unchanged. Handlenullin the callback. The TypeScript declaration widened, so a callback that annotatescolumnasnumberstops compiling.modifyData(row, column, valueHolder, ioMode) {if (column === null) {return; // no such column}}// BeforemodifyData?: (row: number, column: number, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void;// 19.0 and latermodifyData?: (row: number, column: number | null, valueHolder: { value: CellValue }, ioMode: 'get' | 'set') => void; -
Unchanged.
afterSelectionByPropandafterSelectionEndByPropstill report-1for a selection that starts in the headers (a row selection, a column selection, or select-all): it is a selection sentinel.beforeChangeandafterChangestill report an index that names no column in the changes array.beforeValidate,afterValidate,postAfterValidate, and thepropon the cell properties every cell function receives still report the index for a cell whose column does not exist yet, because auto column growth resolves the meta before it creates the column.setDataAtCell()past the last column still creates the missing columns when your data is an array of arrays with nocolumnssetting.getDataAtCell()and the copyable-data getters read an out-of-range index as before. Undo and redo still replay a change that created a column.
-
A custom editor’s
setValue()receives the cell valueIn 18.1,
beginEditing()turned the cell value into a string before it calledsetValue(). An array such as[[1, 2], [3, 4]]arrived as"1,2,3,4", an object arrived as"[object Object]", and a number arrived as a string of digits. In 19.0,setValue()receives the cell value after the value getter.Affects: Editors whose
setValue()treats its argument as a string: editors that extendBaseEditordirectly, are built witheditorFactory, or extendTextEditorand overridesetValue()without callingsuper.setValue()(which stringifies for you). React editors built withuseHotEditororEditorComponent, and Angular editors that extendHotCellEditorComponent, get the raw value (a number, an object, ornull) even without your ownsetValue().Do: Turn the value into a string yourself when the editor needs one. A factory editor does the same inside the
setValuefunction you pass toeditorFactory. See the cell editor guide.import Handsontable from 'handsontable/base';class MyEditor extends Handsontable.editors.BaseEditor {setValue(value) {// 18.1: this.input.value = value;this.input.value = value == null ? '' : String(value);}getValue() {return this.input.value;}}Details: A custom editor's setValue() receives the cell value
- React.
<input value={value}>warns on an empty cell, becausevalueisnull. Passvalue == null ? '' : String(value)to the input. - The built-in text editors still show a string.
TextEditorand the editors that extend it stringify insidesetValue():autocomplete,dropdown,numeric,date,time,password,handsontable, and the intl date, time, and datetime editors.SelectEditorstill converts its argument to a string. The checkbox editor and the multiselect editor ignore the value passed tosetValue(). - A factory editor that does not define
setValuestores the cell value and returns it fromgetValue(). The rating recipe is one. Confirming that editor without a change writes nothing, as Confirming an editor without typing writes nothing describes for every grid. handsontable/baseleavesHandsontable.helperempty, soHandsontable.helper.stringifythrows there.value == null ? '' : String(value)works in that build and in a script-tag project.
- React.
colWidths,rowHeights, andminRowHeightsaddress columns and rows by physical indexThe array and function forms of
colWidths,rowHeights, andminRowHeightsnow use the physical index. In 18.1, they used the visual index, so a size stayed at its screen position: when the user moved a column, or when a row was collapsed, filtered, trimmed, sorted, or moved, the size went to whichever column or row took that position. In 19.0, a size moves with its column or row.Affects: Apps that set one of these options to an array or a function and also move, sort, filter, trim, collapse, insert, or remove columns or rows. A number or a string value applies one size to everything, so it is not affected. If nothing is moved, sorted, filtered, trimmed, collapsed, inserted, or removed, nothing changes, because the visual and physical indexes match.
Do:
-
List the sizes in the order of the columns or rows in your
data(orcolumns), not the order you expect on the screen. -
Remove code that works around the old behavior, because it now applies the order twice: a hook that rebuilds the array, or code that keeps the array in step with
alter()yourself. To declare the sizes again, pass a new array instead. -
Check function forms. They now receive a physical index, so a function that reads it as a screen position, or looks the column or row up through a visual-index API such as
hot.getColHeader(index)orhot.getDataAtRow(index), sizes another column or row, with no error. UsegetSourceDataAtRow()to read a row by its physical index. -
To keep the 18.1 behavior, where a size belongs to a screen position, translate the physical index to the visual one in the function:
const widthsByPosition = [100, 120, 60];// the physical index of the column at each visual position, for example a saved column orderconst initialOrder = [0, 1, 2];let hot;hot = new Handsontable(container, {manualColumnMove: initialOrder,colWidths(physicalColumnIndex) {// while the constructor runs, `hot` isn't assigned yet and the columns are in their initial orderconst visualColumnIndex = hot ?hot.toVisualColumn(physicalColumnIndex) : initialOrder.indexOf(physicalColumnIndex);return widthsByPosition[visualColumnIndex];},});
For rows, see the details.
Details: colWidths, rowHeights, and minRowHeights address columns and rows by physical index
-
Rows, keep the 18.1 behavior:
const heightsByPosition = [100, 50, 50, 70];// the physical index of the row at each visual position, for example a saved row orderconst initialOrder = [0, 1, 2, 3];let hot;hot = new Handsontable(container, {manualRowMove: initialOrder,rowHeights(physicalRowIndex) {// while the constructor runs, `hot` isn't assigned yet and the rows are in their initial orderconst visualRowIndex = hot ?hot.toVisualRow(physicalRowIndex) : initialOrder.indexOf(physicalRowIndex);return heightsByPosition[visualRowIndex];},}); -
Workarounds to remove. Hooks that rebuild the array:
afterColumnMoveforcolWidths;afterColumnSort,afterFilter,afterRowMove, orafterRowCollapsefor the row options. Code that splices the array after an insert, such ascolWidths.splice(1, 0, 80)orrowHeights.splice(1, 0, 40), then passes the same array toupdateSettings(). -
Columns, example. With
data: [['Ted', 'Right', 31]],colHeaders: ['First name', 'Last name', 'Age'],manualColumnMove: true, andcolWidths: [100, 120, 60], the user movesAgeto the first position. In 18.1,Ageis 100px wide, because the first position keeps the first width. In 19.0, it is 60px wide, because the width belongs to theAgecolumn. -
Rows, example. With
nestedRows: true, the data[{ name: 'Engineering', __children: [{ name: 'Ana García' }, { name: 'Li Wei' }] }, { name: 'Marketing' }], androwHeights: [100, 50, 50, 70], the user collapsesEngineering. In 18.1,Marketingis 50px tall, because the second position keeps the second height. In 19.0, it is 70px tall, because the height belongs to theMarketingrow. -
Function form. Handsontable calls it with the physical index, for example
colWidths(physicalColumnIndex) { return physicalColumnIndex * 10; }orrowHeights(physicalRowIndex) { return physicalRowIndex * 10; }. -
Physical indexes. The physical index of a column doesn’t change when the user moves or hides columns. The physical index of a row doesn’t change when rows are moved with
ManualRowMove, sorted, filtered, trimmed, or collapsed. A row thatNestedRowsmoves by dragging or detaching takes a new physical index: an array entry follows the row, but a function is called with the new index. -
The array is never changed. Handsontable never changes the array you pass.
getSettings()returns thecolWidthsarray you passed, andupdateSettings()applies a newcolWidthsarray to the columns as they are. Handsontable tracks which entry belongs to which column or row, so an entry you change in your own array applies to the column or row it belongs to. -
Insert and remove. When you insert or remove columns or rows with
alter()(or with theNestedRowsplugin, for rows), each size stays with its column or row. A column or row inserted between others takes the default size. One added after the last takes the next entry of the array. A column inserted after a column the user moved to the end takes the default too. In 18.1, an inserted column or row took the size listed for its position and every size after it moved one over. Undo and redo put the sizes back, the size of a removed column or row included. -
Undo history. Switching one of these options to or from an array, or passing a new array, clears the undo history, the way enabling a plugin does, because the earlier steps hold the columns or rows of the previous array.
-
loadData()andupdateData().loadData()with data the grid hasn’t shown, a copy of the current data included, declares the array again, so it applies from the first column or row.loadData()with the array the grid already shows, andupdateData()(which a newdatapassed toupdateSettings()also uses), keep each size on its column or row. A column they add after the last one takes the nextcolWidthsentry.- A data array the grid showed earlier, with as many columns or rows, gets back the alignment it had when the grid left it, so the sizes stay on columns or rows you inserted or removed there. The sheets bar relies on this when it shows a sheet again. Only the last array you replaced while the same data was shown is kept.
- If you change the columns or rows of such an array while the grid shows other data, pass a new
colWidths,rowHeights, orminRowHeightsarray before you load it, so the sizes apply from the first column or row. To declare the sizes again after loading data with more rows, pass a new array toupdateSettings().
-
Hooks and methods keep visual indexes. The
modifyColWidthhook,getColWidth(), themodifyRowHeighthook, andgetRowHeight()still take visual indexes. -
Columns: related features. The widths now follow the columns when you enable
manualColumnMove, callmoveColumn(), load a saved column order, or move a column withfreezeColumn()orunfreezeColumn(). TheexportFileplugin andautoColumnSizereadcolWidthsthe same way. To fix the width of a single column regardless of order, you can also setwidthin thecolumnsoption. -
Rows: related features. The heights now follow the rows when you collapse rows with
NestedRows, filter withFilters, trim withTrimRows, sort withColumnSortingorMultiColumnSorting, move rows withManualRowMove, or load a saved row order. -
User resizing is unaffected.
ManualColumnResizeandManualRowResizealready store sizes by physical index. -
Wrappers. In the React, Angular, and Vue wrappers, get the instance from the component instead of a variable:
hotRef.current?.hotInstancein React, thehotInstanceproperty of theHotTableComponentin Angular, andhotTable.value?.hotInstancein Vue. The callback gets nothis.
-
Plugins apply their settings before the first render
In 18.1, several plugins applied the settings the grid was built with after its first render, then rendered the grid again. In 19.0, they apply them before the
inithook and before the first render. The first render already shows the result, and the grid renders once (twice whencustomBordersdeclares borders). The hooks this work fires run earlier too, so they run before the grid is drawn:getCell()returnsnullinside them, and the merges’ and summaries’afterChangecalls come before theafterChangecall of the initial data load.Affects: Apps with a listener on one of these hooks (
afterColumnSortfor aninitialConfigsort,afterMergeCells,afterChangefor the merges and the summaries,afterEmptyDataStateShow, andbeforeDataProviderFetch) that reads the rendered grid when the grid is built (for example withgetCell()), that relies on these hooks running afterinitor on the order of theafterChangecalls, that callsenablePlugin()on a drawn grid without expecting the plugin’s settings to apply, or that reads the summaries in anafterUpdateSettingslistener of the same call that writes them.Do: Read the rendered grid in
afterInit, which runs after the first render, and skip the work in the hook whengetCell()returnsnull. Read new summaries afterupdateSettings()returns, or in anafterRenderhook.Before:
const hot = new Handsontable(container, {columnSorting: { initialConfig: { column: 0, sortOrder: 'asc' } },afterColumnSort() {markFirstRow(this.getCell(0, 0));},});After:
const hot = new Handsontable(container, {columnSorting: { initialConfig: { column: 0, sortOrder: 'asc' } },afterColumnSort() {const cell = this.getCell(0, 0);if (cell) {markFirstRow(cell);}},afterInit() {markFirstRow(this.getCell(0, 0));},});Details: Plugins apply their settings before the first render
- Hooks that run earlier:
afterColumnSort, for theinitialConfigsort ofcolumnSortingormultiColumnSorting.afterMergeCellsand the merges’afterChangecall, formergeCells.- The summaries’
afterChangecall, forcolumnSummary. afterEmptyDataStateShow, foremptyDataState.beforeDataProviderFetchand the firstfetchRowscall, fordataProvider.
enablePlugin()of one of these plugins, called on a grid that is already drawn, now applies the plugin’s settings. FordataProvider, it fetches the data from the server.- An
updateSettings()call that changescolumnSummarywrites the summaries after itsafterUpdateSettingslisteners. A listener there reads the previous summaries and, when the call also passescolumns, a summary cell that is not read-only yet. The grid draws the new summaries.
- Hooks that run earlier:
A change that waits for its validator stays on its record
A change to a cell with a
validatoris written into the data only after the validator answers, and validators always answer after the call that made the change returns (seeloadData()drops a change that waits for its validator). In 18.1, the change was written at the visual row it was made at. A sort, a row move, a filter, a trim, or a row insert or removal in that window put the value into another record, while the cell’svalidflag stayed on the record you edited. In 19.0, the change is written into the record it was made on, and it stays on its column too.Affects: Apps with validators that also sort, move, filter, trim, collapse, or insert or remove rows or columns while an edit waits, callbacks that read the row of
afterChangeorbeforeChangeRenderas the row the user edited, and callbacks that use the row or column of a change as a number. That row or column can now benull. In TypeScript, typed grid settings andEvents-typed listeners with aCellChange[]ornumberannotation on these hooks no longer compile. AnaddHook()listener with the old annotations still compiles, so the compiler does not flag it, and it can still getrow === nullat run time.Do:
- Check the row of a change before you use it as a number. When it is
null, pass the change togetPhysicalRowOfChange()inside the hook. It returns the physical row the change was written to. Read the record withgetSourceDataAtRow(), which takes a physical row, or its ID withgetRowIdAtPhysicalRow(). Call the method while the hook runs: afterafterChange, it no longer follows the record. - In TypeScript, type the parameter with
AppliedCellChange. Do this foraddHook()listeners too, because the compiler does not ask for it there. - If you call
updateData()with copies of the rows in a new order while an edit waits, set arowId, so the edit follows its record.
Before:
import type { CellChange, ChangeSource } from 'handsontable';hot.addHook('afterChange', (changes: CellChange[] | null, source: ChangeSource) => {changes?.forEach(([row]) => {saveRow(hot.getSourceDataAtRow(hot.toPhysicalRow(row)));});});After:
import type { AppliedCellChange, ChangeSource } from 'handsontable';hot.addHook('afterChange', (changes: AppliedCellChange[] | null, source: ChangeSource) => {changes?.forEach((change) => {const physicalRow = hot.getPhysicalRowOfChange(change);if (physicalRow !== null) {saveRow(hot.getSourceDataAtRow(physicalRow));}});});Details: A change that waits for its validator stays on its record
-
Reported rows.
afterChangeandbeforeChangeRenderreport the visual row the record has when the value lands, not the row it was made at. A change without a validator, or one that nothing moved while it waited, reports the same row as before. -
Record out of the visual space. When a filter,
trimRows, or a collapse inNestedRowstook the record out of the visual space meanwhile, the value is still written and the row in those two hooks isnull. The same write callsmodifyDatawith anullrow. -
Removed record. The change is dropped: it isn’t written, and
afterChangedoesn’t report it. -
Validator rows. In the validator,
this.visualRowandthis.rowname the row the record has when the validator answers, and so does the row ofafterValidate.this.visualRowand theafterValidaterow arenullwhen a filter ortrimRowstook the record out of the visual space, or the record was removed. -
Validator corrections. A validator that corrects the value with
this.instance.setDataAtCell(this.visualRow, this.visualCol, value, 'myValidator')writes the correction into the edited record, also whenthis.visualRowisnull. Handsontable drops the correction when:- a column removal took the edited column (
this.visualColisnull, and the change itself is dropped); - the correction is written after the validator called back, because the entered value has already landed;
- it is written from outside the validator call, for example from a timer, and another record out of the visual space has already answered for the same column.
When Handsontable can’t tell which record the correction is for (two records out of the visual space wait for the same column, and the validator corrects after it returns), it drops the correction and writes the entered value.
- a column removal took the edited column (
-
updateData()with row copies. Without arowId, the change goes to the row at the record’s position: the copies are new objects, and the cell meta stays with the physical row. -
allowInvalid: false. WithallowInvalid: false, a value the validator rejects reopens the editor on the row the record has now, with the typed text. When a sort or a move took the record to anotherPaginationpage, that page is shown first. When you changed the page yourself while the validator ran, the page stays and the editor closes without saving. The editor also closes without saving when the record is gone, filtered out, or hidden withhiddenRows. -
Columns. An array data source without a
columnsoption addresses a column by its physical index. A column inserted or removed before the edited one no longer sends the saved value to a neighbor column. A column move, insert, or removal no longer sends the correction made throughthis.visualCol, or the reopened editor, to a neighbor column. A column move never changed where the saved value landed, because it doesn’t change physical indexes. ThepropthatafterChangereports is the column’s physical index when the value lands. Object data andcolumns[].dataalready name the column by a property, so they are unchanged. A numericpropunder acolumnsoption isn’t followed, and keeps the earlier behavior. -
Validator columns. In the validator,
this.col,this.visualCol, andthis.propname the column the edit holds when the validator answers. When the column was removed meanwhile, the change is dropped, all three arenull, Handsontable drops a validator correction written through them, and the editor closes without saving. WhenhiddenColumnshid the column, the value is still written and the editor closes without saving. -
TypeScript types. The
changesofafterChangeandbeforeChangeRenderareAppliedCellChange[], whose row isnumber | null, and therowofmodifyDataandafterValidateisnumber | null.CellChangeis unchanged, sobeforeChangeand theafterSetDataAtCellhooks keep it. A listener you pass toaddHook()with the old annotations still compiles, becauseaddHook()accepts any annotated callback, but itsrowcan still benullat runtime. Settings and listeners typed through theEventstype with the old annotations no longer compile. -
Who must check for
null. You, if any of these holds:- Your callback reads the row of
afterChangeorbeforeChangeRenderas the row the user edited (for example to compare it with the selection). For a change that waited for a validator, it is now the record’s row when the value lands. - Your
afterChange,beforeChangeRender, ormodifyDatacallback uses the row as a number, and you use filters,trimRows, orNestedRows. - Your validator uses
this.visualRowas a number other than to pass it tosetDataAtCell(), or yourafterValidatecallback uses the row as a number, and you use filters ortrimRows. - Your validator uses
this.col,this.visualCol, orthis.propas a number, you use an array data source withoutcolumns, and columns can be removed while an edit waits.
- Your callback reads the row of
- Check the row of a change before you use it as a number. When it is
loadData()drops a change that waits for its validatorA change to a cell with a
validatoris written into the data only after the validator answers. Validators always answer after the call that made the change returns, also synchronous ones and the built-in validators ofnumeric,date, andmaxLengthcells. In 18.1, whenloadData()replaced the data in that window, the change was written into the new data at the same row and column, usually a different record. Now Handsontable drops it.Affects: Apps with validators that call
loadData()right aftersetDataAtCell(), in the same function or while the user confirms an edit (for example to reset the grid’s states over the array it already holds), and apps that mark data as unsaved inbeforeChangeand saved inafterChange, becauseafterChangenever comes for a dropped change.Do: Call
loadData()after the validator answered, for example fromafterChange, or useupdateData(), which keeps the change and the grid’s states.Before, the change reached the loaded data:
hot.setDataAtCell(0, 0, 42);hot.loadData(rows);After, write the value into the array you load:
rows[0][0] = 42;hot.loadData(rows);Or keep the states and the change:
hot.setDataAtCell(0, 0, 42);hot.updateData(rows);Details: loadData() drops a change that waits for its validator
- The change isn’t written into the new data, also when the new data holds the same records.
beforeChangeandafterSetDataAtCellstill fire for it, andafterChangedoesn’t.- A correction that the validator writes for the change is dropped too.
- An open editor that waits for the validator closes without saving.
updateData()drops nothing.- The
DataProviderplugin is the exception for its own refetch after a save. It writes such an edit again into the record that has the same row ID, so the edit is validated and saved as usual.
XLSX export no longer needs ExcelJS
Handsontable 19.0 ships its own XLSX engine, so the
ExportFileplugin writes XLSX with no engine configured. In 18.1, you passed ExcelJS asexportFile: { engines: { xlsx: ExcelJS } }, and without it the plugin refused the format. This is not a breaking change: every configuration that exported XLSX in 18.1 still does, andengines: { xlsx: ExcelJS }keeps ExcelJS. Three behaviors changed, and several bug fixes change the exported file.Affects: Apps that set the
exportFileoption (the context menu change reaches grids that never export XLSX), callsupportsExportFormat('xlsx'), or export to XLSX, with or without that option.Do: Check these three changes.
-
supportsExportFormat('xlsx')returnstruewhenengines.xlsxis absent,null, or a supported engine module. It returnsfalsefor any format other than'csv'and'xlsx', and whenengines.xlsxis not a supported engine module, such as{},'exceljs', ortrue. To ask “is ExcelJS configured”, read the setting:const usesExcelJs = Boolean(hot.getSettings().exportFile?.engines?.xlsx); -
The “To Excel” item (
export_file:xlsx, a sub-item of the export context menu item) now shows next to “To CSV” wheneverexportFileis set, with no engine configured (18.1 showed “To CSV” alone). It is hidden only whenengines.xlsxis not a supported engine module (18.1 showed it then). To keep it out of the menu, remove it in thebeforeContextMenuSetItemshook. The Export item and “To CSV” stay:beforeContextMenuSetItems(menuItems) {const exportItem = menuItems.find(({ key }) => key === 'export_file');if (exportItem) {exportItem.submenu.items = exportItem.submenu.items.filter(({ key }) => key !== 'export_file:xlsx');}}, -
downloadFileAsync('xlsx')and its siblings no longer reject when no engine is configured. They write the file through the built-in engine. A value that is not a supported engine module still rejects, now withInvalid xlsx engine module.instead ofMissing or invalid ExcelJS engine. To detect a failed export, match on the current message or readerror.cause. Don’t read the rejection as “no engine configured”.
Details: XLSX export no longer needs ExcelJS
- For an unsupported
engines.xlsxvalue, 18.1 answeredtruefromsupportsExportFormat('xlsx'), because it only checked that the value was truthy, although every XLSX export then rejected. - The built-in engine needs the Compression Streams API, which every browser Handsontable supports provides. See XLSX engines: Compare the engines for what each engine writes.
- The bug fixes in the table in Changes to the exported file are not breaking changes. Check them if another tool reads the file or if you compare files byte by byte. They apply to both engines unless a row names one.
Changes to the exported file
In the exported file To get the 18.1 output, or if you depend on it An empty checkboxcell (null,undefined, or'') exports empty, notFALSE. A value matchingcheckedTemplateexportsTRUE, one matchinguncheckedTemplateexportsFALSE. Matching ignores letter case, as in the grid: withuncheckedTemplate: '', an empty value is unchecked and exportsFALSE.If a consumer expects TRUEorFALSEin every checkbox cell, fill empty cells with youruncheckedTemplatevalue (falseby default) before you export. If your data stores an unchecked box as'', setuncheckedTemplate: ''on the column.The frozen pane counts only the frozen rows and columns the file contains. 18.1 used fixedRowsTopandfixedColumnsStartas they were, so a skipped hidden row or column inside the frozen band, or arangethat started inside it, froze more in the file than in the grid.Export hidden rows and columns with exportHiddenRows: trueandexportHiddenColumns: true, and startrangeat the first row and column.A numericcell holdingNaN,Infinity, or-Infinityexports as a text cell with the text the grid shows, also for aColumnSummarycached result (such as asumoverInfinity). 18.1 wrote a number cell such as<v>NaN</v>, which Excel repaired with a dialog.If a consumer expects a number in every numericcell, replace non-finite values in your data, for example withnull.A numericcell holding''or a whitespace-only string exports empty, likenull. 18.1 exported0(the editor stores''on clear), soAVERAGEandCOUNTcounted it.If a consumer expects 0, write0into those cells.exportFormulas: true: functions added after Excel 2007 carry Excel’s stored prefix.=IFS(…),=STDEV.S(…),=CONCAT(…),=TEXTJOIN(…), and=XLOOKUP(…)go out as<f>_xlfn.IFS(…)</f>. In 18.1, Excel showed#NAME?until you re-entered the cell.NETWORKDAYS.INTL,WORKDAY.INTL,ISO.CEILING, andECMA.CEILINGkeep no prefix, as in 18.1.LETandLAMBDAparameter names get_xlpm., such as<f>_xlfn.LET(_xlpm.x,1,_xlpm.x+1)</f>.Nothing, unless a tool reads the raw <f>text. It sees the prefix now.exportFormulas: true: each cell gets the formula of the row it shows. 18.1 wrote another row’s formula next to this row’s cached value when rows were sorted, moved, trimmed, or filtered, so Excel and LibreOffice showed wrong numbers with no warning. With the Formulas plugin on and rows trimmed or filtered out, references below them point at the rows they name in the file, as for hidden rows left out.Nothing. exportFormulas: true,exportHiddenColumns: false, and columns moved withmanualColumnMove: a formula’s references point at the columns they name in the file. 18.1 left out the wrong column when it moved references past the hidden ones, so the formula was one column off.Nothing. exportFormulas: true: a formula whose result is an error (#DIV/0!,#N/A,#NAME?,#NUM!,#REF!,#VALUE!) is an Excel error cell. 18.1 wrote text, which readers that don’t recalculate (Apache POI, openpyxl, SheetJS) read as a string. The error uses Excel’s English code even when a HyperFormulalanguagetranslates the grid: withplPLthe grid shows#DZIEL/0!and the file stores#DIV/0!(18.1 stored the translated text). A formula returning the text"#N/A"stays text. A HyperFormula error Excel has no code for (#CYCLE!,#ERROR!,#LIC!,#SPILL!) is still the text the grid shows. With the Formulas plugin on, a cell whose value is an error (a typed#N/A, or a formula exported as its value) is an error cell too, with or withoutexportFormulas(18.1 stored both as text). Without the plugin, an error is text, as in 18.1.Nothing, unless a tool reads cached results or values as text. It now gets an error value. Formulas plugin on: a number or TRUE/FALSEthe plugin computed is a number or boolean, even in atextcolumn and withoutexportFormulas. This covers cells an array formula spills (below=SEQUENCE(3)) and a formula exported as its value. 18.1 wrote text there, which Apple Numbers left out ofSUM(). A value you typed into atextcolumn stays text.Nothing, unless a tool expects text in those cells. exportFormulas: true: a formula whose result spills (=SEQUENCE(3)) and a formula that is oneARRAYFORMULAcall (=ARRAYFORMULA(A1:A2*2)) are array formulas over the result cells. The built-in engine writes a spilling formula as a dynamic array that Excel spills and resizes. ExcelJS writes both as legacy arrays: Excel shows braces and the range stays fixed. 18.1 wrote plain formulas, which Excel opened with an@(=@SEQUENCE(3)) and showed as one value.Nothing with the built-in engine. With ExcelJS, re-enter the formula in Excel to make it a dynamic array, or export with the built-in engine. exportFormulas: trueand HyperFormula’suseArrayArithmeticon (the Formulas plugin default): a formula that applies an operator to a range (=SUM(A1:A2*B1:B2)) or is one call to a function that can return an array (=SEQUENCE(1)) is a one-cell array: dynamic in the built-in engine, legacy in ExcelJS. 18.1 wrote plain formulas, which Excel opened with an@, so=SUM(@A1:A2*@B1:B2)computed one row instead of the range. Excel computes the same value from both.Nothing. exportFormulas: trueand a HyperFormuladecimalSeparatorof,: a number’s decimal separator in a formula is written as.. A formula typed as=SUM(A1;1,5)goes out asSUM(A1,1.5). 18.1 changed only the argument separator, so the file heldSUM(A1,1,5), read as three arguments (7instead of2.5when A1 holds 1).Nothing. exportFormulas: true: the Formulas plugin’s named expressions are written as defined names. A name the engine can’t write is left out, and a formula over it is written as its value. With ExcelJS that is every name that is not one workbook-scoped range, such as a constant:=TaxRate*100overTaxRate = 0.07goes out as the value7. 18.1 wrote no name, so Excel and LibreOffice showed#NAME?.Nothing, unless the formula must stay live. Export with the built-in engine, which writes constants, sheet-scoped names, and names over several ranges. Values past Excel’s limits are written at Excel’s maximum: 260 units for a column wider than Excel stores, 409.5 points for a taller row, and 32,767 characters for a longer text (cut). 18.1 ExcelJS wrote them as they were, and Excel repaired or truncated them on open. Each clamp is listed in the console warning about dropped features ( columnWidth:clamped,rowHeight:clamped,cellText:truncated), which the ExcelJS engine now logs too.Nothing. To keep a long text whole, split it across cells before you export. Characters Excel forbids in a sheet name (such as :and/) and control characters (such as a tab) are removed, on both engines. 18.1 rejected a forbidden character with ExcelJS’s own error. A sheet that becomes a duplicate is numbered, as before:sheets: [{ instance: a, name: 'Q1\tSales' }, { instance: b, name: 'Q1Sales' }]writesQ1SalesandQ1Sales1(18.1 wroteQ1<tab>Salesas it was, and the second sheet kept its name).Pass sheet names without control characters if a consumer looks a sheet up by name. Cells a merge covers are written with formatting, so a merged block’s border and fill reach every edge. A covered cell with no formatting takes the master cell’s. One with its own formatting keeps its number format, lock, and own border sides, and takes the master’s fill and border sides on top. 18.1 ExcelJS replaced the covered cell’s style with the master’s, so LibreOffice drew a boxed merge without its right edge. The ExcelJS engine also no longer writes a single-cell merge as a <mergeCell>, and gives a merge’s first cell, when it holds no value and no formatting, a style index of its own (ansattribute and one morecellXfsentry), so Apple Numbers and Quick Look place later cells in the right columns.Nothing, unless a tool compares the raw XML. A numericcolumn whosenumericFormatshows a currency symbol longer than one character (USD,CHF,zł) gets the symbol in quotes:"USD"#,##0.00or#,##0.00"zł"(18.1:#,##0.00USD, which Excel for the web repaired and other applications dropped). A one-character symbol other than$(€,£) is quoted too (#,##0.00"€"), because Apple Numbers and Quick Look misread it bare. A lone$is unchanged. A symbol several currencies share (kr,¥,¥) becomes an Excel locale token for the home locale, such as#,##0.00[$kr-41D](Swedish krona) or[$¥-411]#,##0.00(yen). A file 18.1 wrote for a Norwegian krone column imports as the Swedish krona. A non-US dollar that shows as$(Australian, Canadian, New Zealand, Mexican peso) gets its home-locale token, such as[$$-C09]#,##0.00for the Australian dollar (18.1: a bare$, imported as the US dollar). A symbol that would import as another currency or none (₪for the Israeli new shekel,Rfor the South African rand) becomes the quoted ISO 4217 code, such as#,##0.00"ILS".minimumIntegerDigitsis written as that many zeros, such as00000(18.1 dropped it and lost the zeros).Nothing, unless a tool reads the raw number format. It sees the quotes. A datecell before 1900, which an Excel date serial can’t hold, or a date that doesn’t exist (2023-02-29,2024-04-31), is a text cell with the value the cell holds. 18.1 wrote a wrong date serial, so the file showed another date.Nothing, unless a consumer expects a date serial in every datecell. Correct the values in your data before you export.The helper sheet _HotValidation, which holds the lists ofdropdownandautocompletecolumns, is hidden instead of very hidden (18.1: very hidden, and Apple Numbers dropped every dropdown pointing at it). Excel lists the sheet under Unhide.Nothing. Don’t delete _HotValidationin the file, or the dropdowns lose their lists.A grid that renders right to left because its page does (the default layoutDirection: 'inherit'on a page withdir="rtl") exports a right-to-left sheet. 18.1 did so only forlayoutDirection: 'rtl'.Nothing. A conditionalFormattingrule that is not a rule object, anexpressionrule with noformulae, or acolorScale,dataBar, oriconSetrule with nocfvothresholds (or acolorScalewith nocolor) is skipped on both engines and listed in the console warning about dropped features, and the rest of the file is written. 18.1 ExcelJS rejected the export with aTypeError.Nothing. To keep the rule, fix its shape. The built-in engine stores a carriage return ( \r) in a text cell as_x000D_, the escape Excel writes, so the character survives. 18.1 ExcelJS wrote the raw character, which an XML parser turns into a line feed (\n), so\r\ncame back as\n. Excel and Handsontable’s import, on either engine, read_x000D_back as a carriage return. openpyxl, and pandas with its defaultopenpyxlengine, show the literal_x000D_.For a Python tool, use pandas.read_excel(..., engine='calamine'), or replace the escape after reading with.str.replace('_x000D_', '\r'). To keep the 18.1 output, replace\r\nand\rwith\nin your data before you export, or keep ExcelJS as the engine.-
updateSettings()keeps the rows of a server-backed gridIn 19.0,
updateSettings()no longer empties a grid that uses thedataProvideroption, and no longer reloads it on every render. In 18.1, a payload withdataemptied a server-backed grid and nothing fetched the rows again. Passing the samedataProviderobject again also emptied the grid and fetched anew, so a React app did that on every render.Affects: Apps that set
dataProviderand clear the grid withupdateSettings({ data: [] }), change a member of thedataProviderobject and pass the same object toupdateSettings()to load again (or to retry a failed fetch), or callupdateSettings()withpagination,columnSorting,filters, orcolumnsand expect no request.Do: To load the rows again, call
fetchData():hot.getPlugin('dataProvider').fetchData(). To leave server-backed loading, setdataProvidertonull.// 18.1: the grid is empty until something else fetches// 19.0: the rows stayhot.updateSettings({ data: [] });dataProvider.fetchRows = fetchFromNewEndpoint;// 18.1: the rows are fetched again with `fetchFromNewEndpoint`// 19.0: nothing is fetched; the next request uses `fetchFromNewEndpoint`hot.updateSettings({ dataProvider });Details: updateSettings() keeps the rows of a server-backed grid
datais ignored with the console warning Handsontable already printed, and the grid keeps its rows.- The same
dataProviderobject passed again keeps the rows and sends no request, even when you changed a member inside it or the last fetch failed. - Passing another
dataProviderobject still reloads the rows, and so does a call that also passespagination,columnSorting,filters, orcolumns. - A call that passes
pagination,columnSorting,filters, orcolumnswithoutdataProvidernow fetches the rows again too. In 18.1 it sent no request, so the pager, sort, or filters it reset no longer matched the rows on screen. - A new
columnsvalue clears the sort, as it does on a grid withoutdataProvider.
A string
dataProvider.rowIdreads a property with a dot in its nameIn 19.0, a string
rowIdin thedataProvideroption reads the property named exactly as the string, dots included, so the row id matches the value the cell shows. In 18.1 it always split on dots and read a nested property:'meta.id'readrow.meta.id, even when the row had its own'meta.id'key (which a column withdata: 'meta.id'shows). See Row identity.Affects: Apps whose rows have a key with a dot in its name that matches
dataProvider.rowId, next to a nested object at the same path. Apps with a functionrowIdthat reads a nested object while the rows keep that value under a dotted key break at run time: the function now gets the raw source row, where the nested object does not exist. The throw counts as a missing id, Handsontable reverts the edit and reports it throughafterRowsMutationError, and removing the row raises the missing row id error. Apps with amodifySourceDatahook that changes the valuerowIdreads, and TypeScript code that readsrowIdback as a string, are affected too (see the details).Do: To keep reading the nested value, pass a function. Guard the nested object, so a row without it, such as a new row, has no id instead of throwing. A function that reads a dotted key reads it by name.
Before (18.1), a string key read the nested value even when the row also had the dotted key:
// row: { 'meta.id': 'SKU-4821', meta: { id: 'legacy-17' } }dataProvider: {rowId: 'meta.id', // 18.1: 'legacy-17'; 19.0: 'SKU-4821'// ...},After (19.0), keep reading the nested value:
dataProvider: {rowId: (row) => row.meta?.id ?? null,// ...},Or read the dotted key by name:
dataProvider: {rowId: (row) => row['meta.id'] ?? null,// ...},Details: A string dataProvider.rowId reads a property with a dot in its name
-
Dotted key.
{ 'meta.id': 'SKU-4821' }has the id'SKU-4821'. A row without such a property still reads the nested one, whateverdataDotNotationis set to. -
Function
rowIdthat reads a nested object, when the rows keep that value under a dotted key. In 18.1, the function received a copy in whichdataDotNotationhad turned the dotted key into a nested object. It now receives the source row itself, where the nested object doesn’t exist, and amodifySourceDatahook no longer changes the id. A function that throws there is read as a missing id: an edit is reverted and reported throughafterRowsMutationError, and removing the row raises the missing row id error. -
modifySourceDatahook that changes the valuedataProvider.rowIdreads. Handsontable now reads the id from the source row, not from a copy, so the id is the stored value. -
TypeScript. Code that reads
dataProvider.rowIdback as a string, for exampleconst key: string = hot.getSettings().dataProvider.rowId, no longer compiles: the type inDataProviderConfigwasstringand is now a string or a function, which the plugin already accepted. Narrow it first. Code that setsrowIdis not affected.const rowId = hot.getSettings().dataProvider?.rowId;if (typeof rowId === 'string') {// Use the string key.} -
The new
rowIdoption reads ids the same way.
-
A plain value written into a key/value
sourcecell resolves to the matching objectIn
autocompleteanddropdowncolumns whosesourceis an array of{ key, value }objects, every way of writing a label into a cell now stores the matching source object, as the cell editor always did. Before, writing'BMW'for{ key: '1', value: 'BMW' }stored'BMW'in an empty cell, or{ key: 'BMW', value: 'BMW' }in a cell that held an object.Affects: Apps with a
strictcolumn (such asdropdown), apps that readgetSourceData()after a paste or write on a non-strictautocompletecolumn, and apps that repair these cells themselves.Do: Nothing in most cases. Drop any workaround that turns a stored string back into a source object or rebuilds the
keyfrom the label. If you read these cells withgetSourceData()and branched on whether the value was a string, that branch is now dead for values that match an option: readvaluefor those. A value that matches no option is still stored as written.Details: A plain value written into a key/value source cell resolves to the matching object
- Resolving paths: pasting text (from another application too, and as plain text with
Ctrl/Cmd + Shift + V),
setDataAtCell(),populateFromArray(), and autofill. - A value that matches no source object is stored as written, so a
strictcolumn still marks it invalid. A valid label pasted into astrictcolumn used to be marked invalid, and is now accepted. - Not affected: the
handsontablecell type, asourceof plain strings, and asourcefunction. Loading data (data,loadData(),updateData()) resolves nothing, so plain labels stay until a write. - Clearing a cell now stores the empty value. Before, it stored
{ key: null, value: null }, sogetSourceData()returned an object andemptyValuenever applied. - Undo and redo restore exactly what the cell held. Before, undoing to a plain label stored
{ key: <label>, value: <label> }when the cell held an object, so astrictcolumn marked it invalid.
- Resolving paths: pasting text (from another application too, and as plain text with
Ctrl/Cmd + Shift + V),
A
dropdowncolumn withstrict: falsevalidates strictlyA
dropdowncolumn that setsstricttofalsenow marks a value outside itssourcelist as invalid on every path, as the dropdown cell type always documented. Before, a cell validated strictly only after its editor had been opened, and only until the nextupdateSettings()withcolumns,cells, orcell. A value that arrived by paste, API, or autofill in any other cell passed.Affects: Apps with a
dropdowncolumn withstrict: falsethat receives values outside itssourceby paste, autofill, or an API call, or that count invalid cells aftervalidateCells().Do: Pick one:
- To accept values outside the list, use an
autocompletecolumn withstrict: false. Its editor filters the list as you type, while a dropdown column setsfiltertofalseand always shows the whole list. - To keep the dropdown and still store values outside the list, leave
allowInvalidat its default oftrue. The value is stored and the cell is marked invalid.
Details: A dropdown column with strict: false validates strictly
- Paths that used to skip strict validation: pasting text,
setDataAtCell(),populateFromArray(), autofill, andvalidateCells(). - Cause: opening a cell’s editor made that cell strict, and an
updateSettings()call withcolumns,cells, orcellmade it lenient again (the React wrapper does that on every render of a grid withHotColumnchildren). - With
allowInvalid: false, the write is now rejected, as it already was for a typed value.
- To accept values outside the list, use an
datecells reach the formula engine the same way on every data pathThe
Formulasplugin always protected adatecell’s value from the engine’s own parsing when you typed into the cell, but not when the value arrived throughloadData(),updateData(),updateSettings(), orsetSourceDataAtCell(). In 19.0, all of those paths match the initial data load, which can change what your formulas return.Affects: Apps that use
Formulasand either:- have a
datecolumn holding non-ISO 8601 values that a formula reads, or - have a
cells()function, or abeforeGetCellMetaorafterGetCellMetalistener, with side effects. Nodatecolumn is needed: acells()function or abeforeGetCellMetalistener alone makes the plugin read the meta of every text cell.
If you declare a cell’s
typeonly through acells()function, you need no change beyond the fix.Do:
-
Check formulas that read non-ISO values in a
datecolumn as numbers (see the table in the details). Better, keep non-date values out ofdatecolumns: plain numbers belong in anumericcolumn. Otherwise, convert them where you read them.// Before: counts the cell as a number'=SUM(A1:A10)'// After: converts text to numbers'=SUMPRODUCT(VALUE(A1:A10))' -
Make
cells()and the meta hooks free of side effects, so they are safe to call during a data load. A listener that callssetDataAtCell()orupdateSettings()now has a path back into the grid it did not have before.Before,
cells()writes to the grid:cells(row, column) {this.setDataAtCell(row, column, computeSomething(row));return { type: 'date' };},After,
cells()computes the value without writing:cells(row, column) {return {type: 'date',valueGetter: value => value ?? computeSomething(row),};},
Details: date cells reach the formula engine the same way on every data path
-
A
datecolumn holds strings in yourdateFormat. A non-ISO value used to reach the engine as whatever the engine made of it ('123'became the number 123,'12:30'a time fraction,'TRUE'a boolean). It now reaches the engine as text. Arithmetic and concatenation are unaffected, because the engine coerces a numeric string, but functions that tell a number from text change. With'123'in adatecellA1:Formula Before After =A1+1124124=A1&"x"123x123x=SUM(A1:A1)1230=COUNT(A1:A1)10=ISNUMBER(A1)truefalse -
A
typeset only throughcells()now applies on those paths, as atypeset on the grid, a column, or thecellarray already did. That needs no change. -
To honor that type, the plugin reads each cell’s meta through the usual pipeline on those paths, so your
cells()function and meta hooks run once per non-formula text cell. The previous read ran none of them. CheckupdateSettings()first, because it runs on every call. -
When the pass runs. The plugin reads cell meta only when a configuration layer can mark a cell for escaping. That is any of: a
datetype orpreserveTextValue: truein the grid settings, a column, thecellarray, or a cell’s stored meta; acells()function; acolumnsfunction; or abeforeGetCellMetalistener. A grid with none of these skips the pass. AnafterGetCellMetalistener does not open the pass by itself (merged cells and hidden rows register one anyway), but it runs for every cell once another layer does.
- have a
An
afterRenderhook that writes to the engine loopsIn 18.1, the
Formulasplugin did not repaint the grid when something other than the grid changed the HyperFormula engine (for examplesetCellContents()on an external or shared engine). In 19.0, every such write repaints the grids that use the engine. AnafterRenderhook that writes to the engine on every call now triggers a repaint that calls the hook again, until the call stack overflows.Formulaslogs a warning that the grid failed to repaint.Affects: Apps whose
afterRenderhook callssetCellContents()or another engine write without checking whether the value changed.Do: Write only when the value differs. Wrapping the write in
engine.batch()does not stop the loop.Before:
afterRender() {engine.setCellContents({ sheet: 0, row: 0, col: 1 }, total);}After:
afterRender() {const address = { sheet: 0, row: 0, col: 1 };if (engine.getCellValue(address) !== total) {engine.setCellContents(address, total);}}Details: An afterRender hook that writes to the engine loops
- Outside a hook,
engine.batch()still makes several writes repaint the grid once instead of once per write.
- Outside a hook,
SHEET()keeps a sheet’s number after an earlier sheet is removedWhen the
Formulasplugin creates the HyperFormula engine (you pass theHyperFormulaclass in theengineoption),SHEET()now returns the sheet’s number in the engine. Before, removing a sheet renumbered the sheets after it, soSHEET()returned the sheet’s position. For sheetsS1,S2, andS3, after you removeS2,=SHEET("S3")returned2and now returns3.Affects: Apps that use HyperFormula 3.1.1 or later, let the plugin create the engine, remove a sheet that is not the last one, and use
SHEET()as a position (for example as an index inINDEX()orCHOOSE()).Do: Count the sheets before it yourself, or keep the sheets you remove at the end of the workbook. To keep the old numbering, call
rebuildAndRecalculate()on the engine after you remove a sheet. That also turns spilled arrays into#SPILL!, as before.const engine = hot.getPlugin('formulas').engine;engine.removeSheet(engine.getSheetId('S2'));// Before: SHEET("S3") returns 2. Now: SHEET("S3") returns 3.Details: SHEET() keeps a sheet's number after an earlier sheet is removed
- Why: the plugin used to rebuild the whole engine whenever a sheet was added or removed, which turned every spilled
array (such as
=SEQUENCE(3)) into#SPILL!. With HyperFormula 3.1.1 or later it no longer rebuilds, so spilled arrays keep their values and sheets keep their numbers. =SHEETS()still returns2in that example.- An engine instance that you create and pass to the plugin already numbered sheets this way.
- Why: the plugin used to rebuild the whole engine whenever a sheet was added or removed, which turned every spilled
array (such as
Frozen columns can be dragged, and the unfreeze hooks get a target
With
manualColumnFreeze, theManualColumnFreezeplugin no longer refuses to drop a column in front of the frozen columns or to move a frozen column, like a grid configured withfixedColumnsStart. Also,beforeColumnUnfreezeandafterColumnUnfreezereceive a third argument,finalIndex. The newrestoreColumnPositionoption is under Also new in 19.0 (see the column freezing guide).Affects: Apps that use
manualColumnFreezewithmanualColumnMove, listen to the freeze and unfreeze hooks, or assert on the unfreeze hook arguments in tests.Do:
-
To keep the old lock (for example to pin a key column), reject those moves in
beforeColumnMove. Returnfalseto reject and nothing otherwise, because any other value is passed on to the next handler.beforeColumnMove: function(movedColumns, finalIndex) {const frozenCount = this.getSettings().fixedColumnsStart ?? 0;if (finalIndex < frozenCount || movedColumns.some((column) => column < frozenCount)) {return false;}}, -
If you track frozen columns through
afterColumnFreezeandafterColumnUnfreeze, also read them inafterColumnMove. -
Update tests that assert the exact unfreeze arguments (such as
toHaveBeenCalledWith(column, performed)) to include the third one.
Details: Frozen columns can be dragged, and the unfreeze hooks get a target
- TypeScript calls to a stored unfreeze callback with two arguments (such as
getSettings().beforeColumnUnfreeze?.(column, true)) fail withTS2554, becausefinalIndexis declared as required. A listener that declares two parameters keeps working. - Freezing works by position, as with
fixedColumnsStart: the firstfixedColumnsStartcolumns are frozen, whichever columns they are, and their number stays the same. Dropping a column in front of a frozen column freezes the dropped column, and the last frozen column becomes scrollable. Dragging a frozen column out of the frozen area freezes the next column. - A drag across the freeze line fires
beforeColumnMoveandafterColumnMove, not the freeze and unfreeze hooks. Read the number of frozen columns fromgetSettings().fixedColumnsStart, and the order fromgetColHeader()or the column index mapper. finalIndexis the visual index the column moves to: the position right after the remaining frozen columns, or the restored position when you setrestoreColumnPosition. When nothing is unfrozen, it equals the column index.
-
The narrowest column width depends on the theme
A column resized by dragging or by
setManualSize()could be as narrow as20px, which left no room for the header’s menu button, label, and sort indicator. When the grid shows column headers (withcolHeadersornestedHeaders) anddropdownMenuis enabled, the narrowest width is now--ht-icon-size + 2 × --ht-cell-horizontal-padding. Any other grid keeps the20pxminimum.Theme Narrowest width before Narrowest width now, with the menu button Main 20px 32px Horizon 20px 40px Classic 20px 24px Affects: Apps with the dropdown menu enabled that rely on
20pxcolumns, callsetManualSize()orsetManualSizes()with a smaller width, or readgetManualSize()or the rendered header width and expect20.Do: Update the expected width, and read the minimum from the theme instead of hard-coding it. Saved widths need no migration: a width you restore through
setManualSizes()is stored as the minimum when it is below it.const probe = document.createElement('div');probe.style.width = 'calc(var(--ht-icon-size) + 2 * var(--ht-cell-horizontal-padding))';hot.rootElement.appendChild(probe);const minWidth = probe.offsetWidth;probe.remove();Details: The narrowest column width depends on the theme
- The minimum applies to dragging, a double-click on the resize handle (fit to content), and
setManualSize()andsetManualSizes(), which store it for any smaller width.setManualSize()returns it. - Not clamped: a width in the
manualColumnResizearray, incolWidths, or in a column’swidth; a width thatautoColumnSizeor column stretching calculates; a width already stored. For a narrower column, turn the dropdown menu off or use one of these (the header cannot fit the menu button below the minimum). A double-click on the resize handle stores a manual width, so it cannot go below the minimum. - The minimum is never below
20px, which is also the result when the theme does not declare the two values or the grid is not rendered yet. A theme can declare them in any unit (rem,em,calc(),px). - A narrow header gives things up in a fixed order: the label, then the sort indicator, then the menu button. The sort
indicator is hidden below
2 × --ht-cell-horizontal-padding + 2 × --ht-icon-size + 6px(54px in Main, 62px in Horizon, 42px in Classic), so a sorted column that narrow shows no arrow (and no sort order number withmultiColumnSorting). The label gives up room to the menu button as soon as the column can’t hold both, and the menu button stays inside its own header at every width the user can reach. At the minimum the label is gone, so a click on the header text cannot sort the column. Usesort(), or Enter on the header whennavigableHeadersis enabled. - CSS that targets
.colHeader.columnSorting.sortActionor thecolumn-gapof.relative.has-header-buttonis affected: the built-in rules now shrink both in a narrow header. - Handsontable applies the minimum when it writes a width, not when it reads one, so a theme change never rewrites
stored widths. The
sheetsBarplugin writes stored widths back throughsetManualSizes()when you switch sheets, so a width below the minimum from themanualColumnResizearray comes back as the minimum. - A grid without column headers or without the menu is not affected.
- The minimum applies to dragging, a double-click on the resize handle (fit to content), and
A border added from the context menu takes its color from the theme
A border added from the context menu (Borders > Top, Bottom, Left, or Right) used to store
color: '#000', which is invisible against dark cells in a dark color scheme. In 19.0 it storescolor: 'var(--ht-custom-borders-default-color, #000)'. The--ht-custom-borders-default-colortheme variable is black in light color schemes and light gray in dark ones, in every built-in theme.Affects: Apps whose code reads the
colorof a border added from the menu and expects'#000', or that need those borders to stay black in a dark color scheme.Do:
-
Read the color as a CSS value, not a hex string. You can save it and pass it back in the
customBordersoption, and the border then follows the theme. -
To keep these borders black in a dark color scheme, set the variable on the theme class (this example uses the
maintheme; forhorizonorclassic, replacemainin the three class names):#my-grid .ht-theme-main,#my-grid .ht-theme-main-dark,#my-grid .ht-theme-main-dark-auto {--ht-custom-borders-default-color: #000;}With the Theme API, set the
customBordersDefaultColortoken instead:myTheme.params({tokens: {customBordersDefaultColor: 'colors.black',},});
Details: A border added from the context menu takes its color from the theme
- Where your code needs a fixed color outside the page (for example on a server), use the
#000fallback inside thevar()value. The fallback applies when no theme is loaded or the theme does not define the variable, as in a theme you built before 19.0. Add the variable to that theme to make these borders visible in its dark color scheme. getBorders()and theborderskey ofgetCellMeta()return the CSS value for such a border, not a hex string.- A border saved in 18.1 with
color: '#000'stays black in every color scheme. - Borders you declare in
customBordersor add withsetBorders()keep the color you give them. A side set totrue, or given without acolor, is still#000. - The XLSX export of the
ExportFileplugin still writes these borders as black.
-
maxLengthis a built-in cell optionHandsontable now reads the
maxLengthoption. A cell with a finitemaxLengthstops the user from typing or pasting more characters than the limit allows, and marks a longer value as invalid. Until now, Handsontable ignored amaxLengthkey and kept it in the cell settings like any other custom key.Affects: Apps that set
maxLengthon the grid, incolumns,cells, orcell, or withsetCellMeta(), and read it in their own validator, editor, or renderer.Do: Pick one:
- Rename your key to a name Handsontable does not read, such as
maxChars, in your settings and in the code that reads it (this.maxCharsin a validator,cellProperties.maxCharsin an editor or renderer). - Use the built-in option: remove your own length validator and keep
maxLength. SetallowInvalidtofalseif the grid must reject a value that is too long. - Turn the built-in limit off for a cell: set
maxLength: Infinityon that column or cell and keep your own limit under another key.
Details: maxLength is a built-in cell option
- A rule of your own that counts UTF-16 units, or that trims the value first, can now reject a value it accepted before, because the built-in check runs first.
- The text editor, and any custom editor that extends it, stops typing and pasting at the limit. The
autocomplete,dropdown, andhandsontableeditors cap what the user types the same way. The editors of the other cell types, such as numeric, date, and password, do not limit input. - The cell validator marks a string value longer than the limit as invalid. It runs before your own
validator, which is not called for a value that is too long. - The limit counts the characters a reader sees (a flag or an emoji with a skin tone is one character), after
trimWhitespaceis applied. - Every write to the cell is validated asynchronously:
setDataAtCell()applies the value after the validation finishes, andgetDataAtCell()returns the previous value until then.
- Rename your key to a name Handsontable does not read, such as
Removing a parent row removes every row below it
With the
NestedRowsplugin, removing a parent row now removes that row and all of its descendants, as the documentation always described. Up to 18.1, it removed the parent and its direct children only. On a tree three or more levels deep, everything below stayed on screen as blank rows with no data, and no further Remove row could clear them.Affects: Apps that read the row indexes or the
amountfrom the row removal hooks, rely on the blank rows staying behind (for example by writing values into them), or undo a removal.Do: Nothing in most cases, because the rows that are now removed had no data behind them. If your code reacts to a row removal, read the row list from the hook argument instead of assuming one parent plus its direct children.
Details: Removing a parent row removes every row below it
beforeRemoveRowandafterRemoveRownow receive every descendant.- To count the affected rows, read the number from
afterRemoveRow, which reports the rows really removed. InbeforeRemoveRow,amountis counted before the plugin adds the descendants and stays at the old value, so read the length of the row array that hook receives. - Undo restores the parent and its descendants. Up to 18.1 it put back one row and left the rest on screen with no data.
- Example: in a four-level chain, removing row
0removed 2 rows up to 18.1 (hooks got[0, 1], 2 blank rows stayed) and removes 4 from 19.0 (hooks get[0, 1, 2, 3]). - A tree two levels deep is unaffected.
Cmd/Ctrl + arrow keys on a row header expand and collapse row groups
With the
NestedRowsplugin andnavigableHeadersenabled, Cmd/Ctrl + ← and → on a focused row header are now the row group keys. In 18.1, they moved the focus to the first or last cell of the row, as they do anywhere else in the grid.Affects: Apps that use
NestedRowswithnavigableHeaders, and users who relied on the old shortcut.Do: Nothing in your code. To reach the last cell of a row from its row header, press → to move into the row, then Cmd/Ctrl + →, or press End. Update any keyboard shortcut documentation you give your users.
Details: Cmd/Ctrl + arrow keys on a row header expand and collapse row groups
- Cmd/Ctrl + → expands a collapsed parent row. Cmd/Ctrl + ← collapses an expanded parent row, or moves the focus to the header of the parent row. With nothing to expand, collapse, or move to, they do nothing. In a right-to-left layout, the two arrows swap.
- From a cell, both shortcuts still move to the first or last cell of the row.
- While an overlay covers the grid body (the loading overlay or the empty data state), the row group keys do nothing. That includes Enter on a row header, which before 19.0 expanded or collapsed the row group under the overlay.
Leaving a merged cell with a left or right arrow lands on its top row
With
mergeCells, a left or right arrow that leaves a merged cell now always lands on the merged cell’s top row (its topmost visible row when the top row is hidden), whichever way you entered. Before 19.0.0, the selection kept the row you entered on: entering a three-row merged cell from below (arrow up) and pressing left landed one row lower than entering from above (arrow down).Affects: Apps that read
getSelected()orgetSelectedRangeLast()after a left or right arrow leaves a merged cell entered on a row other than its first.Do: Nothing in most cases. If your code compensated for the old direction-dependent landing, drop that workaround.
Details: Leaving a merged cell with a left or right arrow lands on its top row
- A merged cell is now addressed by its top-left corner.
- Vertical navigation still keeps the column you move along, and Tab and Shift+Tab keep the row they cycle along. A grid without merged cells is unaffected.
A row dragged into a gap with hidden rows lands after them
A gap made by rows hidden with
HiddenRowsor another hiding index map (such as the onePaginationuses) has two drop targets: the lower half of the row above it and the upper half of the row below it. In 18.1, the lower half put the moved row in front of the hidden rows. In 19.0, both halves put it after them, right before the next visible row, as for trimmed rows and hidden columns.Affects: Apps that combine
manualRowMovewithhiddenRowswhere users drag rows next to hidden ones (after the hidden rows are shown again, a moved row can sit on the other side of them than in 18.1), or that save or compare the row order after a user drag, or readdropIndexorfinalIndexin a row-move hook and expect the index of a hidden row.Do: Nothing, unless you want the 18.1 placement. To put a row in front of the hidden rows, call
dragRows()with the visual index of the first hidden row.// Six rows, rows 2 and 3 hidden. Drag row 0 onto the lower half of row 1.// 18.1: hot.rowIndexMapper.getIndexesSequence() returns [1, 0, 2, 3, 4, 5]// 19.0: hot.rowIndexMapper.getIndexesSequence() returns [1, 2, 3, 0, 4, 5]// A drop on the upper half of row 4 gives [1, 2, 3, 0, 4, 5] in both versions.Details: A row dragged into a gap with hidden rows lands after them
- If you don’t hide rows, or you move rows only through the API, nothing changes.
beforeRowMoveandafterRowMovereport the resolved drop: in the example, a lower-half drop reportsdropIndex4(not2) andfinalIndex3(not1).- A drag that ends right before the moved row itself changes too. Drag row 4 to the lower half of row 1: 18.1 returned
[0, 1, 4, 2, 3, 5]fromgetIndexesSequence()withorderChangedtrue. 19.0 reportsdropIndex4andorderChangedfalse, and nothing moves. CheckorderChangedinafterRowMove. - A row dropped on its own lower half stays put, so a row right above the hidden rows does not jump over them. The upper half of the row below the hidden rows still moves it after them, as in 18.1.
- The drop index is unchanged when landing after the hidden rows would cross the edge of the fixed rows (top or bottom),
would split a merged cell, or when
NestedRowsis enabled. moveRows(),moveRow(),dragRows(), anddragRow()use the index you pass:dragRow(0, 2)still lands in front of the hidden rows,dragRow(0, 3)between the two hidden rows.
A
numericcell aligns itself by its type, not by its valueA
numericcell used to align and style itself as numeric only while its value parsed as a number. A cell holdingnull,undefined, or text stayed left-aligned without thehtRightandhtNumericclasses, althoughgetCellMeta()reportedtype: 'numeric', and a cell that picked up the classes while briefly numeric never lost them. In 19.0, anumericcell carrieshtRight,htNumeric, anddir="ltr"and aligns right, whatever it holds.Affects: A
numericcolumn or cell that can holdnull,undefined, or text.Do: Nothing in most cases. If you read the
classNamemeta or the DOM classes to tell whether a cell holds a number, check the value instead, for example withisNumeric(). Update a custom rule that assumed such cells stay left-aligned.Details: A numeric cell aligns itself by its type, not by its value
- Such cells now also export right-aligned from
ExportFilein the XLSX format.
- Such cells now also export right-aligned from
Turning
loadingoff turns theDialogplugin offThe
Loadingplugin shows its overlay through theDialogplugin. In 18.1,loadingset thedialogoption totrue, so the plugin stayed enabled afterloadingwent off. In 19.0,loadingenables the plugin without changingdialog, and the plugin is enabled whiledialogis set orloadingis on.Affects: Apps that set
loadingwithoutdialog, turn it off, and then use theDialogplugin. Thenshow(),showAlert(), andshowConfirm()show nothing,downloadFileAsync()downloads without its progress dialog, andgetSettings().dialogno longer tells whether the plugin is enabled.Do: Set
dialog: truenext toloading. To check the plugin state, readhot.getPlugin('dialog').enabled.const hot = new Handsontable(container, {loading: true,dialog: true,});hot.updateSettings({ loading: false });// the Dialog plugin is still enabledhot.getPlugin('dialog').showConfirm('Delete this row?');Details: Turning loading off turns the Dialog plugin off
Settings Dialogplugin in 18.1Dialogplugin in 19.0loading: trueEnabled, getSettings().dialogistrueEnabled, getSettings().dialogisfalseloading: true, thenloading: falseEnabled Disabled loading: true, thenloading: false, thendialog: falseEnabled Disabled dialog: trueandloading: true, thenloading: falseEnabled Enabled Changing
dataSchemaresets the grid’s index stateWithout
columns,dataSchemadecides the column count and each column’s property. In 18.1, anupdateSettings()call that changeddataSchemawithoutdataorcolumnsupdated neither. In 19.0, such a call compares the columns the new schema defines with the grid’s. If the count or the property of any column differs, the grid re-creates the data map and re-initializes the row and column index mappers, as a changedcolumnsoption does.Affects: Apps that change the columns
dataSchemadefines after creation, set nocolumns, and rely on index state surviving the change.Do: Read the state before the update and apply it again after. For example, store
getSortConfig()and pass it back tosort()onceupdateSettings()returns.Details: Changing dataSchema resets the grid's index state
- The reset clears everything stored per index: column and row order changed by users or the API
(
ManualColumnMove,ManualRowMove), sorting, filtering, rows and columns hidden or trimmed through the API or UI, and dragged row heights and column widths. Options in your settings, such ashiddenColumns: { columns: [1] }, apply again. - A change is another column count, other property names, or the same names in another order (columns follow the key
order of the schema). Not a change: a new default value (
status: 'new'tostatus: 'open'), or a new function that returns the same columns (the function is called to read them). - Setting
dataSchematoundefinedreads the columns from the data, a change when they differ. dataSchematogether withdataresets the same way when the columns changed.dataalone keeps the state, as in 18.1.dataSchematogether withcolumns, or a grid with acolumnsoption, behaves as before.
- The reset clears everything stored per index: column and row order changed by users or the API
(
A
dataSchemawith non-nullvalues creates a column for each valueWithout
columns,dataSchemadecides which property each column reads. In 18.1, only anullvalue created a column property. A column for another value (0,'x',false) had no property and rendered blank although the data held a value. In 19.0, every value except an array, a function, and a non-plain object (such as aDateor aMap) creates a column property, whatever its default. Columns follow the key order of the schema, so a schema that mixesnulland non-nullvalues gets a new column order.Affects: Apps with a non-
nulldataSchemavalue, nocolumns, and a column addressed by index, for examplecolHeadersas an array,hiddenColumns,colWidths,cell, orgetDataAtCol().Do: Set
columnsand name each property indata, so the order no longer depends on the schema. Or usenullfor each schema value, as the grid does when it reads the schema from your data.Without
columns, the schema decides:// 18.1: column 0 is `id`, column 1 is `name`, column 2 has no property and renders blank// 19.0: column 0 is `isNew`, column 1 is `id`, column 2 is `name`const hot = new Handsontable(container, {data: [{ isNew: true, id: 1, name: 'Ted' }],dataSchema: { isNew: true, id: null, name: null },});With
columns, the order no longer depends on the schema:const hot = new Handsontable(container, {data: [{ isNew: true, id: 1, name: 'Ted' }],dataSchema: { isNew: true, id: null, name: null },columns: [{ data: 'id' }, { data: 'name' }],});colWidths: nullsizes columns likeundefinedIn 18.1,
colWidths: nullwas passed on as a width:getColWidth()returnednulland every column was 50px, althoughAutoColumnSizereported itself enabled. In 19.0,nullsets no width, likeundefined, and AutoColumnSize sizes the columns.Affects: Apps that set
colWidths: nulland rely on 50px columns, checkwidth === nullin amodifyColWidthcallback, or expectgetColWidth()to returnnull.Do: For fixed 50px columns, set
colWidths: 50. InmodifyColWidth, checkwidth === undefined(orwidth == null).Details: colWidths: null sizes columns like undefined
- A
nullentry in acolWidthsarray, or acolWidthsfunction returningnull, also sets no width:getColWidth()returns the default width andmodifyColWidthreceivesundefined. AutoColumnSize stays off there (any othercolWidthsvalue turns it off), so those columns keep 50px. - A column
width: nullbehaves likeundefinedand falls back tocolWidths.
- A
Row elements move with their rows on a vertical scroll
Since 18.0, every
trandtdstayed at its DOM position during a scroll and received the row that scrolled into it. In 19.0, a vertical scroll inside the grid’s own scrollable area moves thetrelements: a row that stays rendered keeps its element, and rows that scrolled out wrap to the other end of thetbodyand take the rows that scrolled in. DOM order still matches rendered order, and the column axis is unchanged. There is no option.Affects: Apps that observe the
tbodywith aMutationObserver, keep references to atrortd, render cells by where the rendered area starts or ends, or run:has()selectors on the host page.Do: Nothing for a renderer that writes the cell from the data it receives. Read a row through
getCell()or its position in thetbodyinstead of holding atrortd. A renderer that depends on where the rendered area starts or ends (for examplegetFirstRenderedVisibleRow()) needs a change only underrenderMode: 'onChange', where a scroll does not repaint such a cell: setrenderMode: 'always'on that column or cell, or callmarkCellChanged()before you render.Details: Row elements move with their rows on a vertical scroll
- It applies whether or not you set
renderMode, when the grid scrolls inside its own container on both axes. A grid that scrolls with the page keeps elements in place. - A
MutationObserveron thetbodyseeschildListrecords on every scroll step (movedtrelements, removed and added in one move). Nothing is created or dropped while the rendered row count is unchanged. - A kept
trortdreference holds the same row while it stays rendered, so a renderer that caches per element keeps its cache across a scroll. :has()selectors that reach the grid cost a style recalculation per DOM move, as with the 16.x re-insertion. On a page with 30,000 nodes and three:has()rules the cost stayed flat. If yours does not, open an issue.modifySinglePassLayoutno longer opts a grid out of this behavior. It still switches the layout model.
- It applies whether or not you set
getCopyableData()returns a stringgetCopyableData()was documented and typed as returning a string, but returned the value as stored (number, boolean,null,undefined, array, object). In 19.0, it returns a string: numbers and booleans become their text form,nullandundefinedbecome an empty string, and any other value goes throughtoString(). A cell withcopyablefalsestill returns an empty string.Affects: Apps that compare the result with a non-string (
hot.getCopyableData(0, 0) === 1), read a property or item of it (.nameon an object cell now reads from a string and givesundefinedor a character, with no error), or use the result ofgetCopyableSourceData()as a string in TypeScript without narrowing (it no longer compiles).Do: To read the stored value, call
getDataAtCell(). It ignorescopyable, so check that yourself if you rely on it. In TypeScript, narrow the result ofgetCopyableSourceData()first.Before:
if (hot.getCopyableData(0, 0) === 1) {hot.setDataAtCell(0, 1, 'Approved');}After:
if (hot.getCellMeta(0, 0).copyable && hot.getDataAtCell(0, 0) === 1) {hot.setDataAtCell(0, 1, 'Approved');}const value = hot.getCopyableSourceData(0, 0);if (typeof value === 'string') {hot.setDataAtCell(0, 1, value.trim());}Details: getCopyableData() returns a string
- The result can differ from the clipboard text for an object with its own
valueOf()(such as a date-library instance): the clipboard usesvalueOf(),getCopyableData()usestoString(). - Copy, cut, and autofill are unaffected.
beforeCopy,afterCopy,beforeCut,afterCut, andbeforeAutofillstill receive stored values. getCopyableSourceData()is unchanged at run time (stored value, nested objects included). Only its TypeScript return type changes, fromstringtounknown.
- The result can differ from the clipboard text for an object with its own
The copy, cut, and paste shortcuts are registered in the
gridcontextIn 18.1, the
gridshortcut context had no entry for Ctrl/Cmd + C, X, and V: the browser ran them unlisted. In 19.0, the context registers all three as default shortcuts in thegridClipboardgroup. They do nothing on their own, and the browser still runs the action. As real entries,hasShortcut()returnstruefor them,getShortcuts()returns the default entry, andremoveShortcutsByKeys()removes it, after which theCopyPasteplugin cancels the combination, so the key no longer copies, cuts, or pastes.Affects: Apps that add their own shortcut on one of these keys and later call
removeShortcutsByKeys()to restore the native behavior (it now also removes the default entry), or that expect an empty list orfalsefromgetShortcuts()orhasShortcut()for these keys.Do: Remove your own entry by its
groupwithremoveShortcutsByGroup(), which leaves the default entry. When you read these keys, ignore the default entry by its group.Before, remove your own entry by its keys:
const gridContext = hot.getShortcutManager().getContext('grid');gridContext.addShortcuts([{keys: [['control/meta', 'v']],callback: () => customPaste(),group: 'myPaste',}]);// Later, to get the native paste backgridContext.removeShortcutsByKeys(['control/meta', 'v']);After, remove it by its group:
const gridContext = hot.getShortcutManager().getContext('grid');gridContext.addShortcuts([{keys: [['control/meta', 'v']],callback: () => customPaste(),group: 'myPaste',}]);// Later, to get the native paste backgridContext.removeShortcutsByGroup('myPaste');Before, an empty list meant that nobody had registered the key:
const gridContext = hot.getShortcutManager().getContext('grid');const hasOwnCopy = gridContext.getShortcuts(['control/meta', 'c']).length > 0;After, ignore the default entry by its group:
const gridContext = hot.getShortcutManager().getContext('grid');const hasOwnCopy = gridContext.getShortcuts(['control/meta', 'c']).some(({ group }) => group !== 'gridClipboard');Details: The copy, cut, and paste shortcuts are registered in the grid context
- To turn off keyboard copy, cut, or paste on purpose, keep using
removeShortcutsByKeys(). The context menu items andcopy(),cut(), andpaste()keep working. Full behavior: Remove the copy, cut, and paste shortcuts.
- To turn off keyboard copy, cut, or paste on purpose, keep using
checkedis a reserved context menu item propertyHandsontable’s own toggle items (“Read only”, “Read-only comment”, and the four border items) used to carry their check mark as an HTML string in
name, which a page enforcingrequire-trusted-types-for 'script'rejected. Each item now declares its state in acheckedoption, and Handsontable builds the mark as a DOM node. So every item of a context menu or column menu readschecked. Your own item with acheckedboolean, the string'mixed', or a function returning either now draws a mark before its label (a check mark fortrue, a dash for'mixed') and is announced as a checkbox with a state. Any other value is ignored.Affects: Apps with their own menu items that use a
checkedproperty, draw a mark insidename, or style the 18.1 mark withspan.selected::after. Apps that load a theme without icons (ht-theme-main-no-icons.cssand the other-no-iconsbundles) are affected with no custom item at all: the built-in “Read only” and border items now drawht-icon-check, so their mark is blank.Do:
-
If
checkedwas your own bookkeeping, rename it. -
If you drew the mark inside
name, use the option instead (both together give two marks). -
On a theme without icons (such as
ht-theme-main-no-icons.css), give both mark icons a mask. This also restores the mark of the built-in items..htItemWrapper .ht-icon-check,.htItemWrapper .ht-icon-collapse-off {mask-size: contain;mask-repeat: no-repeat;mask-position: center;background-color: currentColor;}.htItemWrapper .ht-icon-check { mask-image: url('/icons/check.svg'); }.htItemWrapper .ht-icon-collapse-off { mask-image: url('/icons/dash.svg'); }
Before:
items: [{ name: 'Sync', checked: isSyncing, callback() { /* ... */ } },{ name: () => `<span class="selected">✓</span>My toggle`, checked: myState },],After:
items: [{ name: 'Sync', syncing: isSyncing, callback() { /* ... */ } },{ name: 'My toggle', checked: () => myState },],Details: checked is a reserved context menu item property
- “Read only” and “Read-only comment” use
'mixed'when only some selected cells are read-only, and show a dash where they showed a check mark. - The check mark is
<i class="ht-icon ht-icon-check">insidespan.selected. The dash is<i class="ht-icon ht-icon-collapse-off">insidespan.htMixed. - A
span.selected::afterrule from 18.1 paints nothing: the span keepsfont-size: 0, so the pseudo-element inherits it and renders no box. See Icons are rendered as<i>elements. - The
checkedform needs nosanitizer. Anamewith markup is written throughinnerHTML, so under Trusted Types it needs a policy-backed sanitizer. A plain label does not.
-
HTML output changes for
TrustedHTMLpaste,toHTML()headers, and character referencesThree changes affect what a
sanitizersees and how Handsontable writes text. The third applies with or without asanitizer.Affects: Apps whose
sanitizerreturns aTrustedHTML(any markup it permits inside a<td>now reaches the cell value, not only markup it adds), apps that readtoHTML()output, and apps that write HTML character references in dialog, empty-state, button, or cell text.Do:
-
A
sanitizerthat returns aTrustedHTMLowns what lands in cells, because aTrustedHTMLnow skips paste normalization: check which markup it permits inside a<td>. If it adds markup (a linkify-style step), skip that step for pasted-HTML sources (sourcestarts withCopyPaste.paste).sanitizer: (content, source) => {if (source.startsWith('CopyPaste.paste')) {return policy.createHTML(DOMPurify.sanitize(content));}return policy.createHTML(linkify(DOMPurify.sanitize(content)));}, -
Nothing, unless you read header markup from
toHTML()output: it now goes through your sanitizer. WithcolHeaders: ['<b>ID</b>']and a sanitizer that strips markup, the markup no longer survives. -
Character references: write the character itself, a numeric reference, or the lower-case spelling.
Details: HTML output changes for TrustedHTML paste, toHTML() headers, and character references
- Paste normalization. A string-returning sanitizer is unchanged: Handsontable hands it the clipboard payload as
carried, then flattens each
<td>to text, so cell values keep no markup except<br>. ATrustedHTML(required on a page enforcingrequire-trusted-types-for 'script') reaches the parser unchanged, because concatenating, re-testing, or stringifying it strips the trust, so Handsontable skips the flattening (a string rewrite). Markup your sanitizer permits inside a<td>now arrives in the cell value, where thehtmlcell type or a custom renderer interprets it. toHTML().toHTML()used to interpolate column and row headers unsanitized, whiletoTableElement()sanitized them. Both now sanitize, and neither emits the missing-sanitizer console warning any more (both are read-only).- Character references, with or without a
sanitizer. Dialog titles and descriptions, empty-state copy, button labels, and the cell text fromtoTableElement()used to be HTML strings assigned toinnerHTML, so the browser decoded character references. They now build DOM nodes, and Handsontable resolves references against a fixed set of names. Numeric references (—,—) and the named ones in ordinary copy (&,<,>,",', , the punctuation and currency names) work as before. Two kinds now render as written: a name outside the set (a ♥ bdisplays as is, nota ♥ b) and an upper-case name (&,©,®, valid HTML but left as written).
-
removeCellMeta()accepts an index past the grid’s rangeThis is a bug fix, not a breaking change. In 18.1,
removeCellMeta()threwAssertion failed: Expecting an unsigned numberfor a row or column index outside the grid’s range, whilesetCellMeta()accepted it. In 19.0,removeCellMeta()matches it: it takes the index as the physical index and removes the key from the cell meta stored there.Affects: Apps that call
removeCellMeta()past the last row or column and catch the error, or that trim rows or columns (trimRows, a filter) and call it past the visible range.Do: Pass the visual index of a cell the grid shows. To skip an index outside the grid, check it against
countRows()andcountCols().if (row < hot.countRows() && column < hot.countCols()) {hot.removeCellMeta(row, column, 'className');}Details: removeCellMeta() accepts an index past the grid's range
- A coordinate captured before the data shrank (for example through
updateData(), which keeps cell meta) still addresses the record you wrote it to. - With trimmed rows, an index past the visible range names a physical record: a still-live trimmed record, or a row the grid shows at a different visual index (when trimmed rows sit above it). In 18.1 the call threw. Now it removes the key there without an error.
- A coordinate captured before the data shrank (for example through
The
AutoRowSizeplugin’s settings no longer includeuseHeadersIn 18.1, the default settings of the
AutoRowSizeplugin held auseHeaders: truekey that nothing read. 19.0 removes it. Row heights are measured exactly as before, buthot.getPlugin('autoRowSize').getSetting('useHeaders')returnsundefinedinstead oftrue, and the objectgetSetting()returns has nouseHeaderskey.Affects: Code that reads
useHeadersfrom theAutoRowSizeplugin’s settings.Do: Remove the read.
AutoRowSizenever used the value. To decide whether column headers count toward column widths, setuseHeadersin theautoColumnSizeoption, which still reads it.
TypeScript-only changes
These changes affect type checking only. Your app runs the same, except for the two Vue 3 props the Vue 3 change names. The table also links the type changes that come with changes in other groups.
| Change | Affects | Do |
|---|---|---|
| Ten options are type-checked | TypeScript apps that set or read one of ten options | Fix the reported types |
filters is type-checked | TypeScript apps that set filters to an object | Remove unknown keys |
| Vue 3 props are type-checked | Vue 3 apps, and apps that pass handsontable or getValue (runtime) | Fix prop types; move hooks to HotTable |
HotColumn hook props | React TypeScript apps that pass a hook to HotColumn | Move the hook to HotTable |
afterChange changes are AppliedCellChange[] | TypeScript apps that type afterChange, beforeChangeRender, modifyData, or afterValidate | Allow a null row |
colToProp() and propToCol() can return null | TypeScript apps with strictNullChecks that store the result as a number | Check the result for null |
Unfreeze hooks take finalIndex | TypeScript code that calls an unfreeze hook with two arguments | Pass the third argument |
getThemeConfig().icons and IconKey | TypeScript code that reads theme icons or switches over IconKey | Narrow with typeof; add the new keys |
DataProviderConfig.rowId can be a function | TypeScript code that reads rowId back as a string | Narrow with typeof rowId === 'string' |
getCopyableSourceData() returns unknown | TypeScript code that uses its result as a string | Narrow the result |
Hook settings and React hook props accept null | TypeScript code that reads a hook prop back | Handle null |
Settings and DataProviderOptions types removed | TypeScript code that imports either alias | Import ExportFileSettings or DataProviderFetchOptions |
Ten options are type-checked
In 18.1, TypeScript typed ten documented options as
any, so a wrong value compiled. Each option now has its real type. Nothing changes at runtime.Affects: You use TypeScript, and your code stops compiling in one of the cases below.
Do: Give the option a value of its type, and handle
undefinedwhen you read an option back. Each option is optional.Before,
getSettings().valueParserwasany:const parsed = hot.getSettings().valueParser(value, cellProperties);After:
const parsed = hot.getSettings().valueParser?.(value, cellProperties);For
notification, remove the keys the plugin does not read, such asduration. It reads onlystackLimitandanimation, so set a toast’s duration where you show the message. If a value comes from a source that TypeScript cannot check, such as a configuration file, convert it where you read it:import type { GridSettings } from 'handsontable';const settings: GridSettings = {maxSelections: Number(config.maxSelections), // A string, such as '3', no longer compiles.};Details: Ten options are type-checked
-
The ten options fell into the
[key: string]: anyindex signature ofGridSettings. Their types:Option Type enterCommits,filterSelectedItems,searchInput,injectCoreCss,parsePastedValuebooleanmaxSelectionsnumbernotificationboolean, or an object withstackLimitandanimationthemeA theme name, a theme config object, or a ThemeBuildervalueParserA function that takes the editor value and the cell properties sourceSortFunctionA function that takes an array of list entries and returns one -
Compile errors appear when:
- a
booleanoption holds another type, such as0or'true', ormaxSelectionsholds a numeric string; - the
notificationobject has a key other thanstackLimitoranimation, orthemeis neither a string nor an object; - an option holds
null, as inupdateSettings({ notification: null }). The grid treatsnullas unset, but the types do not. Passundefined; - your code reads an option back from
getSettings(),getCellMeta(), or a custom editor’scellPropertiesand uses it as a definite value, because it may now beundefined; - your code calls a
ThemeBuildermethod ongetSettings().theme. The type isstring | object, becauseobjectabsorbsThemeBuilder, sotypeofnarrows only toobject. Useinstanceof ThemeBuilderor cast; - you use
Required<GridSettings>or a mapped type over its keys. All ten options become required, so an object typed that way is missing them (TS2740); - your code calls
valueParserwith one argument. It now declares both parameters.
- a
-
A callback you write for
valueParserorsourceSortFunctionstill compiles, whether it annotates its parameters or leaves TypeScript to infer them.
-
The
filtersoption is type-checkedIn 18.1, TypeScript typed the
filtersoption asboolean | object, so a misspelled key or a wrong value compiled and was ignored at runtime. The option now has real types. Nothing changes at runtime.Affects: You use TypeScript, and your code stops compiling in one of the cases below. For an unknown key, an out-of-range
searchMode, and an extra key in a column’sfiltersobject, the setting already had no effect, so fixing the error does not change what your grid does. A validsearchModethat your code holds in astringvariable (or in aRecord<string, unknown>object) also fails to compile, although it works.Do: Correct or remove the key that the compiler rejects, or move a per-column object to the grid level. For a valid value typed as
string, addas const. Do not delete the key.Before, this compiled, and the misspelled key did nothing:
filters: {searchmode: 'apply',},After:
filters: {searchMode: 'apply',},Before, this compiled, but the grid ignored the object and logged a warning:
columns: [{ filters: { filterFixedRows: false } },],After:
filters: {filterFixedRows: false,},Details: The filters option is type-checked
-
At the grid level, the object accepts only
searchMode('show'or'apply'),filterFixedRows(a boolean), andavailableConditions, which is new in 19.0. See Choose the conditions the filter menu offers. -
Inside
columns,filtersis a boolean or an object that holds onlyavailableConditions. Onlyfalsehas ever had an effect there. -
Compile errors appear when the grid-level object has another key (ignored without a warning), when
searchModeholds another value (ignored, with a warning), or when a column’sfiltersobject has a key other thanavailableConditions(ignored, with a warning). -
A valid setting stops compiling when its value has a wider type than the option accepts:
searchModefrom a variable typedstring, or afiltersobject typedRecord<string, unknown>. Narrow the type:Before,
searchModeis astring, which 19.0 rejects:const config = { searchMode: 'apply' };After,
as constkeeps the literal type'apply':const config = { searchMode: 'apply' } as const; -
To type a separate settings object, use the exported type:
import Handsontable from 'handsontable';const filtersSettings: Handsontable.plugins.Filters.Settings = {searchMode: 'apply',};
-
The Vue 3 wrapper props are type-checked
In 18.1,
HotTableandHotColumndeclared every prop asany. Each prop now has the type of the option it sets, so a type check of your templates (vue-tsc) orh()calls (tsc) rejects wrong values. Two runtime changes come with the new types:handsontableis now a prop ofHotTableandHotColumn, andgetValueis now a prop ofHotTable.Affects: You use
vue-tscon your templates ortscon yourh()calls. Or you passhandsontableorgetValueto these components and relied on it being ignored.Do: Fix the value that the type check rejects, or cast it when the type is wrong for your case. If you passed
handsontableorgetValueand relied on it being ignored, check that the value now applied to the grid settings is the one you want, or remove the prop.Before, the template compiled and failed at runtime:
<HotTable :sheetsBar="42" :readOnly="'yes'" />After:
<HotTable :sheetsBar="{ sheets }" :readOnly="true" />A value your own types cannot narrow:
<HotTable :readOnly="(isLocked as boolean)" />Details: The Vue 3 wrapper props are type-checked
-
In 18.1,
<HotColumn :handsontable="...">never reached the column settings, and<HotTable :handsontable="...">and<HotTable :getValue="...">fell through as attributes on the rootdiv. They now reach the grid settings. AgetValueon aHotColumnstill has no effect. -
HotTabletakes the types ofupdateSettings(), so a hook prop may benull, which removes its callback.HotColumntakes the types of the column settings, wheredatais a property name or a getter instead of an array of rows.HotColumnhas no hooks orgetValue, because core reads both from the table settings only. -
Compile errors appear when:
- a prop holds a value of another type, such as
:readOnly="'yes'"or:sheetsBar="42"; HotTablegets:data="null", as in:data="isLoaded ? rows : null". Passundefinedor an empty array;HotColumngets a hook, such as:afterChange="onChange", or:getValue. Both type-check in a template only withoutstrictTemplates, and fail in anh()call. Move the hook toHotTable, as it never ran on a column;- a
gettercolumn passes:data="(row, value) => ..."with a required second parameter. The type takes a function that also works with one argument, so write(row, value?) => ...; - you turned on
strictTemplatesinvueCompilerOptions, and a template passes a prop that is not an option, such as a custom cell meta key. WithoutstrictTemplates, it still compiles. Aclass, astyle, and anaria-attribute compile either way.
- a prop holds a value of another type, such as
-
A prop that you leave out is still optional.
-
A bare attribute, such as
<HotTable readOnly>, passes the type check but does not set the option totrue: the grid gets an empty string, which is falsy, because the wrapper does not cast attributes to booleans. This was already the case in 18.1. Write the value:Before, the template compiles and does nothing:
<HotTable readOnly rowHeaders />After:
<HotTable :readOnly="true" :rowHeaders="true" />
-
HotColumnno longer types hook propsIn 18.1, the TypeScript props of the React
HotColumncomponent listed every grid hook, such asafterChangeandbeforeKeyDown. Hooks run at the grid level only, so a hook onHotColumnnever ran. In 19.0, theHotColumnprops leave the hooks out. Nothing changes at runtime.Affects: You pass a hook to
HotColumnand compile withnoImplicitAny(part ofstrict). The hook’s parameters are now implicitlyany, which is error TS7006. WithoutnoImplicitAny, your code still compiles.Do: Move the hook to
HotTable, where hooks run. Because the hook never ran, this does not change what your grid does. See Events and hooks.Before, this compiled, but
afterChangenever ran:<HotTable data={data}><HotColumn data="price" afterChange={(changes, source) => {}} /></HotTable>After:
<HotTabledata={data}afterChange={(changes, source) => {// Check `changes` to react to a specific column.}}><HotColumn data="price" /></HotTable>
Deprecated in 19.0
These APIs keep compiling in 19.x, and 20.0.0 removes them. Each method and option still works and logs a one-time
console warning. The NON_COMMERCIAL_LICENSE constant logs none, and its key no longer unlocks the grid. The table also
links the deprecations that come with changes in other groups.
| Change | Affects | Do |
|---|---|---|
| Writing past the last column | Writes and pastes past the last column of object data | Declare columns, or use setDataAtRowProp() |
spliceCol() and spliceRow() | Calls to either method | Use populateFromArray() or alter() |
| Formulas shortcut methods | Calls to registerShortcuts() or unregisterShortcuts() | Remove the calls |
Four MergedCellsCollection methods | Calls to one of the four methods | Remove the calls |
The sr-SP language code | Apps that set language: 'sr-SP' (loading sr-SP.js alone logs nothing) | Use sr-Latn-RS |
Angular NON_COMMERCIAL_LICENSE constant | Apps that import it from @handsontable/angular-wrapper; a grid configured with it shows the lock screen | Pass your key in HOT_GLOBAL_CONFIG |
iconsMap helper | Custom themes that import iconsMap | Use iconStyles() |
Writing past the last column of an object data source is deprecated
Writing to a column index the grid has no column for adds a property named after the index, which no column can display. On an object data source, that write is deprecated since 19.0.0: it prints a one-time console warning and still lands. From 20.0.0, the write is skipped, and no
beforeChangeorafterChangeentry is reported for it.Affects: Your
datais an array of objects, or yourdataSchemais a function, and a paste,populateFromArray(), orsetDataAtCell()can write to a column index with no column.Do:
-
For a
setDataAtCell()call of your own, address the field by name withsetDataAtRowProp(). For example, with two declared columns and three fields:const hot = new Handsontable(container, {data: rows,dataSchema: { id: null, name: null, city: null },columns: [{ data: 'id' }, { data: 'name' }],// licenseKey: 'your-license-key', // get a key at https://handsontable.com/pricing/});Before, the property is named after the column index:
hot.setDataAtCell(0, 2, 'Boston');hot.getSourceData()[0][2]; // 'Boston'After, name the field you mean:
hot.setDataAtRowProp(0, 'city', 'Boston');hot.getSourceData()[0].city; // 'Boston' -
For a paste or a
populateFromArray()call, declare a column for every field the content can reach, so the grid has a column for every field:const hot = new Handsontable(container, {data: rows,dataSchema: { id: null, name: null, city: null },colHeaders: ['ID', 'Name', 'City'],// licenseKey: 'your-license-key', // get a key at https://handsontable.com/pricing/});
Details: Writing past the last column of an object data source is deprecated
- Other paths:
- To drop the overflow of a paste today, set
allowInsertColumntofalse. The paste then stops at the last column, whatever the data source. It does not stop a directsetDataAtCell()call. - If the incoming width is not known up front, use an array-of-arrays
datasource, which grows on demand.
- To drop the overflow of a paste today, set
- With
setDataAtRowProp(), the grid can keep showing no column for the field, and listing the field indataSchemais optional. - The warning prints only for a write that lands. If a
beforeChangelistener already drops the change, cancels the call, or points it at a named field, nothing is printed. - From 20.0.0, the “Before” write above is skipped:
rows[0]keeps only its declared fields. In 19.0, it also holds2: 'Boston'. - A paste with the
copyPasteoption’spasteModeset to'shift_right'also pushes existing values past the last column, and those are deprecated the same way. - Why: an object source takes its column count from the first row or from
dataSchema, so a write past it cannot create a column. The value lands on an undeclared property that no column renders.getSourceData()still returns it, so it reaches anything that serializes the row (a save, a request payload, a schema validator).countSourceCols()counts it too when the write lands on the first row. - Unchanged:
setDataAtRowProp(), which names the field and keeps writing fields with no column. Also unchanged: array data sources (the index names a real slot, so the write lands without a warning, and where the grid may grow, the column is created as before) and a grid with no declared columns.
-
spliceCol()andspliceRow()are deprecatedspliceCol()andspliceRow()are deprecated since 19.0.0. Each prints a one-time console warning and still works as before. 20.0.0 removes them.Affects: Your code calls
hot.spliceCol(...)orhot.spliceRow(...).Do: Change the data yourself and write it back with
populateFromArray(), or usealter()to add or remove whole rows and columns. Read the column, runArray.prototype.splice()on it, and write the shifted tail back from the same row.Before:
// Remove the cell in column 1 at row 1, shifting the cells below it up.hot.spliceCol(1, 1, 1);After:
const column = hot.getDataAtCol(1);const shifted = column.slice(2);shifted.push(null);hot.populateFromArray(1, 1, shifted.map(value => [value]));spliceRow()is the same, along the row. ItspopulateFromArray()form takes a single inner array:Before:
// Remove the cell in row 1 at column 1, shifting the cells to its right left.hot.spliceRow(1, 1, 1);After:
const row = hot.getSourceDataAtRow(1);const shifted = row.slice(2);shifted.push(null);hot.populateFromArray(1, 1, [shifted]);Details: spliceCol() and spliceRow() are deprecated
- The
spliceColandspliceRowchange sources thatbeforeChangeandafterChangereport are unaffected in 19.x. They go away with the methods in 20.0.0, so do not build new code on them.
- The
Formulas shortcut methods
registerShortcuts()andunregisterShortcuts()of theFormulasplugin are deprecated no-op methods since 19.0.0. Each prints a one-time console warning. 20.0.0 removes them. The Alt + Enter shortcut that opens a cell’s link is now a core grid shortcut, registered for every grid, so the plugin has nothing left for them to do.Affects: Your code calls
hot.getPlugin('formulas').registerShortcuts()or.unregisterShortcuts(), for example to re-register the shortcut after disabling and re-enabling the plugin.Do: Remove the calls. Nothing replaces them: the shortcut works on every grid, with or without the
Formulasplugin.const formulas = hot.getPlugin('formulas');formulas.disablePlugin();formulas.enablePlugin();formulas.registerShortcuts(); // Remove this line.Details: Formulas shortcut methods
- Alt + Enter still opens the link of the selected cell the same way it always did.
Four
MergedCellsCollectionmethods are deprecatedThe
MergeCellsplugin keeps aMergedCellsCollection(hot.getPlugin('mergeCells').mergedCellsCollection). ItsgetStartMostColumnIndex(),getEndMostColumnIndex(),getTopMostRowIndex(), andgetBottomMostRowIndex()methods are deprecated since 19.0.0. Each prints a one-time console warning. 20.0.0 removes all four.Affects: Your code calls one of the four methods.
Do: Remove the call. There is no replacement: selection now steps over merged cells by itself.
Details: Four MergedCellsCollection methods are deprecated
- Handsontable no longer calls these methods. They still return what they did, except that a merged cell whose rows a
filter or
trimRowshides is left out, because its coordinates point at the rows that took its place.
- Handsontable no longer calls these methods. They still return what they did, except that a merged cell whose rows a
filter or
The
sr-SPlanguage code is deprecatedIANA deprecated the
SPregion subtag, so 19.0 deprecates thesr-SPlanguage code (thesr-SP.jsfile and thesrSPdictionary) and addssr-Latn-RSwith the same phrases.sr-SPstill works in 19.x. Loading or registering the file logs nothing. A grid that uses the code, withlanguage: 'sr-SP', logs a one-time console warning: “The “sr-SP” language code will be removed in 20.0.0. Use the “sr-Latn-RS” language code instead.”Affects: Apps that set the
languageoption to'sr-SP'. Apps that only load thesr-SPfile or dictionary get no warning, but 20.0.0 removes it.Do: Load
sr-Latn-RS.js(thesrLatnRSdictionary) instead, and setlanguage: 'sr-Latn-RS'. See Language.
Also new in 19.0
These additions need no migration. The changes above point to them, and the Changelog lists the rest.
- The
ImportFileplugin reads.xlsxfiles with the built-in XLSX engine. See Import from Excel. - The built-in XLSX engine makes ExcelJS optional for an XLSX export. See XLSX export no longer needs ExcelJS.
- The
emptyValueoption picks what an emptied cell stores. In 18.1, Delete,setDataAtCell(), and a fill storednull, while clearing the editor or pasting a blank cell stored''. The option is opt-in, and the default is unchanged. See Empty cell values. undo: { maxHistory: <number> }caps the memory the undo history uses. By default, the history has no size limit, as before.manualColumnFreezeaccepts an object. SetrestoreColumnPositiontotrueto move an unfrozen column back to its place in the data source order. The default placement, right after the frozen columns, is unchanged. See column freezing.