title: How to detect outside textInput touch In React-native
body: <p>I have created on custom dropdown list View that I am showing on click of TextInput. Users can search as well as select items from that list. Now I want to close that window on click outside of that <code>TextInput</code> How to set visibility false on touch outside of <code>TextInput</code>.</p>
  <pre class="lang-js prettyprint-override"><code>{modalVisible ? 
      (
        &lt;View style={styles.emailItem}&gt;
        &lt;ShowCustomDropdown globalsearchdata={globalsearchdata} /&gt;
        &lt;/View&gt;
      ) : null}
      &lt;View style={styles.textinputstyle}&gt;
         &lt;TextInput
           onTouchStart={()=&gt; setModalVisible(true)}
           onChangeText={handleChange}
           style={styles.searchInput}
           placeholder=&quot;Type a message&quot;
           value={search_term}
         /&gt;
     &lt;/View&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/vnWE8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vnWE8.png" alt="enter image description here" /></a></p>