work around minLength problem in jquery-ui-autocomplete

This commit is contained in:
Christian Weiske 2011-03-29 08:05:15 +02:00
parent 24bb9eea92
commit 407daf0bfa

View file

@ -154,6 +154,10 @@ jQuery(document).ready(function() {
source: function(request, response) {
// delegate back to autocomplete, but extract the last term
var term = extractLast(request.term);
if (term.length < this.options.minLength) {
return;
}
response(
/*
$.ui.autocomplete.filter(
@ -162,7 +166,7 @@ jQuery(document).ready(function() {
*/
$.getJSON(
"<?php echo $ajaxUrl; ?>",
{ beginsWith: extractLast(request.term) },
{ beginsWith: term },
response
)
);