From f5619df49346f35443a864bf603bd9107fdd743b Mon Sep 17 00:00:00 2001
From: Alan Devlin From jQuery JavaScript Library
scroll Boolean Default: true Whether to scroll when more results than configured via scrollHeight are available. scrollHeight Number Default: 180 height of scrolled autocomplete control in pixels selectFirst Boolean Default: true
+ If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence. showNoResults Boolean Default: true Whether to show "No Records." message when there are no matching results. Setting this to false can help when selectFirst is true and mustMatch is false. width Number Default: width of the input element Specify a custom width for the select box.
diff --git a/jquery.autocomplete.js b/jquery.autocomplete.js
index 497a80a..303fac5 100644
--- a/jquery.autocomplete.js
+++ b/jquery.autocomplete.js
@@ -22,7 +22,7 @@ $.fn.extend({
data: isUrl ? null : urlOrData,
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
max: options && !options.scroll ? 10 : 150,
- noRecord: "No Records."
+ noRecord: options && options.showNoResults ? "No Records." : ""
}, options);
// if highlight is set to false, replace it with a do-nothing function