-
-
Notifications
You must be signed in to change notification settings - Fork 120
Migration to 5.x
Bye Bye jQueryUI... welcome SortableJS
NOTE: if you come from an earlier version, it is very important that you follow the migrations in order
- upgrade
aurelia-i18n
to major version>=4.0.0
- replaced jQueryUI with SortableJS
- follow changes to Kraaden Autocomplete
Since we removed jQueryUI and we were using jQueryUI Slider for the Filters.SliderRange
, we had to remove the Slider Range since we don't have a replacement at the moment, though it might come in the future.
-
exportOptions
was renamed totextExportOptions
-
enableExport
was renamed toenableTextExport
Since we replaced the jQueryUI Autocomplete with Kraaden Autocomplete (see below) and for that reason we removed a few unnecessary SASS/CSS variables that are no longer necessary and were removed.
$slick-autocomplete-box-shadow
$slick-autocomplete-border-radius
$slick-autocomplete-hover-color
$slick-autocomplete-hover-border-color
$slick-autocomplete-loading-input-bg-color
$slick-autocomplete-min-width
$slick-autocomplete-overflow-x
$slick-autocomplete-overflow-y
$slick-autocomplete-text-color
$slick-autocomplete-text-overflow
$slick-autocomplete-text-padding
Since we removed jQueryUI, you need to remove it from your angular.json
and anywhere else that it might reference it
# angular.json
{
// ...
"allowedCommonJsDependencies": [
"assign-deep",
+ "autocompleter",
"dompurify",
"excel-builder-webpacker",
"flatpickr",
"jquery",
- "jquery-ui",
"stream"
],
// ...
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
- "node_modules/jquery-ui/dist/jquery-ui.min.js",
- "node_modules/slickgrid/lib/jquery.event.drag-2.3.0.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"node_modules/multiple-select-modified/src/multiple-select.js"
],
### Text Export Service
Here's an example of the code change that you need to do
```diff
this.gridOptions = {
- enableExport: true,
- exportOptions: {
+ enableTextExport: true,
+ textExportOptions: {
sanitizeDataExport: true
},
Replaced JqueryUI Autocomplete with Kraaden Autocomplete
Since we removed, and no longer use jQueryUI, we had to find an alternative to the AutoComplete Editor/Filter and we settled on the 3rd party lib Kraaden Autocomplete which does everything that the jQueryUI one was doing. There are subtle changes which only requires couple line of changes.
You will notice that the model
change is nearly the same, there are 2 chars that are different (a lower c
and a r
at the end forms the new word autocompleter
)
If you were using the Autocomplete onSelect
callback, it got renamed to onSelectItem
. If you were using openSearchListOnFocus
, then that is now simply showOnFocus
with the Kraaden Autocomplete (refer to Kraaden Autocomplete options, to use them in editorOptions
or filterOptions
)
import {
- AutocompleteOption,
+ AutocompleterOption,
} from '@slickgrid-universal/common';
prepareGrid() {
this.columnDefinitions = [{
id: 'cityOfOrigin', name: 'City of Origin', field: 'cityOfOrigin',
filterable: true,
editor: {
- model: Editors.autoComplete,
+ model: Editors.autocompleter,
editorOptions: {
minLength: 3,
forceUserInput: true,
- source: (request, response) => {
+ fetch: (searchText, updateCallback) => {
$.ajax({
url: 'http://gd.geobytes.com/AutoCompleteCity',
dataType: 'jsonp',
data: {
- q: request.term
+ q: searchText
},
success: (data) => {
- response(data);
+ updateCallback(data);
}
});
}
- } as AutocompleteOption,
+ } as AutocompleterOption,
filter: {
- model: Filters.autoComplete,
+ model: Filters.autocompleter,
filterOptions: {
// ... the rest is the same as the Editor
}
}
}
}
Contents
- Angular-Slickgrid Wiki
- Installation
- Styling
- Interfaces/Models
- Testing Patterns
- Column Functionalities
- Global Grid Options
- Localization
- Events
- Grid Functionalities
- Auto-Resize / Resizer Service
- Resize by Cell Content
- Composite Editor
- Context Menu
- Custom Tooltip
- Add/Delete/Update or Highlight item
- Dynamically Change Row CSS Classes
- Excel Copy Buffer
- Export to Excel
- Export to File (CSV/Txt)
- Grid State & Presets
- Grouping & Aggregators
- Row Detail
- SlickGrid Controls
- SlickGrid Plugins
- Pinning (frozen) of Columns/Rows
- Tree Data Grid
- SlickGrid & DataView objects
- Addons (controls/plugins)
- Backend Services