Tengo un pequeño problema al restablecer mis TextInputs después de enviarlos porque se agregaron dinámicamente.
Actualmente tengo mi código js como este
<FlatList data={this.state.items} keyExtractor={(item, index) => item.party_id} renderItem={({item}) => <View style={styles.InputBox}> <TouchableOpacity style={styles.InputPartyLabel}><Text>{item.party_name}</Text></TouchableOpacity> <TextInput ref={input => { this.textInput = input }} style={styles.Input} placeholder="Number of votes" onChangeText={result => this.collateResults(item.party_name, result)} placeholderTextColor="#bbb" autoCapitalize='none' underlineColorAndroid='transparent' /> </View> } /> Agregué este ref={input => { this.textInput = input }} pero solo borra el último.
Necesitas this.textInput para ser una matriz. Y luego empuje a esa matriz al configurar las referencias
<TextInput ref={input => this.textInput.push(input)} style={styles.Input} placeholder="Number of votes" onChangeText={result => this.collateResults(item.party_name, result)} placeholderTextColor="#bbb" autoCapitalize='none' underlineColorAndroid='transparent' />