Skip to content

Try to solve closing Dialogs with transition using useImperativeHandle #1178

Open
@acelaya

Description

@acelaya

As described in hypothesis/client#5520, when a Dialog is closed from the outside using the raw callback that was passed to onClose, the out transition is not respected, as that's an internal implementation detail.

An attempt to solve this was done in #1131, but the result was too complex and convoluted, that we decided to not go that way.

We want to try and use useImperativeHandle in order to expose the closeHandler that wraps onClose, but taking the transition into consideration.

That way, consumers would be able to properly close the Dialog with a transition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions