-
-
Notifications
You must be signed in to change notification settings - Fork 31
Migration to 1.x
- removed
columns
from Column Picker option, usevisibleColumns
instead. - removed
columns
from Grid Menu option, usevisibleColumns
instead. - removed
findItemInHierarchicalStructure()
method, usefindItemInTreeStructure
instead.
- replace Grid Menu
customItems
bycommandItems
, see here - remove all images in favor of css classes, see here
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
- replace
customItems
bycommandItems
- replace
customTitle
bycommandTitle
- replace
customTitleKey
bycommandTitleKey
Another change due to the rewrite, all images related code in favor of css classes.
- 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 with the following background-image: url(images/my-image.gif);
- 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