]> _ Git - odl.git/commitdiff
wip #4804 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jan 2022 17:14:41 +0000 (18:14 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 19 Jan 2022 17:14:41 +0000 (18:14 +0100)
resources/js/search.js

index b664da393a650e4e943627a4ba98af5fa6c71ed9..ee3e5dac92f6107090b0556a125b519acadd360f 100644 (file)
@@ -23,7 +23,7 @@ export default () => ({
     },
 
     get results() {
-        if (this.query === '') {
+        if (this.query.length < 3) {
             return [];
         }
 
@@ -34,6 +34,9 @@ export default () => ({
     },
 
     get resultCount() {
+        if (this.query.length < 3) {
+            return "Veuillez taper au moins 3 caractères";
+        }
         if (this.results.length === 1) {
             return '1 résultat'
         }