title: React Native - Search for Value, Choosing from dropdwon List and Entering a new value that is not on the list
body: <p>Problem: I want the user to be able to enter a new value in text input, not only selecting one from the dropdown list.</p>
  <p>For the moment the user cannot do that. What should I fix so the user can do both?</p>
  <p>Example: The user enters the term Test, the options from the dropdown are &quot;Test1&quot;, &quot;Test2&quot;, but he wants to enter the value of &quot;Test 3&quot;. With my implementation the user is  only allowed to choose from list of dropdown</p>
  <pre><code>        const [showValueDropdown,setShowValueDropdown ] = useState&lt;boolean&gt;(false);
          const [selectedValue, setSelectedValue] = useState('');
      
      
          //Function to select from the dropdown items 
      
           const handleSelectedValues = (value: IValue): void =&gt; {
                  setShowValueDropdown(false);
                  const valueData= `${value.name} (${value.secondName})`;
                    setSelectedValue(valueData);
                 
                };
      //Function to show dropdown items with dispatch
                const selectValue= async (term: string): Promise&lt;void&gt; =&gt; {
                  const code= await LocalStorage.get(CODE); // code from backend to dispatch the request so the desired list of values can come.
                    dispatch(valueData({ CODE, term }));
                    setShowValueDropdown(term.length &gt; 0);
                  
                };
              
            
                return (
                  &lt;View&gt;
                    &lt;View&gt;
                      &lt;View&gt;            
                 &lt;TextInput
                      editable={true}                      //Text input to enter the term
                      placeholder={placeholder}
                      returnKeyType='done'
                      autoCorrect={false}
                      defaultValue={selectedValue}
                      onChangeText={text =&gt; selectValue(text)}
                    /&gt;
                  &lt;/View&gt;
                &lt;/View&gt;
      
              
                    {listofValues.length &gt; 0 &amp;&amp; showValuesDropdown  &amp;&amp; (  //Rendering selected values from text input
      
                      &lt;View&gt;
                        {listOfValues.map((value, ind) =&gt; (
                          &lt;View&gt;
                            &lt;Text
                              onPress={() =&gt; {
                                handelSelectedValues(value);
                              }}
                            &gt;
                              {value.name} ({value.nameSecond})
                            &lt;/Text&gt;
                          &lt;/View&gt;
                        ))}
                      &lt;/View&gt;
                    )}
                  &lt;/View&gt;
              
  </code></pre>