From e5fec4c78c00a6aed46b2b39f18497c058c3f515 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Tue, 22 Feb 2022 16:25:03 +0100 Subject: [PATCH] wip #5120 --- resources/js/search.js | 6 +++--- resources/views/components/search.blade.php | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/resources/js/search.js b/resources/js/search.js index 328d2cc..430fc98 100644 --- a/resources/js/search.js +++ b/resources/js/search.js @@ -14,7 +14,9 @@ export default () => ({ prefix: true, // Allow partial matches processTerm: (term, _fieldName) => term.length < 3 ? null : term.toLowerCase() }, - }, query: '', // The search query + }, + querystring: '', // The search query + query: '', // The search query medialibrary: '', // Holds URL of the media library that is passed in from the component async init() { @@ -54,8 +56,6 @@ export default () => ({ return []; } - console.log(this.query); - return this.miniSearch.search(this.query); }, diff --git a/resources/views/components/search.blade.php b/resources/views/components/search.blade.php index 86db3bf..e968a55 100644 --- a/resources/views/components/search.blade.php +++ b/resources/views/components/search.blade.php @@ -42,7 +42,8 @@ type="search" placeholder="Recherche" @keyup.enter="$el.blur()" {{-- Remove focus on enter in order to hide virtual keyboard --}} - x-model="query" + x-on:change="query=querystring" + x-model="querystring" class="appearance-none outline-none bg-white mt-8 w-full font-semibold text-6xl uppercase @@ -60,10 +61,10 @@ {{-- Search Results --}}
-
+

-- 2.39.5