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

Don't perform lookup if onSearchStart returns false. Fixes #60.

This commit is contained in:
Tomas Kirda 2013-04-24 15:04:50 -05:00
parent 41543d98a4
commit 941c8ee4e3

View File

@ -390,7 +390,9 @@
that.suggest(); that.suggest();
} else if (!that.isBadQuery(q)) { } else if (!that.isBadQuery(q)) {
options.params[options.paramName] = q; options.params[options.paramName] = q;
options.onSearchStart.call(that.element, options.params); if (options.onSearchStart.call(that.element, options.params) === false) {
return;
}
$.ajax({ $.ajax({
url: options.serviceUrl, url: options.serviceUrl,
data: options.params, data: options.params,