Example project is not working with react-native 0.40.0
We were using autocomplete textview with earlier versions of react-native. After upgrading react-native to 0.40.0 and react to 15.4.2 we are facing few problems. Edit text is not at all focusable, results are not getting populated. Even example project is not working.
I had this same issue with new version of react.
I had the issue once where the lib wasn't listed in "Link Binary with Libraries".
Anyway, I did the following steps, and it worked:
- react-native init AwesomeProject (react-native to 0.40.0 and react to 15.4.2)
- npm install react-native-autocomplete
- open xcode
- follow installation instruction
- copy paste the sample
But if you guys can put a project on github that reproduce the problem, that would be helpful.
This is happening to me as well. Don't know what to do. I can't focus the input area to write in there. Any help? I can put my code here if that helps. (I'm new with github, and only have 4/5 months of experience with react/react-native)
I was also having trouble focusing the input area. Looking in the inspector, I found that the View element that was supposed to be below it was covering most of the input area and stealing the clicks. It seems the layout has some issues. Increasing the topMargin of the element below solved the problem for me.
<View style={{ flex: 1 }}>
<View style={{ alignItems: 'flex-start' }}>
<Autocomplete ...>
</View>
{/* The view below covers the autocomplete so it can not be focused */}
<View style={{ flex: 1, alignItems: 'flex-end'}}>
<Button ...>
</View>
</View>
Hope this helps.