2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-25 22:27:39 +00:00

Allow callback function to be set as lookup in options. Fixes #227

This commit is contained in:
Tomas Kirda 2014-11-24 19:36:47 -06:00
parent 05a337cba9
commit 805b45ccb7

View File

@ -541,8 +541,8 @@
return; return;
} }
if ($.isFunction(that.lookup)){ if ($.isFunction(options.lookup)){
that.lookup(q, function (data) { options.lookup(q, function (data) {
that.suggestions = data.suggestions; that.suggestions = data.suggestions;
that.suggest(); that.suggest();
options.onSearchComplete.call(that.element, q, data.suggestions); options.onSearchComplete.call(that.element, q, data.suggestions);