]> source.dussan.org Git - nextcloud-server.git/commitdiff
lower minimum search length to 2 characters 21777/head
authorRobin Appelman <robin@icewind.nl>
Thu, 9 Jul 2020 13:00:30 +0000 (15:00 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 9 Jul 2020 13:00:30 +0000 (15:00 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files/js/search.js
core/search/js/searchprovider.js

index 4df79055f5c563a729150e1bb9c18591c2f3926d..66899c0915063ccfd9da533a8a0e03f61cb21c09 100644 (file)
                        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');
index 1ba7d63b3fe92fd6e58c7852f9580164389030f9..efd44d2784ad15b719d87c25667c4fbbedfa2811 100644 (file)
                                function(query) {
                                        if (lastQuery !== query) {
                                                currentResult = -1;
-                                               if (query.length > 2) {
+                                               if (query.length > 1) {
                                                        self.search(query);
                                                } else {
                                                        self.hideResults();