-
Notifications
You must be signed in to change notification settings - Fork 782
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
Methods in $callbacks to support promises? #507
Comments
I am having exactly the same problem since I am trying to use modals rather than confirm. Thanks |
+1 for this feature, promise is needed here |
Hi both. I had the same problem and found a solution that works. Unfortunately it involved changing the code. The change still works with the current version. I have decided anyway, that I need to try to get it into the main branch code anyway, so I will make a branch and implement it soon. |
I made two branches to implement it. Take a look and comment. master...bronielsen:bronielsen-patch-confirmationDialog and |
I decided to go for it and implement this using $q (Angular's promise service) as the original request stated. See PR #589 I don't think this will break anything or any existing code, but I've only tested it with my own app and with the demo pages, and only on a desktop web browser. Feedback would be appreciated. |
Closing this issue due to inactivity. See #815 for more information. |
I have the following scenario:
The way I implemented the confirmation is by using a modal which returns the answer in a promise. I trigger the modal in the "beforeDrop" method, but since it does not support promises, I can not cancel the event if the user chooses "No". As a workaround I have to manually put the node back where it was in this case.
It would be nice if all methods would support promises so that async operations can be done in the $callbacks methods.
Is this possible or in plan to do?
The text was updated successfully, but these errors were encountered: