title: How can I enable Confirm Button on input in sweet alert 2
body: <p>I need to disable the confirm button when the user hasn't changed any value in the text box inside the sweet alert and enable it only when the value in the text box has changed but I can't seem to find a way for this. here's my code:</p>
  
  <pre><code>swal({
              title: 'Please Enter Page Name',
              input: 'text',
              inputValue: PageName,
              confirmButtonText: 'Save',
              onOpen: function (){
                  swal.disableConfirmButton(); //this disables the button
              }
              preConfirm: function (Name) {
                  return new Promise(function (resolve, reject) {
                      resolve();
                  })
              },
              allowOutsideClick: false
          })
  </code></pre>
  
  <p>I used <code>onOpen</code> to fire the <code>swal.disableConfirmButton();</code> method but I don't know where to use <code>swal.enableConfirmButton();</code>. is there any function like <code>onInput</code> or something similar? If yes how to use that to achieve the desired result?</p>
  
  <p>here's a codepen of what I have achieved so far.</p>
  
  <p><a href="https://codepen.io/zeeshanadilbutt/pen/NLvmZz?editors=0010" rel="noreferrer">https://codepen.io/zeeshanadilbutt/pen/NLvmZz?editors=0010</a></p>