Refactor
parent
0ce3151e2d
commit
7b0cdaf392
|
@ -471,8 +471,7 @@ export default {
|
|||
|
||||
this.$emit('item-select', { originalEvent: event, value: option });
|
||||
|
||||
this.$refs.focusInput.focus();
|
||||
this.hide();
|
||||
this.hide(true);
|
||||
},
|
||||
onOptionMouseMove(event, index) {
|
||||
if (this.focusOnHover) {
|
||||
|
|
|
@ -369,8 +369,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
else if (!this.overlay || !this.overlay.contains(event.target)) {
|
||||
this.overlayVisible ? this.hide() : this.show();
|
||||
this.$refs.focusInput.focus();
|
||||
this.overlayVisible ? this.hide(true) : this.show(true);
|
||||
}
|
||||
},
|
||||
onClearClick(event) {
|
||||
|
@ -392,10 +391,9 @@ export default {
|
|||
},
|
||||
onOptionSelect(event, option) {
|
||||
const value = this.getOptionValue(option);
|
||||
this.updateModel(event, value);
|
||||
this.$refs.focusInput.focus();
|
||||
|
||||
this.hide();
|
||||
this.updateModel(event, value);
|
||||
this.hide(true);
|
||||
},
|
||||
onOptionMouseMove(event, index) {
|
||||
if (this.focusOnHover) {
|
||||
|
|
|
@ -403,8 +403,7 @@ export default {
|
|||
}
|
||||
|
||||
if (!this.overlay || !this.overlay.contains(event.target)) {
|
||||
this.overlayVisible ? this.hide() : this.show();
|
||||
this.$refs.focusInput.focus();
|
||||
this.overlayVisible ? this.hide(true) : this.show(true);
|
||||
}
|
||||
},
|
||||
onFirstHiddenFocus(event) {
|
||||
|
|
Loading…
Reference in New Issue