Skip to content

Modal.setCloseCallback method

Modal › setCloseCallback

Official

Set the callback to be called when the modal is closed.

Signature:

setCloseCallback(callback: () => unknown): this

Parameters:

Parameter Type Description
callback () => unknown The callback to be called when the modal is closed.

Returns: thisThe modal instance.

Since: 1.10.0

Example:

modal.setCloseCallback(() => {
console.log('Modal closed');
});