-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Is there a way to close programatically from outside? #26
Comments
Feels like this might be something solved/handled with what's going on in this issue too: #21. i.e. it could be a singleton where I just "call" it again with a magic parameter which means "don't actually open". |
Hi @rik-iso, thanks for using the library! I understand your use case. There's no proper API to handle this ATM, but I'd like to implement one. One of the APIs I'm considering is expose the internal call id (someway) and use it to act on that specific call: Toast.end(id, value) Let me know if that would help! |
I think it might. Alternatively,
|
Hey, that looks so neat @rik-iso, I love the idea. Let's give it a try! Thanks! |
I still have to write some docs for it, but I think #32 should do! |
Thanks so much! I literally needed this again today and checked in and you built it! Appreciate the turn around :) |
Love the library, using it for or all my recent modals.
qq though - is it possible to dismiss programatically from outside the callable?
The use case is using this to build a sort of floating toast warning the user they need to connect some payment information. The user can dismiss this toast via an X (-> call.end), but we also want to close it for them when they actually update their payment information.
Right now I figure I can pass in as a property to the callable something like an externally resolvable promise, and the Callable trigger call.end() internally when that resolves (i.e. resolve it externally if I want to close it earlier).... but wondering if I'm overlooking something simpler.
The text was updated successfully, but these errors were encountered: