From 4390e2062ec0a6dcf02fe181292e78db8b258126 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 19 Jan 2022 18:14:41 +0100 Subject: [PATCH] wip #4804 @0.5 --- resources/js/search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/js/search.js b/resources/js/search.js index b664da3..ee3e5da 100644 --- a/resources/js/search.js +++ b/resources/js/search.js @@ -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' } -- 2.39.5