title: Set checkbox to checked based on other inputs values
body: <p>I want to set the checkbox input to checked if specific inputs is filled with values but with the option to change checkbox to unchecked again.</p>
  
  <p>the business need requires that this checkbox should be set to checked automatically if the user filled the required inputs but with the option to set it back to unchecked if he wants.(user experience stuff)<a href="https://i.stack.imgur.com/JpF4L.png" rel="nofollow noreferrer">usecase demo</a></p>
  
  <p>Consider the following code:</p>
  
  <pre><code>     autoAddFinalEvaluation = () =&gt; {
        const {channelValue, evaluationValue, txtValue} = this.state;
        if(channelValue !== null &amp;&amp; evaluationValue !== null &amp;&amp; txtValue !== '') {
          this.setState({
            checked: true
          })
        } 
      }
  </code></pre>
  
  <p>i updated the state dynamically like this </p>
  
  <pre><code>  autoAddFinalEvaluation = () =&gt; {
      const {channelValue, evaluationValue, txtValue} = this.state;
      if(channelValue !== null &amp;&amp; evaluationValue !== null &amp;&amp; txtValue !== '') {
        this.setState({
          checked: !this.state.checked
        })
      }
    }
  </code></pre>
  
  <p>now i can set the checkbox normally but still not working as i expect, while filling the 3rd input(text area) the checkbox switches from true to false and vice versa. </p>