-
-
Notifications
You must be signed in to change notification settings - Fork 12
Migration to 3.x
In our previous v2.0 release, we dropped jQueryUI and now in v3.0 we are going even further and are now dropping jQuery entirely. You can still use jQuery but it's no longer a dependency. There are multiple benefits in dropping jQuery and go the vanilla route, the biggest advantages are:
- it should provide better performance (browser native)
- build size should be smaller (see table below)
- minimum requirements
- React
>=18.0.0
- i18next
>=22.5.0
- React
- we dropped jQuery requirement
- it also required us to rewrite the
multiple-select
(jQuery based lib) into a brand newmultiple-select-vanilla
lib which is now native and has zero dependency
- it also required us to rewrite the
Replaced multiple-select
with multiple-select-vanilla
This change was required because the previous library was a jQuery based lib, so I rewrote the lib as a new native lib to drop jQuery. However with this change, there were a couple of options that were dropped and/or modified.
// you can load `MultipleSelectOption` from either the new Multiple-Select-Vanilla lib or from Slickgrid-React (which is a re-export)
import { MultipleSelectOption } from 'slickgrid-react'; // still works, but is a re-export of the import shown below
+ import { MultipleSelectOption } from 'multiple-select-vanilla'; // preferred
filterOptions: {
- autoDropWidth: true, // removed and no longer required
} as MultipleSelectOption
The new lib also offers a bunch of new options as well, you can see the full interface at MultipleSelectOption
If you use any of the Slickgrid-Universal extra dependencies then make sure to upgrade them to the new major 3.0.0
version so that they work with Slickgrid-React 3.0.0
"dependencies": {
- "@slickgrid-universal/excel-export": "^2.6.4",
+ "@slickgrid-universal/excel-export": "^3.0.0",
- "slickgrid-react": "^2.6.4",
+ "slickgrid-react": "^3.0.0",
}
For better TypeScript support, we now recommend to use either editorOptions
or filterOptions
depending if it's an Editor or a Filter.
this.columnDefinitions = [{
id: 'cost', name: 'Cost', field: 'cost',
editor: {
model: Editors.slider,
- params: { hideSliderNumber: false }
+ editorOptions: { hideSliderNumber: false } as SliderOption
},
filter: {
model: Filters.slider,
- params: { hideSliderNumber: false }
+ filterOptions: { hideSliderNumber: false } as SliderOption
},
and that's about it, the migration is relatively simple as you can see :)
While comparing with the folder properties with "size on disk" on Windows, we're averaging 4-5% smaller size in our new release by removing jQuery with this new release.
Contents
- Slickgrid-React Wiki
- Installation
- Styling
- Interfaces/Models
- Column Functionalities
- Global Grid Options
- Localization
- Events
- Grid Functionalities
- Auto-Resize / Resizer Service
- Resize by Cell Content
- Add/Delete/Update or Highlight item
- Dynamically Change Row CSS Classes
- Column Picker
- Composite Editor Modal
- Context Menu
- Custom Tooltip
- Excel Copy Buffer
- Export to Excel
- Export to File (CSV/Txt)
- Grid Menu
- Grid State & Presets
- Grouping & Aggregators
- Header Menu & Header Buttons
- Header Title Grouping
- Pinning (frozen) of Columns/Rows
- Row Colspan
- Row Detail
- Row Selection
- Tree Data Grid
- SlickGrid & DataView objects
- Addons (controls/plugins)
- Backend Services