From 72b275819a434db235e0494e0c88339c256ece19 Mon Sep 17 00:00:00 2001 From: Tomas Kirda Date: Sun, 5 Mar 2017 18:37:15 -0600 Subject: [PATCH] Set params after onSearchStart has been called, closes #561 --- src/jquery.autocomplete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 620d496..a5e373c 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -558,12 +558,13 @@ ajaxSettings; options.params[options.paramName] = q; - params = options.ignoreParams ? null : options.params; if (options.onSearchStart.call(that.element, options.params) === false) { return; } + params = options.ignoreParams ? null : options.params; + if ($.isFunction(options.lookup)){ options.lookup(q, function (data) { that.suggestions = data.suggestions;