From: Vincent Vanwaelscappel Date: Tue, 22 Feb 2022 16:39:47 +0000 (+0100) Subject: wip #5120 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=69aa670effacdbfdb8505519a7587bf8d55a73b7;p=odl.git wip #5120 @0.5 --- diff --git a/resources/js/search.js b/resources/js/search.js index d97645b..24c1803 100644 --- a/resources/js/search.js +++ b/resources/js/search.js @@ -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);