Skip to content

Run modal's OnExit function after the exit animation #306

@asdine

Description

@asdine

Using the Modal component with React-Router is difficult because when changing the route to a route that doesn't contain the Modal, the exit animation doesn't have the time to finish before the Modal is removed from the dom.
The only solution i found until now is to close the modal manually and run setTimeout(hashHistory.push('/whatever'), 500), to let the modal quit properly before being removed from the dom, but it's a pretty ugly solution.

It would be better if we could run the OnExit function (or a new one) at the end of the exit animation so we could have more control on what's happening.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions