Search code examples
javascriptvuejs2vue-componentv-for

Issue with changed data in a loop: Is it a feature of v-for or a bug of a component or a bug of my code?


I use vue-smooth-dnd and I have a problem with dragging of tracks inside one playlist once tracks are copied from another playlist.

Here is the minimal code - just click button to copy tracks from one playlist to another and try to drag any tracks in both playlists. As a result you will see that tracks inside "Slow" playlist are draggable, but in "Electro" they are not.

However if you change the first :key from :key="playlistObj.playlistTitle" to :key="Math.floor(Math.random() * (100 - 1)) + 1" tracks dragging in the first playlist starts to work.

Is it a feature of v-for or a bug of a component I use or a bug of my code?


Solution

  • This was the issue of the component and it is already fixed.