а

Message confirm callback


#1

Is there any callback function on DHTMLX Suite 6.0 message confirm?


#2

I apologize for the lack of documentation about the usage of the confirm. We’ll try to update the docs in the near future.
You may use the Promise callback returning true/false depending on the clicked button:

dhx.confirm(config).then((i) => console.log(i));

#3

please give some sample.


#4
dhx.confirm({
	header: "confirm the action",
	text: "can you apply?",
	buttons: ["apply", "cancel"]
}).then(function(i){
	if (i){
		alert ("confirmed")
	}
	else {
		alert ("cancelled")
	}
});