Can you support promise/cancellable for the stop callback?
A simple use case is users want to rearrange the widget position but we want their confirmation(via popup dialog) before apply new position.
Hi @nghiado,
It is possible, will implement it this week.
Hi @nghiado ,
Implemented this in v2.4.0
Thanks @tiberiuzuld, will try this weekend.
Can you please provide an example on how this callback should look like with the posibility to cancel it?
Hi @PeterSeifert ,
You need to return a promise from the callback like:
vm.options.draggable.stop = areYouSureCallback;
function areYouSureCallback(item, itemComponent, event){
return new Promise(function(resolve, reject){
/// do your stuff here
});
}
Thanks,
Thank you, @tiberiuzuld. This helped me.
Most helpful comment
Thank you, @tiberiuzuld. This helped me.