There is a dialog box and an array of buttons. Code example
f7.dialog.create({
title : 'Dialog WIndow',
text : 'text',
buttons: [
{
text: 'OK'
onClick: (dialog) => callback(dialog)
},
{
text: 'Cancel'
onClick: (dialog) => callback(dialog)
},
]
}).open();
How do I find out which button the click event occurred on (the button is ‘OK’ or ‘Cancel’), because in the callback function we will get the dialog object completely?