]> BookStack Code Mirror - bookstack/blobdiff - resources/js/components/shelf-sort.js
Updated a whole load more js components
[bookstack] / resources / js / components / shelf-sort.js
index 30eda5a21f7cf920fc99f254ac051b3e36b79408..aa244086e88a173878c3dcf2c8aacd272ae4a1a6 100644 (file)
@@ -1,6 +1,7 @@
 import Sortable from "sortablejs";
+import {Component} from "./component";
 
-class ShelfSort {
+export class ShelfSort extends Component {
 
     setup() {
         this.elem = this.$el;
@@ -15,7 +16,7 @@ class ShelfSort {
 
     initSortable() {
         const scrollBoxes = this.elem.querySelectorAll('.scroll-box');
-        for (let scrollBox of scrollBoxes) {
+        for (const scrollBox of scrollBoxes) {
             new Sortable(scrollBox, {
                 group: 'shelf-books',
                 ghostClass: 'primary-background-light',