Skip to content
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

Confirm modal #70

Open
kossa opened this issue Apr 23, 2018 · 1 comment
Open

Confirm modal #70

kossa opened this issue Apr 23, 2018 · 1 comment
Milestone

Comments

@kossa
Copy link

kossa commented Apr 23, 2018

Hello,

There is a way to perform confirmation action, like before deleting an element on the page, I'll show a modal popup to confirm the action, like https://sweetalert2.github.io/

Thanks

@tochoromero
Copy link

The way I solve this is with a promise. In your Modal component have an open() method and have it return a promise. Then have the caller call the open method (using a reference to the modal component) and wait for the promise to resolve. Then have your modal resolve the promise with either false or true depending on what the user selected.

@bluefirex bluefirex added this to the 3.0 milestone Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants