TerryZ / v-selectmenu

SelectMenu for Vuejs, A simple, easier and highly customized menu solution
https://terryz.github.io/docs-vue/#/selectmenu
MIT License
187 stars 24 forks source link

Bug: The `@values` event is not sent after the v-selectmenu component is re-rendered #27

Open benje opened 5 years ago

benje commented 5 years ago

Description of bug

I have an instance of v-selectmenu that is toggled on/off using the Vuejs v-if directive. I also listen to the @values event on this component.

<v-selectmenu v-if="condition" @values="onValuesEvent" ...

If the component is hidden and re-rendered when condition changes from true to false to true, the @values event is no longer emitted!

TerryZ commented 5 years ago

I tried v-if set to true => false => true, @values event still working in my case.

You can upload your code to somewhere like jsFiddle, CodePen, then i can see what happen.

TerryZ commented 5 years ago

You can try the first example in v-selectmenu CodePen.

benje commented 5 years ago

Thanks for the quick reply @TerryZ , I will prepare a CodePen that demonstrates the issue soon!