notiflix / Notiflix

Notiflix is a pure JavaScript library for client-side non-blocking notifications, popup boxes, loading indicators, and more that makes your web projects much better.

Home Page:https://notiflix.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[FEAT] - Add Prompt Dialog

erropix opened this issue · comments

Is your feature request related to a problem? Please describe.
Yes, the Notiflix.Confirm.ask() function doesn't allow the user to provide answers other than the defined correct answer.

Describe the solution you'd like
If you can change the library to accept any value and pass it to the button callbacks, it will serve as an equivalent for the native browser prompt.

Describe alternatives you've considered
The native browser prompt https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_prompt

Hi @erropix ,

Thanks for the suggestion,

I will consider adding a new method (e.g. the method name could be "prompt()") to the Confirm module for this request in the next minor/major update.

Thanks,
Furkan.

Hi @erropix

Notiflix v3.2.0 has been released.
https://github.com/notiflix/Notiflix/releases/tag/v3.2.0

You can use Notiflix.Confirm.prompt(); method for this request.
Usage: https://github.com/notiflix/Notiflix#prompt

Thanks,
Furkan.

Thank you so much @furcan for the quick update :)

Hi @erropix ,

You are welcome 😊

Have a nice week,
Furkan.