yarn sweetalert2 7.10.0
DismissReason enum

latest releases: 11.11.0, 11.10.8, 11.10.7...
6 years ago

Thanks to @toverux and his idea, now we have improved the way of handling dismissals:

Legacy, still works:

if (dismiss == 'overlay') {
    //
}

NEW RECOMMENDED WAY 🎉 🎉 🎉

if (dismiss == swal.DismissReason.backdrop) {
    //
}

⚠️ ⚠️ ⚠️ DEPRECATION WARNING ⚠️ ⚠️ ⚠️

'overlay' is DEPRECATED and replaced by DismissReason.backdrop, it will stop work in the next major release.

Don't miss a new sweetalert2 release

NewReleases is sending notifications on new releases.