title: find a value in a Array in reactjs
body: <p>I have Declared options as</p>
  
  <pre><code>let options : any[] ;
  </code></pre>
  
  <p>and populated it using json response , I am using </p>
  
  <pre><code>&lt;Select.Creatable
                                      ref="newSource_select"
                                      options={this.state.Options}
                                      id="newSource"
                                      value={this.state.newSource}
                                      onChange= {this.updateNewSource}                                       
                                      labelKey="label"
                                      valueKey="value"
                                      placeholder="Select New Source..."
                              /&gt;
  
   options =['value1' : 'value1' ,
            'value2' : 'value2'
            'value3' : 'value3' ]  // options values entered as mentioned ,
  </code></pre>
  
  <p>When i enter a value which in not in the options , it will provide a option to create a tag , tag is been created , but  iam not able to view it in the options immediately , when the modal is closed and opened again , the entered option in been showed in the options of select . how can i resolve this   </p>
  
  <p>it is returning -1 ,  </p>