title: How to get boolean data from API selected in a Dropdown (REACT)?
body: <p>I created a dropdown with "true" and "false" options. I get from my API all of my data in a table.</p>
  
  <p>On update, I've got a form that gets the row data. With boolean values, it gets true/false just if I let the html type on "text".</p>
  
  <p>I want to use the dropdown but at the moment it's static so it's always on "true".</p>
  
  <p>How can I select the right value and update the change?</p>
  
  <p><strong>toSelectOption.js</strong></p>
  
  <pre><code>export const trueFalse = [
      { label: "true", value: "Y" },
      { label: "false", value: "F" }
  ];
  </code></pre>
  
  <p><strong>Update.jsx</strong></p>
  
  <pre><code>renderTrueFalse() {
      return trueFalse.map((item) =&gt; {
          if (this.state.showKey === true) {
              return (
                  &lt;option value={item.value}&gt;{item.label}&lt;/option&gt;
              );
          }
      });
  }
  
      //...
      &lt;Formik
          initialValues={{
              //...
              showKey,
              //...
  
          }}
          onSubmit={this.onSubmit}
          //...
          {
              (props) =&gt; (
                  &lt;Form&gt;
                      //...
  
                          &lt;Col md="3"&gt;
                              &lt;FormGroup&gt;
                                  &lt;label&gt;Show Key&lt;/label&gt;
                                  &lt;Field className="form-control" component="select"
                                         name="showKey"&gt;
                                      {this.renderTrueFalse()}
                                  &lt;/Field&gt;
                              &lt;/FormGroup&gt;
                          &lt;/Col&gt;
  
                      //...
                      &lt;div className="d-flex justify-content-center"&gt;
                          &lt;MDBBtn type="submit"
                                  className="btn btn-outline-success waves-effect"&gt;Salva&lt;/MDBBtn&gt;
                      &lt;/div&gt;
  
                  &lt;/Form&gt;
              )
          }
      &lt;/Formik&gt;
      //...     
  
  </code></pre>