Hi George,
Query : When the user clicks opens a modal and the user either continue with the connection or just presses cancel and stays disconnected.
The requested requirement “ Changing toggle button state” can be achieved using toggle button client side event.
//Here you can define toggle button click event ‘onConnect’.
<e-content-group id="undo" >
<e-toggle-button-settings id="tglbtn" click=" onConnect” show-rounded-corner="true" default-text="Connect" active-text="Connected" />
</e-content-group>
|
//script section for Toggle button state change.
<script>
function onConnect(e) {
var r = confirm("Connect or not");
if (r == false) {
this.option('toggleState', false);
}
}
</script>
|
You can check the following api documentation link of toggle button.
For your convenient we have attached sample.