C
C
Combat72020-09-02 13:46:03
Vue.js
Combat7, 2020-09-02 13:46:03

Why doesn't the draggable index change?

There is such a code, the essence is very simple. When dragging elements, the index does not change.
Perhaps I don’t understand how it works, I will be grateful for help
I expect to see the index change in task.sort, but I don’t see

<draggable
                                v-model="tasks"
                                :move="checkMove" >
                            <transition-group >
                                <div v-for="task in tasks" :key="task.sort" v-model="tasks">
                                    <div class="item" >
                                        {{task.name}}  {{task.sort}}
                                    </div>
                                </div>
                            </transition-group>
                        </draggable>

Moderators - go to the forest if you do not understand the question, do not press the "delete question" button

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question