11.0.0 (2021-05-14)
🔴 Breaking change # 1 - IE11 and Legacy Edge support is DISCONTINUED
If you need to support these old browsers in your project, please use the previous major release v10.16.7
🔴 Breaking change # 2 - .queue()
, .getQueueStep()
, .insertQueueStep()
, .deleteQueueStep()
methods are REMOVED
async/await
can perfectly replace all use-cases of .queue()
.
🔴 Breaking change # 3 - deprecated lifecycle hooks are REMOVED
Replace them with new ones:
onBeforeOpen
->willOpen
onOpen
->didOpen
onRender
->didRender
onClose
->willClose
onAfterClose
->didClose
onDestroy
->didDestroy
🔴 Breaking change # 4 - deprecated animation
param is REMOVED
Use showClass
and hideClass
instead:
Swal.fire({
...
showClass: {
backdrop: 'swal2-noanimation', // disable backdrop animation
popup: '', // disable popup animation
icon: '' // disable icon animation
},
hideClass: {
popup: '', // disable popup fade-out animation
},
})
🔴 Breaking change # 5 - .swal2-header
and .swal2-content
blocks and related methods .getHeader()
and .getContent()
are REMOVED
Use these alternatives instead:
.getHeader()
->.getTitle()
.getContent()
->.getHtmlContainer()
💅 Styling change # 1 - Update buttons color
Before | After |
---|---|
💅 Styling change # 2 - Switch to CSS Grid Layout
CSS Grid provides much more possibilities for reordering elements inside a popup.