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

Ability to confirm via string comparison #20

Open
andreasvirkus opened this issue Aug 16, 2019 · 2 comments
Open

Ability to confirm via string comparison #20

andreasvirkus opened this issue Aug 16, 2019 · 2 comments
Assignees
Labels
queued minor Delayed until the next minor release

Comments

@andreasvirkus
Copy link
Contributor

andreasvirkus commented Aug 16, 2019

Is your feature request related to a problem? Please describe.
I wish to improve the UX of my app for my users. We really like the pattern that GitHub and many others have adopted - have the user type in the name of the object/item they are about to delete.

Describe the solution you'd like
We could call a new method for AWN (or pass in an additional argument to .confirm()), which would take in a String and the Confirm button would only be enabled once the user has typed the exact match of that string. So if I call the method with 'bees-knees', then the positive action button would not be enabled before the user has typed in 'bees-knees' into the prompt.

Additional context
Ideally (since we're using the Vue plugin) we'd love to also maybe either pass in a custom slot for the input field or to be able to easily style the input (e.g. please keep the styles to flat selectors).

type-to-confirm

All the best,
a

@f3oall
Copy link
Owner

f3oall commented Aug 16, 2019

Hey @andreasvirkus,

The behavior you have requested is commonly named "prompt". I had plans to implement it in simple way (just one predefined input). So you can expect it soon. I don't want to add any complex behaviour for prompt windows to keep library light and simple. However, I will try to consider opportunities to provide a way to customize this behaviour.

Concerning your suggestion about slots in Vue plugin, I can't implement it, because plugin functionality is just a wrapper (syntax sugar) for Vue. It doesn't use any Vue features. Probablly this year, I will publish set of dedicated Vue components which use all power of Vue. So stay tuned.

@f3oall f3oall self-assigned this Aug 16, 2019
@f3oall f3oall added the queued minor Delayed until the next minor release label Aug 16, 2019
@andreasvirkus
Copy link
Contributor Author

Hi, is there any progress on this prompt/confirmation feature? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
queued minor Delayed until the next minor release
Projects
None yet
Development

No branches or pull requests

2 participants