title: Call not call a function inside a FlatList in react native
body: <p>I am developing an App using react native. I want to pass a parameter to a function in my flatlist for a specific record. But, the flat list ignore this line of code:
  <code>onPress={ () =&gt; {console.log("TEST1"); this.onPressTopUp()} } /&gt;</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;FlatList
  ItemSeparatorComponent={ () =&gt; &lt;View style={ styles.rowSep } /&gt; }
  horizontal={false}
  data={this.state.result}
  
  renderItem={
       ({item}) =&gt; (
            &lt;View style={styles.containerrow}&gt;
            &lt;View style={styles.viewPark}&gt;
  
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Data_e_ora_inizio')}:
            &lt;Text style={styles.itemNormal}&gt;{item.start}&lt;/Text&gt;&lt;/Text&gt;             
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Data_e_ora_termine')}: 
            &lt;Text style={styles.itemNormal}&gt;{item.end}&lt;/Text&gt;&lt;/Text&gt;
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Energia')}: &lt;Text style={styles.itemNormal}&gt;{item.energy_delivered}&lt;/Text&gt;&lt;/Text&gt;
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Colonna')}: &lt;Text style={styles.itemNormal}&gt;{item.column_id}&lt;/Text&gt;&lt;/Text&gt;
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Costo_della_ricarica')}: 
            &lt;Text style={styles.itemNormal}&gt;€ {item.amount}&lt;/Text&gt;&lt;/Text&gt;
            &lt;Text style={styles.itemBold}&gt; {I18n.t('Aggiornamento_del')}:     
            &lt;Text style={styles.itemNormal}&gt;{item.last_update}&lt;/Text&gt;&lt;/Text&gt;
                                           &lt;/View&gt;
  
          &lt;View style={styles.rowCenter}&gt;
            &lt;Button label={I18n.t('Via_questa_ricarica')} color={defStyleValues.RechargeElectricCar} onPress={ () =&gt; {console.log("TEST1"); this.onPressTopUp()} } /&gt;
                 &lt;/View&gt;
              &lt;/View&gt;
            )
          }
      keyExtractor={item =&gt; item.id}
   /&gt;
  </code></pre>
  
  <p>Also here is my function:</p>
  
  <pre><code>onPressTopUp(columnID){
          console.log("TEST2, ", columnID);
  }
  </code></pre>
  
  <p>In other words, My problem is that I need to pass columnID of each specific row to the <code>onPressTopUp(columnID)</code> function in the FlatList. I checked the console log, even it dose't show both TEST1 and TEST2. Can you help me to do that?</p>