Is there a way to cancel a drop event before the component is added to the canvas? #6329
mercymantis
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to be able to cancel a component drop either initiated by dragging a block or moving a component within the canvas. I tried hooking into 'canvas:dragend' and 'sorter:drag:end'
With canvas:dragend, the event doesn't fire
With sorter:drag:end, the event fires but I don't know how to cancel or nullify the modelToDrop
What I'm trying to archive is cancelling a drop based on x conditions. So when a user starts dragging a component, if x conditions are met then cancel the drop action before anything is added to canvas. I'm not able to use component:drag:end because at that point the component is already on the canvas.
Beta Was this translation helpful? Give feedback.
All reactions