From b38433a40ab7039e7058e7637180491c6ec7f406 Mon Sep 17 00:00:00 2001 From: chenhuaping <574947038@qq.com> Date: Tue, 9 Aug 2022 00:35:46 +0800 Subject: [PATCH 1/2] adjust minLength --- integration/public/javascripts/autocomplete-rails.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/public/javascripts/autocomplete-rails.js b/integration/public/javascripts/autocomplete-rails.js index 5b23fbf..670982b 100644 --- a/integration/public/javascripts/autocomplete-rails.js +++ b/integration/public/javascripts/autocomplete-rails.js @@ -61,7 +61,7 @@ search: function() { // custom minLength var term = extractLast( this.value ); - if ( term.length < 2 ) { + if ( term.length < 1 ) { return false; } }, From 4509f52aeb13483eff7e90609c7ec487c391dd95 Mon Sep 17 00:00:00 2001 From: chenhuaping <574947038@qq.com> Date: Tue, 9 Aug 2022 01:08:27 +0800 Subject: [PATCH 2/2] adjust minLength again --- lib/assets/javascripts/autocomplete-rails-uncompressed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/assets/javascripts/autocomplete-rails-uncompressed.js b/lib/assets/javascripts/autocomplete-rails-uncompressed.js index 12addcc..39e8684 100644 --- a/lib/assets/javascripts/autocomplete-rails-uncompressed.js +++ b/lib/assets/javascripts/autocomplete-rails-uncompressed.js @@ -123,7 +123,7 @@ search: function() { // custom minLength var term = extractLast( this.value ); - if ( term.length < e.min_length ) { + if ( term.length < 1 ) { return false; } },