2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-09 23:01:00 +00:00

Set params after onSearchStart has been called, closes #561

This commit is contained in:
Tomas Kirda 2017-03-05 18:37:15 -06:00
parent 8d07d2cbdf
commit 72b275819a

View File

@ -558,12 +558,13 @@
ajaxSettings; ajaxSettings;
options.params[options.paramName] = q; options.params[options.paramName] = q;
params = options.ignoreParams ? null : options.params;
if (options.onSearchStart.call(that.element, options.params) === false) { if (options.onSearchStart.call(that.element, options.params) === false) {
return; return;
} }
params = options.ignoreParams ? null : options.params;
if ($.isFunction(options.lookup)){ if ($.isFunction(options.lookup)){
options.lookup(q, function (data) { options.lookup(q, function (data) {
that.suggestions = data.suggestions; that.suggestions = data.suggestions;