I'm using
<draggable class="audience-group include"
:class="{'selected':current_index == index}"
@end="dragStop"
v-for="(inc,index) in includes"
v-model="includes[index]" :options="{group:'audiences'}"
@click="focusBuilderGroup('include',index)">
In this case, focusBuilderGroup will set the current_index to the container that was just clicked (adds the class of selected). This worked outside of the draggable element.
Hello @zhegwood , You should use: v-on:click.native="focusBuilderGroup('include',index)"
Ref: https://vuejs.org/v2/guide/components.html#Using-v-on-with-Custom-Events
Excellent, thanks.
I'm facing the same problem using Vue.Draggable v1. But I can't use the event modifier .navtive which was introduced in Vue 2. Is there a way to solve this?
@semmel87 , I have no idea. Maybe you should post this question on vue.js forum as it is related to vue implementation and not this plugin.
Thank you so much @David-Desmaisons . This really saved my day.
Most helpful comment
Hello @zhegwood , You should use:
v-on:click.native="focusBuilderGroup('include',index)"Ref: https://vuejs.org/v2/guide/components.html#Using-v-on-with-Custom-Events