How can I set so that only .btn-drag
can drag whole row? I am using https://github.com/SortableJS/Vue.Draggable
Currently I can drag also with button#options
which is undesired
<draggable v-model="textElements">
<transition-group>
<div class="is-draggable" v-for="element in textElements" :key="element.text">
<div>
{{ element.text }}
</div>
<button class="btn btn-transparent">Options</button>
<button class="btn btn-transparent btn-drag">Drag</button>
</div>
</transition-group>
</draggable>
In docs they mention that we can place :move="checkMove"
on <draggable>
but in function I am not sure how can I check what exactly was dragged? Returning false works correctly for disabling dragging in general
methods: {
checkMove(evt) {
console.log(evt)
return false
}
}
Console.log(evt) shows this but I am not sure which property I can use to pinpoint exactly what started a drag https://image.prntscr.com/image/r17zNkxoSWGdVQs_5nR09w.png