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
|
||||
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
||||
if (this.selectedItem.name == this.name) break;
|
||||
if (!this.selectedItem.isSelectable) break;
|
||||
evt.preventDefault();
|
||||
evt.stopImmediatePropagation();
|
||||
this.select();
|
||||
|
@ -729,6 +730,7 @@ export class AutoComplete {
|
|||
case 'Tab': {
|
||||
// pick the selected item to autocomplete
|
||||
if (evt.ctrlKey || evt.altKey || evt.shiftKey || this.selectedItem.value == '') break;
|
||||
if (!this.selectedItem.isSelectable) break;
|
||||
evt.preventDefault();
|
||||
evt.stopImmediatePropagation();
|
||||
this.select();
|
||||
|
|
|
@ -23,6 +23,10 @@ export class AutoCompleteOption {
|
|||
return this.name;
|
||||
}
|
||||
|
||||
get isSelectable() {
|
||||
return !this.valueProvider;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
|
|
Loading…
Reference in New Issue