Upgrading from v2.x
Last updated
Was this helpful?
Last updated
Was this helpful?
We tried to keep the number of breaking changes as low as possible. As of now, here is the list of the changes we know you'll have to make if you're coming from Modalfy v2.
ModalOptions.shouldAnimateOut
has been droppedAs announced in the v2 release, the shouldAnimateOut
modal option has been dropped after being deprecated since June 2020. If you haven't transitioned yet, you can use or instead.
ModalOptions.animateOut
has a new mandatory callback
argumentv2.1 brought up a new way to drive animations by putting you in full control whenever a modal is being opened and/or closed: & .
Since v3, you must use the new 3rd callback
argument provided to you. This is required so that at the end of the animation(s) you'll define, for instance. Example:
Invokingcallback
is required if you are using. That's because, since v3, Modalfy relies on that callback being invoked to mark a modal as closed in its own internal state. That's whycallback
is an optionally provided argument for but always provided for.
And that's it! Everything else should just work as expected, enjoy!