Skip to content

Migrate from Handsontable 17.1 to Handsontable 18.0.

For a detailed list of changes in this release, see the Changelog.

  1. Replace handsontable/common imports

    The handsontable/common subpath is removed in version 18.0. It was never part of the official public API and was not documented, but some projects imported TypeScript types from it directly.

    All types previously available at handsontable/common are now exported from the main entry points — handsontable and handsontable/base. The new exports are a superset: every type that existed in handsontable/common is available in the new location.

    Who is affected

    You are affected if your TypeScript source files contain any of these import patterns:

    import type { ... } from 'handsontable/common';
    import { ... } from 'handsontable/common';

    How to migrate

    Replace every handsontable/common import with an import from handsontable (or handsontable/base if you use tree shaking).

    The table below lists the complete set of types that were available from handsontable/common and their new import location.

    TypeNew import
    GridSettingshandsontable
    Eventshandsontable
    HotInstancehandsontable
    ColumnSettingshandsontable
    CellPropertieshandsontable
    CellMetahandsontable
    CellValuehandsontable
    CellChangehandsontable
    ChangeSourcehandsontable
    RowObjecthandsontable
    SourceRowDatahandsontable
    NumericFormatOptionshandsontable
    SelectOptionsObjecthandsontable
    RangeTypehandsontable
    CellCoordshandsontable
    CellRangehandsontable
    IndexMapperhandsontable
    HooksRegistryhandsontable

    Before:

    import type { RowObject, CellChange, GridSettings } from 'handsontable/common';

    After:

    import type { RowObject, CellChange, GridSettings } from 'handsontable';

    Or, if you use the base module with tree shaking:

    import type { RowObject, CellChange, GridSettings } from 'handsontable/base';

    Quick fix with search and replace

    To migrate an entire project at once, run a global find-and-replace in your editor or IDE:

    Find:

    from 'handsontable/common'

    Replace:

    from 'handsontable'

    If you use double quotes:

    Find:

    from "handsontable/common"

    Replace:

    from "handsontable"

    For a full reference of all exported types and usage examples, see TypeScript types.

Summary of breaking changes

ChangeWho is affectedAction required
handsontable/common subpath removedAny project importing TypeScript types from handsontable/commonReplace from 'handsontable/common' with from 'handsontable' (or from 'handsontable/base')

Result

Your application now runs on Handsontable 18.0.