From a7d4a69898c2d147a1c59d1225ef630f0e77c493 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 9 Jul 2020 15:00:30 +0200 Subject: [PATCH] lower minimum search length to 2 characters Signed-off-by: Robin Appelman --- apps/files/js/search.js | 2 +- core/search/js/searchprovider.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/js/search.js b/apps/files/js/search.js index 4df79055f5..66899c0915 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -146,7 +146,7 @@ search.setFilter('files', function (query) { if (self.fileAppLoaded()) { self.fileList.setFilter(query); - if (query.length > 2) { + if (query.length > 1) { //search is not started until 500msec have passed window.setTimeout(function() { $('.nofilterresults').addClass('hidden'); diff --git a/core/search/js/searchprovider.js b/core/search/js/searchprovider.js index 1ba7d63b3f..efd44d2784 100644 --- a/core/search/js/searchprovider.js +++ b/core/search/js/searchprovider.js @@ -385,7 +385,7 @@ function(query) { if (lastQuery !== query) { currentResult = -1; - if (query.length > 2) { + if (query.length > 1) { self.search(query); } else { self.hideResults();