mirror of
https://github.com/zhigang1992/bootstrap-tokenfield.git
synced 2026-01-12 22:46:09 +08:00
Fix autocomplete and typeahead options extending
This commit is contained in:
8
dist/bootstrap-tokenfield.js
vendored
8
dist/bootstrap-tokenfield.js
vendored
@@ -155,16 +155,18 @@
|
||||
// Initialize autocomplete, if necessary
|
||||
if ( ! $.isEmptyObject( this.options.autocomplete ) ) {
|
||||
var side = this.textDirection === 'rtl' ? 'right' : 'left'
|
||||
var autocompleteOptions = $.extend({}, this.options.autocomplete, {
|
||||
var autocompleteOptions = $.extend({
|
||||
minLength: this.options.showAutocompleteOnFocus ? 0 : null,
|
||||
position: { my: side + " top", at: side + " bottom", of: this.$wrapper }
|
||||
})
|
||||
}, this.options.autocomplete )
|
||||
this.$input.autocomplete( autocompleteOptions )
|
||||
}
|
||||
|
||||
// Initialize typeahead, if necessary
|
||||
if ( ! $.isEmptyObject( this.options.typeahead ) ) {
|
||||
var typeaheadOptions = $.extend({}, this.options.typeahead, {})
|
||||
var typeaheadOptions = $.extend({
|
||||
minLength: this.options.showAutocompleteOnFocus ? 0 : null
|
||||
}, this.options.typeahead)
|
||||
this.$input.typeahead( null, typeaheadOptions )
|
||||
this.typeahead = true
|
||||
}
|
||||
|
||||
2
dist/bootstrap-tokenfield.min.js
vendored
2
dist/bootstrap-tokenfield.min.js
vendored
File diff suppressed because one or more lines are too long
8
js/bootstrap-tokenfield.js
vendored
8
js/bootstrap-tokenfield.js
vendored
@@ -155,16 +155,18 @@
|
||||
// Initialize autocomplete, if necessary
|
||||
if ( ! $.isEmptyObject( this.options.autocomplete ) ) {
|
||||
var side = this.textDirection === 'rtl' ? 'right' : 'left'
|
||||
var autocompleteOptions = $.extend({}, this.options.autocomplete, {
|
||||
var autocompleteOptions = $.extend({
|
||||
minLength: this.options.showAutocompleteOnFocus ? 0 : null,
|
||||
position: { my: side + " top", at: side + " bottom", of: this.$wrapper }
|
||||
})
|
||||
}, this.options.autocomplete )
|
||||
this.$input.autocomplete( autocompleteOptions )
|
||||
}
|
||||
|
||||
// Initialize typeahead, if necessary
|
||||
if ( ! $.isEmptyObject( this.options.typeahead ) ) {
|
||||
var typeaheadOptions = $.extend({}, this.options.typeahead, {})
|
||||
var typeaheadOptions = $.extend({
|
||||
minLength: this.options.showAutocompleteOnFocus ? 0 : null
|
||||
}, this.options.typeahead)
|
||||
this.$input.typeahead( null, typeaheadOptions )
|
||||
this.typeahead = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user