mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-22 12:55:12 +00:00
Add support for custom lookup function.
This commit is contained in:
parent
d71867a090
commit
062e9bdacf
@ -537,6 +537,15 @@
|
|||||||
return;
|
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) {
|
if (that.isLocal) {
|
||||||
response = that.getSuggestionsLocal(q);
|
response = that.getSuggestionsLocal(q);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user