Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

:move event not being fired

Open webnoob opened this issue 9 years ago • 8 comments

Are there any prerequisites to the :move event being fired?

I've added :move="checkMove" to my <draggable> component and this is my checkMove function:

    checkMove: function (evt) {
        console.log('check move')
        console.log(evt)
      }

But I don't see anything added to the console.

This page is quite complex so I'm not sure I'll be able to jsfiddle an example.

webnoob avatar Mar 25 '17 15:03 webnoob

@webnoob Please check cancel example to see a working example of move props. The only reason it will not fired is that both list and value props are null.

Note that you should return true to authorize the drag operation.

If this does not help, I will definitivelly need a jsfiddle to investigate.

David-Desmaisons avatar Mar 25 '17 16:03 David-Desmaisons

@webnoob , Any news on this one?

David-Desmaisons avatar Mar 28 '17 03:03 David-Desmaisons

I am closing this one. Please reopn if you have more feedback.

David-Desmaisons avatar Mar 30 '17 12:03 David-Desmaisons

This is happening for me also.

I have <draggable class="lane board-backlog" :options="{group:'board', sort: false}" :move="updateBoard">

and a method

updateBoard: function(card, origin){
...
}

This never gets fired though?

mylesthedev avatar May 15 '17 22:05 mylesthedev

@mediabeastnz , could you please create a jsfidle?

David-Desmaisons avatar May 16 '17 18:05 David-Desmaisons

@mediabeastnz just seen your comment on issue #78 , so do not consider this comment.

David-Desmaisons avatar May 16 '17 18:05 David-Desmaisons

Just in case anyone comes across this and needs a quick fix: you must use the v-model or list prop for move to work.

ykamal avatar Apr 26 '20 13:04 ykamal

It also won't work with the :sort="false" prop sadly. Method doesn't get fired, so you can't prevent certain items from being dragged.

adamreisnz avatar Mar 23 '24 02:03 adamreisnz