diff --git a/js/bootstrap-combobox.js b/js/bootstrap-combobox.js index dc908bf..8654726 100755 --- a/js/bootstrap-combobox.js +++ b/js/bootstrap-combobox.js @@ -200,10 +200,14 @@ var that = this this.focused = false var val = this.$element.val() - if (!this.selected && val !== '' ) { - this.$element.val('') - this.$source.val('').trigger('change') - this.$target.val('').trigger('change') + if (!!this.options.force_match) { + if ( !this.selected && val !== '' ) { + this.$element.val('') + this.$source.val('').trigger('change') + this.$target.val('').trigger('change') + } + } else { + this.$target.val(val).trigger('change') } if (!this.mousedover && this.shown) setTimeout(function () { that.hide() }, 200) } @@ -231,6 +235,7 @@ template: '