Search code examples
javascriptlaravelvue.jsfrontendvuedraggable

Make a card dragable and the card stick to the one above it


I'm trying to make 3 lists. Inside each list there are cards that can drag through each other. The problem is that the cards stick to the one above and when I'm trying to save the change brings the card above it and the same list.

Actually I don't understand Vue. This is my first time using it.

Here is the card code with drag:

   <v-list one-line v-if="card.lists_id ===newList.id">

   <dragable :options="{group:'newCards', animation:210}" :element="div">

        And The Card the twitter card in the doc

I made the card a component, and this the index component

 <v-flex xs12 v-for="card in cards" v-if="card.lists_id ===list.id" 
                                                     :key="card.id">
    <div class="app">

    <cardcomp :list='list' :card='card'></cardcomp>

    </div>

What I want is that I can save the card's place with a new list and it doesn't stick.


Solution

  • I solve it the problem was the place where I put the dragable tag i have to put it above the v-list thanks for helping