-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to cancel a drag? #45
Comments
I am working on this, I should be abble to provide shortly a hook to cancel drag operation. |
@David-Desmaisons awesome - I thought I was doing something wrong here! Can you let me know when this is ready, please? As would be very helpful for my app. Cheers & happy holidays! |
Here is the proposal: move event will be removed and will be replaced by a move props: moveType: If not null this function will be called in a similar way as Sortable onMove callback. function onMoveCallback(evt, originalEvent){
...
// return false; — for cancel
} evt object has same property as Sortable onMove event, plus two addicional properties:
|
@pmartelletti Will this fit your needs? |
@pmartelletti , clone prop has been released in version 2.6.0-rc0. The documentation has been updated accordingly. Cheers & Merry Christmas! |
@David-Desmaisons this is awesome. Will try it on monday, but that's what I was looking for! Thank you very much and merry Christmas to you too! 😄 |
i have to stop drop event when element moving from block1 to block3 directly |
@sunilkumarverma , You should use the move props. |
how to start(from ReadME) |
is it possible to cancel the dropping of the element if need be?.... i noticed onMove is fired even before you drop the element |
I also wonder how to cancel a drag - in my case because the element is let go, but not in a droppable place. |
it trigger so much times when i use move props and return false, how can i solve this problem. |
If I understand this correctly, the An |
any workaround on this issue? |
@David-Desmaisons I want to cancel a drag according to the type of my destination element (I need a data inside of the destination element). I've tried to find the destination element using :move="onMove", but I can't find it, I only find the dragged element. How can I do this? Thanks, |
i want to cancel drag on drop, but @EnD function doesnot provide reverting an item and :move prop is being called many times, How can i do that ? urgent answer is required |
find fix? |
@David-Desmaisons I want to cancel a drag if the http request that is triggered on the @Move event fails. I've tried returning false (as per documentation here), but the item is not returned to the initial position.
How can I do this? If it helps, I'm just building kanbas board, so basically if the API call fails, I'd like the task to remain on the correct column / list, so the user knows that the task status was not updated (eventually I'll show a popup with this as well).
Thanks,
The text was updated successfully, but these errors were encountered: