Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 69f14de

Browse files
committed
fix: load SortableJS via angular.json instead of component
1 parent af58ea1 commit 69f14de

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"node_modules/jquery/dist/jquery.min.js",
6464
"node_modules/slickgrid/lib/jquery.event.drag-2.3.0.js",
6565
"node_modules/bootstrap/dist/js/bootstrap.min.js",
66-
"node_modules/multiple-select-modified/src/multiple-select.js"
66+
"node_modules/multiple-select-modified/src/multiple-select.js",
67+
"node_modules/sortablejs/Sortable.min.js"
6768
],
6869
"vendorChunk": true,
6970
"extractLicenses": false,

src/app/modules/angular-slickgrid/components/angular-slickgrid.component.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import 'slickgrid/dist/slick.core.min';
33
import 'slickgrid/dist/slick.interactions.min';
44
import 'slickgrid/dist/slick.grid.min';
55
import 'slickgrid/dist/slick.dataview.min';
6-
import * as Sortable_ from 'sortablejs';
7-
const Sortable = ((Sortable_ as any)?.['default'] ?? Sortable_); // patch for rollup
86

97
// ...then everything else...
108
import { AfterViewInit, ApplicationRef, ChangeDetectorRef, Component, ElementRef, Inject, Input, OnDestroy, Optional, } from '@angular/core';
@@ -79,9 +77,6 @@ import { ContainerService } from '../services/container.service';
7977
// using external non-typed js libraries
8078
declare const Slick: SlickNamespace;
8179

82-
// add Sortable to the window object so that SlickGrid lib can use globally
83-
(window as any).Sortable = Sortable;
84-
8580
@Component({
8681
selector: 'angular-slickgrid',
8782
templateUrl: './angular-slickgrid.component.html',

0 commit comments

Comments
 (0)