Closed zyc closed 1 year ago
This usage is undocumented and I'm not sure for now how/if it should be fixed.
This will work:
const willOpen = () => {
console.log("I'm not lost")
}
const MySwal = withReactContent(Swal)
const MySwalMixin = MySwal.mixin({
willOpen,
})
MySwalMixin.fire({ title: <p>Hello World</p> })
This usage is undocumented and I'm not sure for now how/if it should be fixed.
This will work:
const willOpen = () => { console.log("I'm not lost") } const MySwal = withReactContent(Swal) const MySwalMixin = MySwal.mixin({ willOpen, }) MySwalMixin.fire({ title: <p>Hello World</p> })
Thanks! It worked.
After upgrading to 5x versions, the
didOpen
andwillOpen
callbacks are not fired anymore usingSwap.mixin
like this:It was working fine in 4x versions.