2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-12-22 19:08:55 +00:00

Add support for custom lookup function.

This commit is contained in:
Tomas Kirda 2014-10-06 15:48:34 -05:00
parent d71867a090
commit 062e9bdacf

View File

@ -537,6 +537,15 @@
return;
}
if ($.isFunction(that.lookup)){
that.lookup(q, function (data) {
that.suggestions = data.suggestions;
that.suggest();
options.onSearchComplete.call(that.element, q, data.suggestions);
});
return;
}
if (that.isLocal) {
response = that.getSuggestionsLocal(q);
} else {