Skip to content

Ability to handle overlay/close clicks in Dialog component, onBeforeClose #1649

@malimccalla

Description

@malimccalla

I am implementing the Dialog component and need to show a "are you sure you want to discard" confirmation message when the user attempts to close the dialog.

Is it possible to run logic before closing the Dialog?

I am able to do this with the onCancel property but it appears it only triggers when the cancel button is clicked not when the modal is closed by clicking the overlay when shouldCloseOnOverlayClick is set to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementquestionA question around API, functionality, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions