A bit more reasonable autocomplete (II)
This commit is contained in:
parent
9f5bdc3da0
commit
83355f3789
1 changed files with 4 additions and 1 deletions
|
@ -192,7 +192,10 @@ function getTagItOptions()
|
|||
var term = request.term.toLowerCase();
|
||||
var results = $.grep(this.options.availableTags, function(a)
|
||||
{
|
||||
return a.toLowerCase().indexOf(term) != -1;
|
||||
if (term.length < 3)
|
||||
return a.toLowerCase().indexOf(term) == 0;
|
||||
else
|
||||
return a.toLowerCase().indexOf(term) != -1;
|
||||
});
|
||||
if (!this.options.allowDuplicates)
|
||||
results = this._subtractArray(results, this.assignedTags());
|
||||
|
|
Loading…
Reference in a new issue