Skip to content

Commit df500a3

Browse files
committed
Fixed bug if newOptionsAllowed was true
Fixed bug that caused it to set the value to the option description instead of the option value if newOptionsAllowed was true.
1 parent 1103e65 commit df500a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/bootstrap-combobox.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,9 @@
391391
this.focused = false;
392392
var val = this.$element.val();
393393
if (this.newOptionsAllowed) {
394-
this.$target.val(val);
394+
if (this.length === 0) {
395+
this.$target.val(val);
396+
}
395397
} else {
396398
if (!this.selected && val !== '' ) {
397399
this.$element.val('');

0 commit comments

Comments
 (0)