mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-29 16:19:53 +02:00
adds minLength #3960
This commit is contained in:
5
docs/assets/js/bootstrap-typeahead.js
vendored
5
docs/assets/js/bootstrap-typeahead.js
vendored
@@ -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 () {
|
||||
|
5
docs/assets/js/bootstrap.js
vendored
5
docs/assets/js/bootstrap.js
vendored
@@ -1690,7 +1690,7 @@
|
||||
|
||||
this.query = this.$element.val()
|
||||
|
||||
if (!this.query) {
|
||||
if (!this.query || this.query.length < this.options.minLength) {
|
||||
return this.shown ? this.hide() : this
|
||||
}
|
||||
|
||||
@@ -1888,12 +1888,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 () {
|
||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1543,6 +1543,12 @@ $('.carousel').carousel({
|
||||
<td>8</td>
|
||||
<td>The max number of items to display in the dropdown.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>minLength</td>
|
||||
<td>number</td>
|
||||
<td>1</td>
|
||||
<td>The minimum character length needed before triggering autocomplete suggestions</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>matcher</td>
|
||||
<td>function</td>
|
||||
|
6
docs/templates/pages/javascript.mustache
vendored
6
docs/templates/pages/javascript.mustache
vendored
@@ -1474,6 +1474,12 @@ $('.carousel').carousel({
|
||||
<td>8</td>
|
||||
<td>{{_i}}The max number of items to display in the dropdown.{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{_i}}minLength{{/i}}</td>
|
||||
<td>{{_i}}number{{/i}}</td>
|
||||
<td>{{_i}}1{{/i}}</td>
|
||||
<td>{{_i}}The minimum character length needed before triggering autocomplete suggestions{{/i}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{_i}}matcher{{/i}}</td>
|
||||
<td>{{_i}}function{{/i}}</td>
|
||||
|
Reference in New Issue
Block a user