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

Unknown alert type: input #69

Open
Adambean opened this issue Aug 12, 2017 · 0 comments
Open

Unknown alert type: input #69

Adambean opened this issue Aug 12, 2017 · 0 comments

Comments

@Adambean
Copy link

Adambean commented Aug 12, 2017

Whenever I try to create an alert using "input" type for a prompt() replacement this component claims that type "input" is invalid and a regular alert() replacement appears instead.

My parameters object at the time of checking for a valid type is:

allowOutsideClick: false
cancelButtonClass: "btn-default"
cancelButtonText: "Cancel"
closeOnCancel: true
closeOnConfirm: true
confirmButtonClass: "btn-primary"
confirmButtonText: "OK"
containerClass: ""
doneFunction: ƒ (value)
imageSize: null
imageUrl: null
showCancelButton: false
text: "How many beans would you like?"
textClass: ""
timer: null
title: "Prompt"
titleClass: ""
type: "input"

The exact object I give to sweetAlert() is:

{
title: params.typeText,
text: params.text,
type: "input",
showCancelButton: true,
confirmButtonText: params.buttonTextOk,
confirmButtonClass: params.confirmButtonClass,
showCancelButton: params.inputRequired ? false : true,
cancelButtonText: params.buttonTextCancel,
inputPlaceholder: params.inputPlaceholder,
closeOnConfirm: true,
closeOnCancel: true,
}

The params object is of course variable from a wrapper function.

I am using the latest dev/master version of this component.

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

No branches or pull requests

1 participant