You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi folks, thanks for your work on this library. Is it possible to programmatically cancel an in-progress drag? If not, what's the best way to determine if the component has been unmounted at drop-time so we don't try to trigger an action on a (say) deleted item?
The text was updated successfully, but these errors were encountered:
edit: I wasn't very familiar with the library when I 'bumbed' this.
in case anyone runs into the problem I had, it was the following:
I wanted to cancel a drag if a specific condition was met on drop, so you have to set up two parts:
1 - The receiver has a canDrop method, which returns true or false. You must make your canDrop return false in order to cancel the drag.
2 - Second part is that the I needed some kind of UI behavior to let the user know why this was happening: in this case you have to go to the draggable item and on the endDrag method check if it was successful by doing: if (monitor.didDrop()) which returns true or false. In my case, using the false returned let me show a modal with the information as to why it had failed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hi folks, thanks for your work on this library. Is it possible to programmatically cancel an in-progress drag? If not, what's the best way to determine if the component has been unmounted at drop-time so we don't try to trigger an action on a (say) deleted item?
The text was updated successfully, but these errors were encountered: