]> _ Git - odl.git/commitdiff
wip #5120 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 16:39:47 +0000 (17:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 16:39:47 +0000 (17:39 +0100)
resources/js/search.js

index d97645bac8064dbd73e43ce6b852d04141e36074..24c1803bc39b2f24bdd5f4ec06742d2d373c59b0 100644 (file)
@@ -14,8 +14,7 @@ export default () => ({
             prefix: true, // Allow partial matches
             processTerm: (term, _fieldName) => term.length < 3 ? null : term.toLowerCase()
         },
-    },
-    query: '', // The search query
+    }, query: '', // The search query
     medialibrary: '', // Holds URL of the media library that is passed in from the component
 
     async init() {
@@ -24,7 +23,7 @@ export default () => ({
 
         // Delay miniSearch initialisation so there's less chance of animations stuttering during page loads
         setTimeout(() => {
-            this.miniSearch = new MiniSearch(this.setup);
+            window.minisearch = this.miniSearch = new MiniSearch(this.setup);
             this.miniSearch.addAllAsync(minisearchodl);
         }, 4000);