H
H
hckn2018-09-18 20:57:06
Vue.js
hckn, 2018-09-18 20:57:06

Why drag/drop doesn't work correctly?

If you drag the list, we see that the data is successfully sorted, and the display is reset for some reason. What's wrong? https://codesandbox.io/s/lr7qn866oz
If you remove the actual sorting itself, then everything is displayed OK

this.$emit('input', move(this.items, oldIndex, newIndex))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-09-18
@hckn

Because the key of the curve is tied to the index. Make it match the real data - everything will be OK .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question