Skip to content

Instantly share code, notes, and snippets.

@vatson
Created October 15, 2019 13:18
Show Gist options
  • Save vatson/4482e657c2ee2a5505e198e5eb5c5012 to your computer and use it in GitHub Desktop.
Save vatson/4482e657c2ee2a5505e198e5eb5c5012 to your computer and use it in GitHub Desktop.
import VSelect from 'vuetify/lib/components/VSelect/VSelect'
export const Select = VSelect.extend({
props: {
openOnEnter: { type: Boolean, default: true },
},
methods: {
onEnterDown() {
if (this.openOnEnter === true) {
this.constructor.superOptions.methods.onEnterDown.call(this)
} else {
this.hideMenu()
}
this.$emit('enter', this.internalValue)
},
hideMenu() {
this.isMenuActive = false;
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment