Please always refer to the sweetalert2 documentation here: https://sweetalert2.github.io/#methodsIn other words, you cannot just use .then() without param inside.This is one of the examples from the documentation, how to use .then() in sweetalert2:
Swal.fire({
title: 'Do you want to save the changes?',
showDenyButton: true,
showCancelButton: true,
confirmButtonText: `Save`,
denyButtonText: `Don't save`,
}).then((result) => {
/* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) {
Swal.fire('Saved!', '', 'success')
} else if (result.isDenied) {
Swal.fire('Changes are not saved', '', 'info')
}
})
var ae = function (t, e, n, o) {// error start here row 1117
(Kt.swalCloseEventFinishedCallback = ie.bind(null, t, n, Y(), o)),
e.addEventListener(vt, function (t) {
t.target === e && (Kt.swalCloseEventFinishedCallback(), delete Kt.swalCloseEventFinishedCallback);
})}
var ae = function (t, e, n, o) {// error start here row 1117
(Kt.swalCloseEventFinishedCallback = ie.bind(null, t, n, Y(), o)),
e.addEventListener(vt, function (t) {
t.target === e && (Kt.swalCloseEventFinishedCallback(),
delete Kt.swalCloseEventFinishedCallback);// removed ()
})}
I’ve removed () and error is no longer displayed but i cant add new rowif (text == “invio”) {
Swal.fire(“Messaggi in invio”);
setTimeout(function(){ Swal.close(); }, 1000);
return true;// it should validate but does not proceed
I’ve simply removed this () from here: && Kt.swalCloseEventFinishedCallback()Kt.swalCloseEventFinishedCallback is not a functionvar ae = function (t, e, n, o) {// error start here row 1117
(Kt.swalCloseEventFinishedCallback = ie.bind(null, t, n, Y(), o)),
e.addEventListener(vt, function (t) {
t.target === e && (Kt.swalCloseEventFinishedCallback(),
delete Kt.swalCloseEventFinishedCallback);// removed ()
})}the version integrated by phpmaker is 9x how can I upgrade it to 10x?Although I think the problem that it doesn’t add the line is due to the fact that the “return true” is nested right?
You should change your code instead of sweetalert2’s.
}).then(); // ← Check this
You may try remove .then().To update sweetalert2 you may replace the JavaScript under plugins\sweetalert2, but note that it may not work because the current release version of AdminLTE uses v9.10.8. Also note there are some breaking changes: https://github.com/sweetalert2/sweetalert2/blob/master/CHANGELOG.md