lipis/bootstrap-sweetalert

Unknown alert type: input

Adambean opened this issue · 0 comments

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.