📚
Slickgrid-Universal
Live DemoGitHubOther Frameworks
  • Introduction
  • Getting Started
    • Quick start
    • Salesforce (LWC)
    • Vanilla Installation
  • Styling
    • Dark Mode
    • Styling CSS/SASS/Themes
  • Column Functionalities
    • Cell Menu (Action Menu)
    • Editors
      • Autocomplete
      • old Date Picker (flatpickr)
      • new Date Picker (vanilla-calendar)
      • LongText (textarea)
      • Select Dropdown Editor (single/multiple)
    • Filters
      • Input Filter (default)
      • Select Filter (dropdown)
      • Compound Filters
      • Range Filters
      • Styling Filled Filters
      • Single Search Filter
    • Formatters
    • Sorting
  • Events
    • Available events
    • On Events
  • Grid Functionalities
    • Auto-Resize / Resizer Service
    • Resize by Cell Content
    • Column Picker
    • Composite Editor Modal
    • Custom Tooltip
    • Column & Row Spanning
    • Context Menu
    • Custom Footer
    • Excel Copy Buffer Plugin
    • Export to Excel
    • Export to File (csv/txt)
    • Grid Menu
    • Grid State & Presets
    • Grouping & Aggregators
    • Header Menu & Header Buttons
    • Pagination
    • Infinite Scroll
    • Pinning (frozen) of Columns/Rows
    • Row Detail
    • Row Selection
    • Tree Data Grid
    • Row Based Editing Plugin
  • Developer Guides
    • CSP Compliance
  • Localization
    • with I18N
    • with Custom Translate Service
    • with Single Locale
  • Backend Services
    • Custom Backend Service
    • OData
    • GraphQL
      • JSON Result Structure
      • Filtering Schema
      • Pagination Schema
      • Sorting Schema
  • Migrations
    • Migration Guide to 1.x (2021-12-11)
    • Migration Guide to 2.x (2022-10-17)
    • Migration Guide to 3.x (2023-05-29)
    • Migration Guide to 4.x (2023-12-15)
    • Migration Guide to 5.x (2024-05-10)
    • Versions 6 to 8 are skipped...
    • Migration Guide to 9.x (2025-05-10)
Powered by GitBook
On this page
  • Embracing ESM-only builds ⚡ (WIP)
  • Changes
  • Column Functionalities
  • Grid Functionalities
  • Services
  • Future Changes (next major)
  1. Migrations

Migration Guide to 9.x (2025-05-10)

PreviousVersions 6 to 8 are skipped...

Last updated 12 minutes ago

Embracing ESM-only builds ⚡ (WIP)

This new release is focused around 2 things, we now ship ESM-only builds (in other words, CommonJS builds are fully dropped and only ESM will remain), this move will cut the npm download size by half. The other big change is an internal one which is an organizational one, I'm moving all framework wrappers directly into Slickgrid-Universal (Angular, Aurelia, React and Vue wrappers are now all located under the folder), this will help tremendously with the project maintenance (any new PR will now run against all frameworks all at once (catching bugs early), publishing a new version is becoming a single execution for all frameworks all at once, and finally having a single codebase to test & troubleshoot any wrapper, etc... will be so much easier to handle). Now Slickgrid-Universal name totally makes sense with this new structure change. 🌐

Wait, what happened to version 6 to 8?

I'm skipping versions 6-8 and going straight to v9.0 because some of the wrappers (Angular-Slickgrid, Aurelia-Slickgrid) were already at v8.x and so the next available major version bump for everyone is v9.0

The other great thing about having everything under the same roof/project is that every package will be released at the exact same time with the exact same versions across the board. Everything will be released under v9.0 and whenever a new feature/bugfix comes in, then every package will be bumped to v9.1 and so on (no more version discrepancies).

Major Changes - Quick Summary

  • minimum requirements bump

    • Node v20+

  • upgrade Vanilla-Calendar-Pro to v3 with

  • skipping v6-8 and going straight to v9.0

  • now using clipboard API, used in ExcelCopyBuffer/ContextMenu/CellCopy, which might requires end user permissions

  • removing Arrow pointer from Custom Tooltip addon (because it was often offset with the cell text)

Note: if you come from an earlier version, please make sure to follow each migrations in their respected order (review previous migration guides)

Changes

Removed @deprecated code

  1. colspanCallback was deprecated and removed, please use the globalItemMetadataProvider instead

gridOptions = {
- colspanCallback: this.renderDifferentColspan.bind(this),
+ dataView: {
+   globalItemMetadataProvider: {
+     getRowMetadata: this.renderDifferentColspan.bind(this)
+   }
+ }
}
  1. Row Detail changes

  • itemDetail property is removed, just use item (there's no reason to keep duplicate props)

  • parent property renamed to parentRef

  • OnRowBackToViewportRangeArgs and OnRowOutOfViewportRangeArgs were equal, so it was merged into a new OnRowBackOrOutOfViewportRangeArgs interface

export class Component {
  notifyTemplate(itemDetail: ItemDetail) {
    this.rowDetail.onAsyncResponse.notify(
-     { item: itemDetail, itemDetail },
+     { item: itemDetail },
      {}, // params
      this
    );
  }

  // `parent` renamed as `parentRef`
  callParentMethod(model: any) {
-    this.parent!.someParentFunction(`We just called Parent Method from the Row Detail Child Component on ${model.title}`);
+    this.parentRef!.someParentFunction(`We just called Parent Method from the Row Detail Child Component on ${model.title}`);
  }
}
  1. Draggable Grouping setDroppedGroups to load grid with initial Groups was deprecated and now removed, simply use initialGroupBy instead

this.gridOptions = {
  enableDraggableGrouping: true,
  // frozenColumn: 2,
  draggableGrouping: {
-   setDroppedGroups: () => ['duration', 'cost'],
+   initialGroupBy: ['duration', 'cost'],
  },
};
  1. for Header Menu, we had 2 similar events onHeaderMenuHideColumns and onHideColumns that were doing basically the same thing, so I decided to drop onHeaderMenuHideColumns

- onHeaderMenuHideColumns
+ onHideColumns

Grid Options

rowTopOffsetRenderType default is changing from 'top' to 'transform' and the reason is because transform is known to have better styling perf, especially on large dataset, and that is also what Ag-Grid uses by default.

previous default
new default

rowTopOffsetRenderType: 'top'

rowTopOffsetRenderType: 'transform'

  • if you are using Cypress to get the row X in the grid, which is what we do ourselves, then you will need to adjust your tests

Cypress before
Cypress after

cy.get([style="top: ${GRID_ROW_HEIGHT * 0}px;"])

cy.get([style="transform: translateY(${GRID_ROW_HEIGHT * 0}px);"])

OR cy.get([data-row=0])

Please note that you will have to change the default to rowTopOffsetRenderType: 'top' when using either RowSpan and/or Row Detail features.

Column Functionalities

Date Editor/Filter

Vanilla-Calendar-Pro was upgraded to v3.0 and the main breaking change is that they migrated to flat config (instead of complex object config) and this mean that if you use any of their option, then you'll have to update them to be flat.

The biggest change that you will most probably have to update is the min/max date setting when using the 'today' shortcut as shown below:

import { type VanillaCalendarOption } from '@slickgrid-universal/common';

prepareGrid() {
  this.columnDefinitions = [{
    id: 'finish', field: 'finish', name: 'Finish',
    editor: {
      model: Editors.date,
-      editorOptions: { range: { min: 'today' } } as VanillaCalendarOption,
+      editorOptions: { displayDateMin: 'today' } as VanillaCalendarOption,
    }
  }];
}

Grid Functionalities

Services

The GridService has CRUD methods that were sometime returning a single item and other times an array of items and for that reason we had to rely on code like onItemAdded.subscribe(item => { const items = Array.isArray(item) ? item : [item] }. So for that reason, I decided to change the event names to plural and always return an array of items which is a lot more predictable.

  • onItemAdded renamed to onItemsAdded

  • onItemDeleted renamed to onItemsDeleted

  • onItemUpdated renamed to onItemsUpdated

  • onItemUpserted renamed to onItemsUpserted


Future Changes (next major)

Code being Deprecated (to be removed in the future, not before another year)

You can start using new properties and options shown below in v9.0 and above.

So when I created the project, I used a few TypeScript Enums and I though this was great but it turns out that all of these Enums end up in the final transpiled JS bundle. So in the next major, I'm planning to remove most of these Enums and replace them with string literal types (type instead of enum). So you should consider using string types as much and as soon as possible in all your new grids. Note that at the moment, they are only deprecations, and will only be dropped in the future (not now, but you should still consider this for the future), for example:

columns = [{
  id: 'age', ...
- type: FieldType.number,
+ type: 'number',
}];

Note that migrating from FieldType to string types was already doable for the past couple years, so this one is far from new.

Below are a list of Enums being deprecated and you should think about migrating them eventually because they will be removed in the next major release (whenever that happens, but that won't be before another year). Note that the list below are only a summary of these deprecations and replacements.

Enum Name

from enum

to string type

Note

FileType

FieldType.boolean

'boolean'

FileType.number

'number'

-

-

-

FieldType

FileType.csv

'csv'

FileType.xlsx

'xlsx'

-

-

-

GridStateType

GridStateType.columns

'columns'

GridStateType.filters

'filters'

GridStateType.sorters

'sorters'

-

-

-

Operator

Operator.greaterThan

'>'

Operator.lessThanOrEqual

'<='

Operator.contains

'Contains' or 'CONTAINS'

Operators are written as PascalCase

Operator.equal

'EQ'

Operator.rangeExclusive

'RangeExclusive'

-

-

-

SortDirection

SortDirection.ASC

'ASC' or 'asc'

SortDirection.DESC

'DESC' or 'desc'

-

-

-

deprecating editorOptions and filterOptions, they are being renamed as options

in order to make it easier to merge and simplify editor/filter options, I'm merging them into a single options property which will make it more easily transportable (you will be able to reuse the same options for both the editor/filter if need be). You can start using options in v9.0 and above.

import { type MultipleSelectOption } from '@slickgrid-universal/common';

columnDefinitions = [{
  id: 'duration', field: 'duration', name: 'Duration',
  editor: {
-   editorOptions: {
+   options: {
      maxHeight: 250, useSelectOptionLabelToHtml: true,
    } as MultipleSelectOption,
  },
  filter: {
-   filterOptions: {
+   options: {
      maxHeight: 250, useSelectOptionLabelToHtml: true,
    } as MultipleSelectOption,
  }
}];

[!NOTE] for a complete list of option changes, visit the Vanilla-Calendar-Pro page, which details every single options with their new option names.

See list for all available opeators

migration
frameworks/
flat config
Operator