Skip to content

Migrating to v2.0

This guide covers every breaking change introduced in v2.0 of @revolist/revogrid-pro and @revolist/revogrid-enterprise, and explains what to update in your codebase.


  1. Upgrade @revolist/revogrid core to ^4.21.4
  2. Replace all sub-path imports with flat imports from @revolist/revogrid-pro
  3. Replace hardcoded event strings with named constants from @revolist/revogrid-pro
  4. Import revogrid-pro.css in your application entry point
  5. Update custom plugins to extend CorePlugin instead of BasePlugin
  6. Add @revolist/revogrid-pro as a dependency when using Enterprise
  7. Move Pivot and Gantt imports to @revolist/revogrid-enterprise

v2.0 requires @revolist/revogrid 4.21.4 or later. Earlier core versions are not supported.

Terminal window
npm install @revolist/revogrid@^4.21.4
# or
pnpm add @revolist/revogrid@^4.21.4

v1.x supported sub-path imports that pointed to internal modules. These paths are removed in v2.0. All exports are now available from the single package entry point.

import { commonAggregators } from '@revolist/revogrid-pro/aggregations';
import { CorePlugin } from '@revolist/revogrid-pro/core';
import { FOCUS_APPLY_EVENT } from '@revolist/revogrid-pro/events';
import { createMergedData } from '@revolist/revogrid-pro/utils';

v2.0 exports more than 135 named event constants. Replace every hardcoded event string with the corresponding export to benefit from type checking and rename refactoring.

grid.addEventListener('beforecellfocus', handler);
grid.addEventListener('beforefocuslost', handler);
grid.addEventListener('beforekeydown', handler);
grid.addEventListener('aftersourceset', handler);

The full list of available constants is exported from @revolist/revogrid-pro.


Starting in v2.0, the Pro plugin styles are not injected automatically. You must import the stylesheet once in your application entry point.

// main.ts (or your app entry)
import '@revolist/revogrid-pro/dist/revogrid-pro.css';

If you are also using Enterprise, import its stylesheet separately:

import '@revolist/revogrid-enterprise/dist/revogrid-enterprise.css';

In v2.0 the recommended base class for all Pro plugins changed from BasePlugin (re-exported from @revolist/revogrid) to CorePlugin (exported from @revolist/revogrid-pro). CorePlugin adds:

  • observeAttribute(name, callback) — reacts to DOM attribute mutations
  • observeProperty(name, callback) — reacts to direct JS property assignments
import { BasePlugin } from '@revolist/revogrid';
export class MyPlugin extends BasePlugin {
constructor(grid, providers) {
super(grid, providers);
// plugin setup
}
}

6. Enterprise — install Pro as a dependency

Section titled “6. Enterprise — install Pro as a dependency”

@revolist/revogrid-enterprise now requires @revolist/revogrid-pro as a runtime dependency. If you only had Enterprise installed, add Pro explicitly.

Terminal window
npm install @revolist/revogrid-pro @revolist/revogrid-enterprise
# or
pnpm add @revolist/revogrid-pro @revolist/revogrid-enterprise

Ensure both packages are on the same version (they are always released together).


In v1.x, Pivot and Gantt plugins were part of @revolist/revogrid-pro. They now live exclusively in @revolist/revogrid-enterprise.

import { PivotPlugin, PivotConfig } from '@revolist/revogrid-pro';
import { GanttPlugin } from '@revolist/revogrid-pro';

Pro and Enterprise are always released with the same version number (lockstep semver).

Change typeVersion bump
Breaking API/behavior changeMajor (2.0.0 → 3.0.0)
New plugin or feature (backward-compatible)Minor (2.0.0 → 2.1.0)
Bug fixPatch (2.0.0 → 2.0.1)

The RevoGrid core package (@revolist/revogrid) versions independently — always check its changelog when upgrading core alongside Pro/Enterprise.