How to obtain the status of the confirmation deletion pop-up box in Gantt's onLightboxDelete

Hello, I would like to ask how to obtain the status of the confirmation deletion pop-up box in Gantt’s onLightboxDelete. If the user confirms the deletion, execute the following code. Otherwise, the cancellation task pop-up box still exists。I hope you can reply as soon as possible,thanks.

Here is my code:
// delete task
gantt.attachEvent(“onLightboxDelete”, async function (id) {
SaleApi.deleteSaleApi(id).then(res => {
gantt.deleteTask(id);
message.success(‘delete success’)
return true
})
})

Hello Mike,
Gantt doesn’t have an event that fires after you pressed on a button in the confirm box.
You need to show a custom box inside the onLightboxDelete event handler and return false to not sow the default popup:
https://docs.dhtmlx.com/gantt/desktop__message_boxes.html#confirmmessagebox

When you click on a button there, Gantt calls the callback function. And depending on the result (button), you can run different code.

Here is an example in the snippet:
https://snippet.dhtmlx.com/eb66wfue