don't block enter/tab for items with valueProvider
This commit is contained in:
parent
ab5a6b1c61
commit
5862c7ea91
|
@ -721,6 +721,7 @@ export class AutoComplete {
|
||||||
// pick the selected item to autocomplete
|
// pick the selected item to autocomplete
|
||||||
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
||||||
if (this.selectedItem.name == this.name) break;
|
if (this.selectedItem.name == this.name) break;
|
||||||
|
if (!this.selectedItem.isSelectable) break;
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopImmediatePropagation();
|
evt.stopImmediatePropagation();
|
||||||
this.select();
|
this.select();
|
||||||
|
@ -729,6 +730,7 @@ export class AutoComplete {
|
||||||
case 'Tab': {
|
case 'Tab': {
|
||||||
// pick the selected item to autocomplete
|
// pick the selected item to autocomplete
|
||||||
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
||||||
|
if (!this.selectedItem.isSelectable) break;
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
evt.stopImmediatePropagation();
|
evt.stopImmediatePropagation();
|
||||||
this.select();
|
this.select();
|
||||||
|
|
|
@ -23,6 +23,10 @@ export class AutoCompleteOption {
|
||||||
return this.name;
|
return this.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isSelectable() {
|
||||||
|
return !this.valueProvider;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} name
|
* @param {string} name
|
||||||
|
|
Loading…
Reference in New Issue