Answer the question
In order to leave comments, you need to log in
How to make checkbox not move in drag and drop?
I use the library https://github.com/SortableJS/Vue.Draggable
In my example I use this code
/src/views/App.vue:65
<thead>
<draggable
v-model="columns"
:element="'tr'"
:options="{ animation: 150, draggable: '.draggable' }"
>
<th
v-for="column in columns"
@click="sortBy(column.name);"
v-show="!column.disabled"
:class="{ draggable: column.name !== 'isActive' }"
>
<input
v-if="column.name === 'isActive'"
type="checkbox"
v-model="selectAll"
@click="select"
/>
{{ column.label }}
</th>
</draggable>
</thead>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question