Skip to content

Commit 535a34f

Browse files
author
Realharon
committed
New feature for options.params
Added support for use callback function instead of dictionary in options.params. This need for dynamically set custom Ajax parameters.
1 parent 8d18bda commit 535a34f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jquery.autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@
553553
ajaxSettings;
554554

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

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

0 commit comments

Comments
 (0)