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:
parent
d71867a090
commit
062e9bdacf
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user