-
Notifications
You must be signed in to change notification settings - Fork 116
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
onBeforeTagRemove async #59
Comments
Hmm... currently no but that would definitely be useful. I could see the implementation working something like the below maybe: onBeforeTagRemove: function(event, tag, callback) {
customAsyncAlertMethod(function(response) {
callback(!response);
});
}); Thoughts? |
Definitely, that would be perfect. |
@okcoker Do you think this is something you'd be able to implement? So far, taggle's been great by the way! |
Yea, sorry just have been really busy. Will get on this ASAP. I do agree its an important feature. |
No problem! Figured I'd just check in to see if you think you'll have time to add this. |
Hey @webchaz made the callback more node style so you just call the callback with no arguments to pass, or with any truthy value if there was an error. Updated the example above for how this would work |
This is great! Would you be able to add the same to the |
That's partly why this took a while. I'd like the API to be consistent in that way but adding to |
Ah ok, maybe I can take a look and see if I can put in an update for it - This is the last piece of the puzzle :). Looks like the new changes aren't in npm though? |
Wanted to wait for the remaining issues, but if you wanna look into implementing |
Using
confirm
works with this method to return true or false because it's synchronous. However, trying to return true or false asynchronously doesn't work.For example:
This won't work. Is there another way to get around this? Thank you
The text was updated successfully, but these errors were encountered: