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

Pass original query to transformResult callback

This commit is contained in:
Tomas Kirda 2015-06-04 12:33:32 -05:00
parent 56d902b6b1
commit bd25b4d992

View File

@ -580,7 +580,7 @@
that.currentRequest = $.ajax(ajaxSettings).done(function (data) { that.currentRequest = $.ajax(ajaxSettings).done(function (data) {
var result; var result;
that.currentRequest = null; that.currentRequest = null;
result = options.transformResult(data); result = options.transformResult(data, q);
that.processResponse(result, q, cacheKey); that.processResponse(result, q, cacheKey);
options.onSearchComplete.call(that.element, q, result.suggestions); options.onSearchComplete.call(that.element, q, result.suggestions);
}).fail(function (jqXHR, textStatus, errorThrown) { }).fail(function (jqXHR, textStatus, errorThrown) {