2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-08 14:20:59 +00:00

allows optional paramFunc

This commit is contained in:
Quinton Pike 2015-06-04 11:40:50 -04:00
parent 56d902b6b1
commit 193f1cee63

View File

@ -531,6 +531,7 @@
that = this,
options = that.options,
serviceUrl = options.serviceUrl,
paramFunc = options.paramFunc || $.param,
params,
cacheKey,
ajaxSettings;
@ -557,7 +558,7 @@
if ($.isFunction(serviceUrl)) {
serviceUrl = serviceUrl.call(that.element, q);
}
cacheKey = serviceUrl + '?' + $.param(params || {});
cacheKey = serviceUrl + '?' + paramFunc(params || {});
response = that.cachedResponse[cacheKey];
}