Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how can i find out the where i am dropping that list id. this is the example i am flowing vuedraggable[^]

What I have tried:

<div v-if="listtodo != 'error'" class="col-md-2" v-for="list in listtodo">
		<p class="h5">{{list.title}}</p>
		
		<draggable group='cardlist' class="dragArea" :options="{animation:500}" :element="'article'" @change="log">
			<article v-if="list.cardlist != 'error'" class="card m-1 p-2 round shadow onhover position-relative" v-for="(item, index) in list.cardlist" :key="item.id" :id="item.id" :data-id="item.id">
			<div>{{item.title}}</div>
			</article>
		</draggable>

</div>
Posted
Updated 15-Oct-21 7:30am

1 solution

dragstart(event)
       {
           event.dataTransfer.setData("selectedIdx", event.target.id);
       },
       dragover(event)
       {
           event.preventDefault();
       },
       movenow(event)
       {
           var selectedIdx = event.dataTransfer.getData("selectedIdx");
           var targetIdx = $(event.target).closest('.gpbord').attr('id');
           //console.log(selectedIdx+ ' dropped on ' + targetIdx);}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900