Autocomplete: do not select a result without value
This commit is contained in:
parent
9257264b8d
commit
28382f5aa9
1 changed files with 1 additions and 1 deletions
|
@ -345,7 +345,7 @@ L.S.AutoComplete.Select = L.S.AutoComplete.BaseSelect.extend({
|
||||||
initSelectedContainer: function () {
|
initSelectedContainer: function () {
|
||||||
this.selected_container = L.DomUtil.after(this.input, L.DomUtil.element('div', {className: 'umap-singleresult'}));
|
this.selected_container = L.DomUtil.after(this.input, L.DomUtil.element('div', {className: 'umap-singleresult'}));
|
||||||
var self = this;
|
var self = this;
|
||||||
if (this.el.selectedIndex !== -1) {
|
if (this.el.selectedIndex !== -1 && this.el[this.el.selectedIndex].value !== '') {
|
||||||
self.displaySelected(self.optionToResult(this.el[this.el.selectedIndex]));
|
self.displaySelected(self.optionToResult(this.el[this.el.selectedIndex]));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue