I integrated vue-swal
to show a pop-up dialog with customized functionality. However, I faced an issue while modifying the swal. In my modified version, there are 3 buttons each with specific actions that should be triggered upon clicking. But for some reason, the handler function is not being executed when a button is clicked. I tried assigning values to the buttons and using them in conditions but it's still not working. What could be causing this problem?
Here is the layout of the swal.
https://i.stack.imgur.com/1kcd6.png
And here is the relevant code:
swal({
title: `Checkpoint!`,
html: `Some Text here.
<br> <br> <b>
Some text here?
</b>
<br> <br> <br>
<button type="button" value="a" class="btn swl-cstm-btn-yes-sbmt-rqst">Yes, Submit Request</button>
<button type="button" value="b" class="btn swl-cstm-btn-no-jst-prceed">No, Just proceed</button>
<button type="button" value="c" class="btn swl-cstm-btn-cancel" >Cancel</button>`,
showCancelButton: false,
showConfirmButton: false,
}).then((result) => {
if(result.value === 'a')
{ console.log('Yes, Submit Request was Clicked!') }
else if(resule.value === 'b')
{ console.log('No, Just proceed was Clicked!') }
else
{ console.log('Cancel was Clicked!') }
})