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

[FEAT] - Add Prompt Dialog #42

Closed
erropix opened this issue Oct 30, 2021 · 4 comments
Closed

[FEAT] - Add Prompt Dialog #42

erropix opened this issue Oct 30, 2021 · 4 comments
Assignees
Labels
done Done enhancement New feature or request

Comments

@erropix
Copy link

erropix commented Oct 30, 2021

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

@erropix erropix added the enhancement New feature or request label Oct 30, 2021
@furcan
Copy link
Collaborator

furcan commented Nov 1, 2021

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.

furcan added a commit that referenced this issue Nov 7, 2021
Added: `Notiflix.Confirm.*` module: The `.prompt()` method has been added. ([#42](#42))
  - `Notiflix.Confirm.prompt()` method works similarly as `window.prompt()`. The client doesn't have to type a correct answer to the input element to proceed unlike the `Notiflix.Confirm.ask()` method. The client answer passes to the callback functions as a parameter and this parameter is always a `string`.

Added: `Notiflix.Loading.*` module: The `customSvgCode` option has been added for `Notiflix.Loading.custom();` method. The default is `null`. A text-based (`string`) SVG icon can be set to this option. Single quotation marks should be avoided.

Fixed: `index.d.ts`: `IConfirmOptions` interface: `zindex` property type has been fixed.

Removed: `index.d.ts`: Following types have been removed:
  - `TNotiflixCallback`
  - `TNotifyCallbackOrOptions`
  - `TReportCallbackOrOptions`
  - `TLoadingMessageOrOptions`
  - `TBlockMessageOrOptions`
  - `TBlockSelectorOrHTMLElements`

Added: `index.d.ts`: Namespaces, Functions, and Interfaces: Comments have been added for IntelliSense.

Changed: Code Review/Refactor.
@furcan
Copy link
Collaborator

furcan commented Nov 7, 2021

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.

@furcan furcan closed this as completed Nov 7, 2021
@furcan furcan added the fixed Has been fixed. label Nov 7, 2021
@erropix
Copy link
Author

erropix commented Nov 7, 2021

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

@furcan
Copy link
Collaborator

furcan commented Nov 7, 2021

Hi @erropix ,

You are welcome 😊

Have a nice week,
Furkan.

@notiflix notiflix added done Done and removed fixed Has been fixed. labels Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Done enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants