title: How to prevent double model in toggle button
body: <p>here <code>handelDlt</code> is onclick function of cancel button and <code>changeStatus()</code> is onclick function of toggle button, here if I want to change the status from close to open or open to close that change button functionality working fine and its give one model that do yo want to change from open to close or close to open.in toggle button functionality its working fine but 2 time its throwing the model like if i change status from open to close its throwing 2 model for cancel button like do you want to want to change from open to close and do you want to change from close to open. How can I hide the second one mode in cancel button .even I use <code>e.preventDefault()</code> but its not working</p>
  <pre><code>function changeStatus() {
      checked
        ? formik.setFieldValue(&quot;status&quot;, &quot;Closed&quot;)
        : formik.setFieldValue(&quot;status&quot;, &quot;Open&quot;);
        
    }
   let handelDlt = (e) =&gt; {
        setOpen(false);
       setChecked(!checked);
        changeStatus();
        e.stopPropagation();
    }; 
  </code></pre>