gijgo
gijgo copied to clipboard
Let user confirm dialog close, how?
Hello Team,
I am using the dialog component in one of my projects. It works perfect, except I can't find a way to let user confirm "Are you sure to close the modal?" when close button is clicked.
the close() event does not help, neither does the closing() event. The closing event has already started and I can't stop it.
Where I should put the confirm code?
if (confirm('Are you sure to close the modal?')) {
// close dialog
}
Please advice.