title: Passing a state variable as prop and it does not change on the first event
body: <p>I am passing a boolean managed by the state of my component to a Checkbox component but I am having issues with The checkbox responding to the changed state variable. The first time I click the checkbox that calls allRowCheck which I have verified, the check box does not change. When clicked a second time, it responds as needed and thereafter. </p>
  
  <pre><code>  render()
    {
      return(
        &lt;div&gt;&lt;Table  style = {{textAlign: 'right'}} data={this.state.testData2}
          rowStyle={(row, index) =&gt; {return { textAlign: 'right' };}}&gt;
            &lt;Table.Column
              header={&lt;Form.Checkbox checked = {this.state.allRows}  onChange={() =&gt; this.allRowCheck()}/&gt; }
              body={
                (data) =&gt; &lt;Form.Checkbox checked = {data.get('checked')} onChange={() =&gt; this.onCheck(data)}/&gt;
              }/&gt;
              &lt;Table.Column
                header={'Name'}
                body={(data) =&gt; data.get('scenarioName')} 
              /&gt;
              &lt;Table.Column
                header={'Condition'}
                body={(data) =&gt; data.get('condition')}
              /&gt;
              &lt;Table.Column
                header={'Notifications'}
                body={(data) =&gt; data.get('notifications')}/&gt;
              &lt;Table.Column
                header={'Owner'}
                body={(data) =&gt; data.get('owner')}/&gt;
        &lt;/Table&gt;&lt;/div&gt;
      )
    }
  </code></pre>
  
  <hr>
  
  <pre><code>allRowCheck = () =&gt; {
      console.log('all row checks before&gt; ', this.state.allRows);
  
  
      this.setState({
  
          testData2: this.state.testData2.map((data) =&gt; data.set('checked', !this.state.allRows)),
  
      })
      //twp set states for no reason..
      this.setState({
        allRows: !this.state.allRows
      }, () =&gt; {
        console.log('after&gt; ', this.state.allRows)
      })
  
    }
  </code></pre>