I am trying to display a list of draggable elements using vue-draggable, which are sometimes separated by a fixed element at given position(s).
So far I tried the following approach : creating a different element when needed inside the v-for loop.
<draggable :list="list" class="dragArea" :class="{dragArea: true}"
:options="{group:'people', draggable: '.drag'}" @change="handleChange">
<template v-for="(element, index) in list">
<div class="drag">
{{element.name}}
</div>
<div class="nodrag" v-if="index === 2">Fixed element</div>
</template>
</draggable>
However, it is breaking the behavior of my app, as the indexes returned by the onChange event are not what is expected anymore. (You can check a reproduction on this jsfiddle)
Am I doing this wrong ? I also considered using the move prop to disable the dragging ability as suggested here, but the problem remains, because I am using element from outside the draggable list I believe.
In our production usecase, fixed element's index is variable, if that matters.