Accept tags consisting of only two letters, too.
This commit is contained in:
parent
0a55730696
commit
1f7fe35cec
@ -29,7 +29,7 @@ class ProvideAutoSuggest extends JSONController
|
|||||||
{
|
{
|
||||||
$data = array_unique(explode(' ', urldecode($_REQUEST['data'])));
|
$data = array_unique(explode(' ', urldecode($_REQUEST['data'])));
|
||||||
$data = array_filter($data, function($item) {
|
$data = array_filter($data, function($item) {
|
||||||
return strlen($item) >= 3;
|
return strlen($item) >= 2;
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->payload = ['items' => []];
|
$this->payload = ['items' => []];
|
||||||
|
@ -69,7 +69,7 @@ AutoSuggest.prototype.onType = function(input, event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var tokens = input.value.split(/\s+/).filter(function(token) {
|
var tokens = input.value.split(/\s+/).filter(function(token) {
|
||||||
return token.length >= 3;
|
return token.length >= 2;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (tokens.length === 0) {
|
if (tokens.length === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user