aboutsummaryrefslogtreecommitdiff
path: root/js/bootstrap-typeahead.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2012-07-23 23:01:38 -0700
committerMark Otto <[email protected]>2012-07-23 23:01:38 -0700
commitf085dbadd18208386649717f4f1bcba62d6119de (patch)
treee8aa445377a1877816ea4636f015117c06096404 /js/bootstrap-typeahead.js
parent0dda2c4659c6e0407b5b9fda6618ab5c8c12a897 (diff)
parent614d52bd7f86591a0b0ab09e1c16ee888610d8a3 (diff)
downloadbootstrap-f085dbadd18208386649717f4f1bcba62d6119de.tar.xz
bootstrap-f085dbadd18208386649717f4f1bcba62d6119de.zip
Merge branch '2.1.0-wip' of github.com:twitter/bootstrap into 2.1.0-wip
Conflicts: docs/assets/css/docs.css docs/base-css.html docs/components.html docs/customize.html docs/getting-started.html docs/javascript.html docs/scaffolding.html docs/templates/pages/base-css.mustache docs/templates/pages/components.mustache docs/templates/pages/customize.mustache docs/templates/pages/getting-started.mustache docs/templates/pages/javascript.mustache docs/templates/pages/scaffolding.mustache
Diffstat (limited to 'js/bootstrap-typeahead.js')
-rw-r--r--js/bootstrap-typeahead.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/bootstrap-typeahead.js b/js/bootstrap-typeahead.js
index 6e896bb98..65b1ddab1 100644
--- a/js/bootstrap-typeahead.js
+++ b/js/bootstrap-typeahead.js
@@ -81,7 +81,7 @@
this.query = this.$element.val()
- if (!this.query) {
+ if (!this.query || this.query.length < this.options.minLength) {
return this.shown ? this.hide() : this
}
@@ -279,12 +279,13 @@
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
+ , minLength: 1
}
$.fn.typeahead.Constructor = Typeahead
- /* TYPEAHEAD DATA-API
+ /* TYPEAHEAD DATA-API
* ================== */
$(function () {