I need help trying to detect the moment when the menu in a select is being opened and shown to the users.
Is there any method or watch that i can use to trigger the moment when the menu is being displayed?
Here a simple codepen with a v-select.
codepen.io/xmorelll/pen/bGMppWO?editors=101
Thank you!
CodePudding user response:
Did you try @click
event , it is fired when the menu is clicked/opened
CodePudding user response:
I found this solution extending the VSelect component from vuetify:
import { VSelect } from 'vuetify/lib'
export default {
extends: VSelect,
watch: {
isMenuActive(val) {
this.$emit('openMenu', val);
}
}
}
With this component the VSelect will do an emit when the menu changes his status