title: I can’t modify value of a TextInput in a Flatlist
body: <p>I’m currently trying to make my own board with some data that I fetch in my <code>componentWillMount()</code>, then, I store this data in a state. Until here, all is normal, I can display my data with some <code>FlatList</code>. But, in one of them, I use a <code>TextInput</code> to change a quantity value.
  When the value is null, I can modify it without any problem. But, when there is a value (store with the fetch), I can’t modify it. When I try, the <code>TextInput</code> is replacing it by the default value. I don’t understand because in my <code>onChangeText</code>, I’m modifying the value in the array that I use.</p>
  
  <p>I'm developping with React Native and Expo.</p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;FlatList
    data={state.tableData}
    keyExtractor={item =&gt; item.product_id + ""}
    renderItem={({ item, index }) =&gt; (
      &lt;View style={[styles.columnRow, { backgroundColor: "#dff2ff" }]}&gt;
        &lt;TextInput
          style={styles.textInput}
          maxLength={10}
          textAlign={"center"}
          keyboardType={"numeric"}
          returnKeyType="next"
          blurOnSubmit={false}
          onChangeText={text =&gt; {
            let { tableData } = this.state;
            let newQte = "";
            let numbers = "0123456789";
  
            for (var i = 0; i &lt; text.length; i++) {
              if (numbers.indexOf(text[i]) &gt; -1) {
                newQte = newQte + text[i];
              } else {
                alert("Veuillez saisir uniquement des chiffres.");
              }
            }
            tableData[index].quantity = newQte;
            this.setState({
              tableData
            });
          }}
          value={item.quantity}
        /&gt;
      &lt;/View&gt;
    )}
    scrollEnabled={false}
  /&gt;;
  
  </code></pre>
  
  <p>I need to be able to modify the current value and to store it after.</p>