0

I am trying to bind some data property (isMenuActive) in the outer scope of a v-autocomplete component to the visibility state of its implicitly created v-menu, independently of what triggers de opening or closing of this menu. So there is no need for a two-way data binding, I only need the isMenuActive state to change when the menu toggles, not the other way around.

I am wondering if there is a possibility to pass some callback function via the menu-props attribute:

 <v-autocomplete :menu-props="{ '???': function (value) { this.isMenuActive = value; } }">

There seem to be no appropriate events for this purpose either.

Jerry
  • 23
  • 5
  • If your intention is to hide the menu, wouldn't the [hide-no-data](https://vuetifyjs.com/en/api/v-autocomplete/#hide-no-data) prop do the job for you? – Eazash Jan 18 '21 at 16:26
  • @Eazash - thank you. Actually my previous description of the problem was a bit misleading, I am not looking for a mechanism that hides the menu in certain conditions but I am looking for a way to react to the hiding or appearing of the menu. – Jerry Jan 18 '21 at 18:46

0 Answers0