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

Support data-confirm behavior similar to phoenix_html #1416

Open
jtormey opened this issue Aug 23, 2024 · 0 comments
Open

Support data-confirm behavior similar to phoenix_html #1416

jtormey opened this issue Aug 23, 2024 · 0 comments
Assignees
Labels

Comments

@jtormey
Copy link

jtormey commented Aug 23, 2024

In Phoenix on web, it's possible to add a data-confirm="..." attribute to clickable elements. When the element is clicked, Phoenix will first show a browser confirmation dialog with the confirmation message. If the user clicks "Cancel", then the click event is interrupted. A similar feature in LVN would be a nice convenience for confirming destructive user actions.

Implementation in phoenix_html.js

Phoenix also supports overriding the default behavior for showing a custom dialog: documentation on hexdocs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants