From 91df66d4daa2c755be87243907e50a325e3336ee Mon Sep 17 00:00:00 2001 From: Gediminas Backevicius Date: Mon, 18 Feb 2013 16:40:20 +0200 Subject: [PATCH] Parameters were passed to method 'onSearchStart' We need to add extra parameter to search criteria --- src/jquery.autocomplete.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jquery.autocomplete.js b/src/jquery.autocomplete.js index 245b3b1..61be06c 100644 --- a/src/jquery.autocomplete.js +++ b/src/jquery.autocomplete.js @@ -89,7 +89,7 @@ onSearchComplete: noop, containerClass: 'autocomplete-suggestions', tabDisabled: false, - dataType : 'text', + dataType: 'text', lookupFilter: function (suggestion, originalQuery, queryLowerCase) { return suggestion.value.toLowerCase().indexOf(queryLowerCase) !== -1; }, @@ -244,7 +244,7 @@ } offset = that.el.offset(); - + $(that.suggestionsContainer).css({ top: (offset.top + that.el.outerHeight()) + 'px', left: offset.left + 'px' @@ -401,8 +401,8 @@ that.suggestions = response.suggestions; that.suggest(); } else if (!that.isBadQuery(q)) { - options.onSearchStart.call(that.element, q); options.params[options.paramName] = q; + options.onSearchStart.call(that.element, options.params); $.ajax({ url: options.serviceUrl, data: options.params, @@ -631,4 +631,4 @@ } }); }; -})); +})); \ No newline at end of file