-
-
Notifications
You must be signed in to change notification settings - Fork 31
Migration to 1.x
-
removed
columns
from Column Picker options, usevisibleColumns
instead. -
removed
columns
from Grid Menu options, usevisibleColumns
instead. -
removed
findItemInHierarchicalStructure()
method, usefindItemInTreeStructure
instead. -
controls/plugins (extensions)... read below for more info
Since all SlickGrid controls/plugins were rewritten and moved into Slickgrid-Universal (prior to the new release, we were using them from SlickGrid repo and we had Extension bridges in Slickgrid-Universal but now all the code exist in Slickgrid-Universal), they were also rewritten as plain vanilla JS (basically there's no more jQuery code with exception of Draggable Grouping which still require jQueryUI).
Because of all the rewriting, it makes sense to rename the method getSlickgridAddonInstance
to getExtensionInstanceByName
and it now return the instance directly and it also automatically infers the correct return instance class as well.
Here's an example of the code change that you need to do
toggleGridMenu(e: Event) {
if (this.sgb?.extensionService) {
- const gridMenuInstance = this.sgb.extensionService.getSlickgridAddonInstance(ExtensionName.gridMenu); // return type was `any`
+ const gridMenuInstance = this.sgb.extensionService.getExtensionInstanceByName(ExtensionName.gridMenu); // return type now infers `SlickGridMenu` instance
gridMenuInstance.showGridMenu(e);
}
}
Replace all custom properties to command properties to align with all other menu plugins (CellMenu, ContextMenu, GridMenu, HeaderMenu all use commands)
- replace
customItems
bycommandItems
- replace
customTitle
bycommandTitle
- replace
customTitleKey
bycommandTitleKey
Another change due to the rewrite, all images related code were removed in favor of css classes that already existed.
- removed
deleteIconImage
, usedeleteIconCssClass
instead. - removed
groupIconImage
, usegroupIconCssClass
instead. - removed
buttonImage
, usebuttonCssClass
instead. - removed
iconImage
, useiconCssClass
instead - removed
image
, usecssClass
instead
If you really want to use image, you can still do it but you'll have to create a CSS class similar to this:
background-image: url(images/my-image.gif);
- prefix to avoid conflicts with other frameworks (as for CSS variables they were already including this prefix, so no change there)
To simply and merge all menu styling together, all the following CSS class names got changed with what is shown below
- rename
title
toslick-menu-title
(to avoid other framework conflicts) - rename
slick-cell-menu-command-list
toslick-menu-command-list
- rename
slick-cell-menu-option-list
toslick-menu-option-list
- rename
slick-cell-menu-item
toslick-menu-item
- rename
slick-cell-menu-content
toslick-menu-content
- rename
slick-context-menu-command-list
toslick-menu-command-list
- rename
slick-context-menu-option-list
toslick-menu-option-list
- rename
slick-context-menu-item
toslick-menu-item
- rename
slick-context-menu-content
toslick-menu-content
- rename
slick-header-menu-item
toslick-menu-item
- rename
slick-header-menu-content
toslick-menu-content
- rename
slick-grid-menu-item
toslick-menu-item
- rename
slick-grid-menu-content
toslick-menu-content
- rename
slick-grid-menu-command-list
toslick-menu-command-list
- rename
slick-grid-menu-option-list
toslick-menu-option-list
- rename
slick-grid-menu-list
toslick-column-picker-list
- rename
slick-columnpicker
toslick-column-picker
- rename
slick-columnpicker-list
toslick-column-picker-list
NOTE: for simplification, it also means all SASS/CSS variables got merged as well (e.g.: $slick-cell-menu-item-disabled-color
got merged to common $slick-menu-item-disabled-color
), another change is for all the Grid Menu column picker variables also got merged and we kept the (e.g.: $slick-grid-menu-checkbox-icon-checked
is now $slick-column-picker-checkbox-icon-checked
for both extensions)
- Slickgrid-Universal Wikis
- Installation
- Styling
- Interfaces/Models
- Column Functionalities
- Events
- Grid Functionalities
- Auto-Resize / Resizer Service
- Resize by Cell Content
- Column Picker
- Composite Editor Modal
- Custom Tooltip
- Context Menu
- Custom Footer
- Export to Excel
- Export to File (csv/txt)
- Grid Menu
- Grid State & Presets
- Grouping & Aggregators
- Header Menu & Header Buttons
- Pinning (frozen) of Columns/Rows
- Row Selection
- Tree Data Grid
- SlickGrid & DataView objects
- Backend Services