Skip to content

Commit

Permalink
New feature for options.params
Browse files Browse the repository at this point in the history
Added support for use callback function instead of dictionary in
options.params. This need for dynamically set custom Ajax parameters.
  • Loading branch information
Realharon committed Oct 20, 2016
1 parent 8d18bda commit 535a34f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@
ajaxSettings;

options.params[options.paramName] = q;
params = options.ignoreParams ? null : options.params;
params = options.ignoreParams ? null : (typeof(options.params) == 'function' ? options.params.call(that.element) : options.params);

if (options.onSearchStart.call(that.element, options.params) === false) {
return;
Expand Down

0 comments on commit 535a34f

Please sign in to comment.