]> _ Git - odl.git/commitdiff
wip #5120 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 15:29:11 +0000 (16:29 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 22 Feb 2022 15:29:11 +0000 (16:29 +0100)
resources/js/search.js
resources/views/components/search.blade.php

index 430fc98e297062122714189684ab95e764e4054e..93e55d76391af45f027f3146d1a524eceac0d8d8 100644 (file)
@@ -51,6 +51,10 @@ export default () => ({
         return `<a href="${URL}" class="${classes}" ${attributes}>${result.title}</a>`;
     },
 
+    doSearch(){
+        this.query=this.querystring;
+    },
+
     get results() {
         if (this.query.length < 3) {
             return [];
index e968a557dd5fd65c85e7d5afb9cc4b2b3b9dd021..da8c7384a54b2c41bfa947e1aa6dfbab4b366a19 100644 (file)
@@ -42,7 +42,7 @@
                 type="search"
                 placeholder="Recherche"
                 @keyup.enter="$el.blur()" {{-- Remove focus on enter in order to hide virtual keyboard --}}
-                x-on:change="query=querystring"
+                @change="doSearch"
                 x-model="querystring"
                 class="appearance-none outline-none bg-white
                        mt-8 w-full