onChangeText never fires
See original GitHub issueI am trying to make an autocomplete to select a geographic area from the api. onChangeText should trigger a query to search the location, and then the result should update the view. but the event never fires. I am using native base and mobx
<Item floatingLabel >
<Label>Location</Label>
<View style={autocompleteStyles} elevation={1}>
<Autocomplete
data={this.props.store.profileLocationResults.toJS()}
defaultValue={this.state.query}
onChangeText={text =>{
console.log('location autocomplete text changed %s',text);
this.setState({ query: text });
this.props.store.autocompleteProfileLocation(text);
}}
renderTextInput={(props)=><Input {...props} />}
renderItem={item => (
<TouchableOpacity onPress={() => this.setState({ query: item.displayname, location: item._id })}>
<Text>{item}</Text>
</TouchableOpacity>
)}
/>
</View>
</Item>
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Autocorrect on iOS doesn't fire onChangeText in react-native
Select the autocorrect from the top of the keyboard. By checking logs etc you will know it hasn't fired any onChangeText event. Any...
Read more >TextInput - React Native
onChangeText . Callback that is called when the text input's text changes. Changed text is passed as a single string argument to the...
Read more >Can't modify text in TextInput onChangeText callback on Android
Bug Report On Android, modifying the text within the onChange (or onChangeText) callback causes corruption of the text in the TextInput.
Read more >onChangeText not working as expected while using useState
The Keybord Closes after each keyPress. I followed this while trying to handle TextInputs but the keyboard closes every time I press a...
Read more >TextInput · React Native
The simplest use case is to plop down a TextInput and subscribe to the onChangeText events to ... Callback that is called when...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think issuer didn’t give enough detail. I am facing the same issue. Whenever I use
<Item>of Nativebase was the wrapper for Autocomplete then it brakes.In mycase, I am using <Item regular> it works fine with
onChangeTextbut breaks withrenderItemmethod’sonPressevent never get fired.Pasting my code below:
Autocomplete:
Using AutoComplete in my project:
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.