Migrating Apex Grid v4 to v5

Apex Grid 5.0 is a major release that removes what 4.2.0 deprecated, plus the setup({ theme }) option. 5.0 itself changes nothing else: an app that uses none of the names below upgrades without edits. Later 5.x releases add the behaviour changes listed under Other changes you may notice. This guide lists what to delete when upgrading from 4.x, the 4.2 changes you may notice coming from 4.1 or earlier, then what is new up to 5.3. apex-grid-enterprise 0.10 ships alongside it and needs it (see Enterprise 0.10 and 0.11).

At a glance

Areav4v5
Toolbar placeholder, debounceDeprecated in 4.2; the grid never set themRemoved. Use the toolbar.searchPlaceholder locale key; the quick filter always waits 200 ms
Paginator pageSizeLabel (page-size-label)Deprecated in 4.2; the grid never set itRemoved. Use the pagination.rowsPerPage locale key
Locale keys filter.filter, chart.placeholder, ai.answer, formula.error.*Deprecated in 4.2; nothing rendered themRemoved from EN_LOCALE, esLocale and GridLocaleKey
setup({ theme })Warned once and did nothingRemoved from ApexGridSetupOptions
dataPipelineConfigurationTyped as always setTyped optional, undefined until assigned
apex-grid-enterprise0.9 on apex-grid 40.10 on ^5.0.0, 0.11 on ^5.1.0

Install

npm install apex-grid@^5.0.0
# with the enterprise package
npm install apex-grid@^5.1.0 apex-grid-enterprise@^0.11.0

apex-grid-enterprise 0.10 requires apex-grid@^5.0.0, and 0.11 requires ^5.1.0, which adds the locale keys its floating panels use, so upgrade both together. Its apexcharts, lit and @lit/context peer ranges are unchanged.

Toolbar and paginator properties

<apex-grid-toolbar> loses its placeholder and debounce properties and attributes, and <apex-grid-paginator> loses pageSizeLabel (attribute page-size-label). The grid never set them on the toolbar and paginator it renders, so they changed nothing on a grid's own chrome. Delete them, and set the text through the grid's localeText:

grid.localeText = {
  'toolbar.searchPlaceholder': 'Find a customer…',
  'pagination.rowsPerPage': 'Rows',
};

The quick filter always waits 200 ms after the last keystroke before it applies the term, and there is no setting for the wait. A term set from code, with setQuickFilter() or by assigning quickFilter, applies at once. See Quick Filter and Localization.

Removed locale keys

filter.filter, chart.placeholder, ai.answer, formula.error.ref, formula.error.name, formula.error.div0, formula.error.value and formula.error.cycle are gone from EN_LOCALE, esLocale and the GridLocaleKey type. Nothing rendered them, so deleting them changes no text. A localeText object that sets one stops compiling in TypeScript, since localeText is typed GridLocaleText; delete the key.

The formula parse errors have their own keys since 4.2, one per error under formula.parse.*. See Localization.

setup no longer takes theme

ApexGridSetupOptions.theme is removed. It has done nothing since 3.5.0, when the Ignite UI dependency was dropped, apart from a console warning. TypeScript now reports it as an unknown option, and a leftover theme in JavaScript is ignored without the warning.

- setup({ theme: 'bootstrap' });
+ setup();

hostStyles and tokenStyles are unchanged. See Installation and Usage.

dataPipelineConfiguration is optional

ApexGrid.dataPipelineConfiguration is typed optional, matching its runtime default of undefined. With strictNullChecks, code that reads a hook off it without a guard stops compiling. Use optional chaining:

const sortHook = grid.dataPipelineConfiguration?.sort;

Assigning it works as before, and the hooks are called with the same receiver.

Changes from 4.2 you may notice

4.2.0 shipped no breaking change, but an app coming from 4.1 or earlier may notice:

  • The grid chrome is sized in px. The toolbar, paginator, header actions, filter row, column menu, and expand and tree toggles used to follow the page's root font size, so on a page with html { font-size: 62.5% } the 24px targets shrank to 15px. They now keep their designed size on any root, as cells, text and row heights already did. That includes a reader who raised the browser's default font size: the chrome no longer grows with it. At the usual 16px root nothing changes. The enterprise popups and panels follow in 0.11.
  • esLocale uses one register. It addresses the user as usted and calls the grid "tabla" throughout, and seven chart and AI hints are reworded. Tests that match Spanish strings may need updating.
  • More text has locale keys: the chart title, the trend and forecast series names, and the formula parse errors. Each English default is the text shown before.

Other changes you may notice

  • grid.sort() and grid.clearSort() on a rendered grid animate the rows to their new order, as a header click does (5.2). A sort assigned through sortExpressions or restored with setState() still applies without motion, and the calls still fire no events.
  • With row recycling, a row moved by a scroll step renders its new record before its elements reconnect (5.1), so a custom element in a cell template that reads its data in connectedCallback builds for the right row. See Cell Template.
  • Sparkline cells have an accessible name, such as "5 values, 12 to 23, up 92%", and the visible delta label is hidden from screen readers (5.1).
  • A row expanded or pinned before the grid first renders is no longer announced in the live region (5.3). Later changes are announced as before.
  • With sortConfiguration.triState: false, a header sorted descending reads "Sorted descending. Activate to sort ascending." (5.3, key header.sortedDescendingToggle).

Framework wrappers

  • React. No react-apex-grid 0.1.x release accepts apex-grid 5 (0.1.2 accepts ^3.5.0 || ^4.0.0), so upgrade it to 0.2.0 or later, which accepts ^5.0.0 too. 0.2.0 removed the ApexGridToolbar and ApexGridPaginator components (configure the grid's own toolbar and paginator with showQuickFilter, showExport and pagination), and passing a read-only member such as totalItems as a prop is a type error. 0.3.0 adds the react-apex-grid/enterprise entry for apex-grid-enterprise 0.10 and later. See React.
  • Blazor. Blazor-ApexGrid 1.3.0 bundles apex-grid 5.0.0 (1.2.x bundled 4.0). Nothing a .NET caller uses is removed.
  • Vue and Angular use the element directly, so only the apex-grid version changes.

New since 4.1

  • exportFilename (export-filename) names the file the toolbar export menu downloads (4.2). See Exporting.
  • More type exports: BadgeVariant, StatusVariant, ColumnDateFormat, ColumnSelectOption and ToolbarAction (4.2), ColumnSparklineConfiguration (5.1), and ColumnProgressConfiguration, ProgressTier and SortOptions (5.3). apex-grid/custom-elements.json is exported for tools that read the Custom Elements Manifest (4.2).
  • sparkline.label replaces a sparkline column's accessible name, and the cell.sparkline* locale keys word the default (5.1). See Column Types.
  • progress on progress columns sets the label beside the bar and its good, watch and risk tiers, with --ag-progress-* tokens for the fills and label (5.3). See Column Types.
  • Header text tokens --ag-header-text, --ag-header-text-muted and --ag-header-text-active (and their --ag-dark-* forms) color the header apart from the body, for a dark header band on a light body (5.3). See Styles & Themes.
  • grid.sort(expressions, { replace: true }) replaces the current sort in one change and one row animation, where clearSort() then sort() took two (5.3). See Data Sorting.

Enterprise 0.10 and 0.11

apex-grid-enterprise 0.10.0 was released with apex-grid 5.0.0, now its minimum, and 0.11.0 needs apex-grid 5.1.0 or later.

Also new in 0.10 and 0.11: a Custom Elements Manifest (apex-grid-enterprise/custom-elements.json), and groupExpanding and groupExpanded in ApexGridEnterpriseEventMap.

Removed AI names

0.10 removes the AI names 0.9.1 deprecated. Nothing in the AI layer implemented or called them:

  • createFakeGridApi and FakeGridApiInit, a test double exported by mistake. Implement the GridApi interface directly instead.
  • GridApi.editCell, GridApi.renderChart, and the CellTarget and ChartRequest types.

The published type declarations no longer import @anthropic-ai/sdk, so a TypeScript app with skipLibCheck off type-checks without the optional SDK installed. buildControlRequest and buildAskRequest return the new ClaudeRequest type. SDK 0.73.0 and later accept it as a messages.create body. With an older SDK, passing it to messages.create yourself is a type error; use createClaudeReasoner, which builds and sends the request, instead. Reading SDK-only fields off a built request is a type error too. See AI Toolkit.

Floating panels in 0.11

  • The floating chart and Ask AI panels can be moved and resized from the keyboard: Tab to the Move panel button in the header or the Resize panel grip in the bottom corner and use the arrow keys (10px steps, Shift for 50px). The controls are the move-handle and resize-handle CSS parts.
  • The chart panel's native resize corner is replaced by the grip, which takes the same pointer drag, and the Ask AI panel can be resized too.
  • Dragging a panel by its header stops at the viewport edge, and only the primary mouse button drags. Panels never shrink below 240 by 120px, and the Ask AI panel is at most 92% of the viewport height.
  • The status bar, tool panel, filter builder, set filter, context menu and both panels size their text and spacing in px, like the core chrome since 4.2.

Coming from 0.9.0

0.9.1, released with apex-grid 4.2.0, changed a few things apps can notice:

  • The floating chart and Ask AI panels are non-modal: Tab moves on in page order, F6 moves focus between the grid and its open panels, and each panel header has a Back to grid button (part back-to-grid).
  • Group header and grand total aggregate chips read like the status bar: salary sum: 1234567.50 becomes Salary Sum: 1,234,567.5. Apps or tests that read the chip text will notice.
  • The set filter's blanks entry shows and sorts by its localized label, and distinctValues[].label carries that label. Match on the setFilter.blanks text instead of (Blanks).
  • The context menu Copy writes the same text as copying a one-cell range.
  • Pivoting turns on only when at least one measure has an aggregation function. pivotValues such as { amount: [] } no longer swaps in the pivot columns or clears groupBy, and removing the last function from an active pivot turns it off and restores the columns.
  • @anthropic-ai/sdk is an optional peer, so an app that imports apex-grid-enterprise without the SDK installed builds with Vite and runs under the Vite dev server. Nothing is installed automatically, and an SDK older than 0.40.0 gets a peer range warning.