RCTAutoComplete icon indicating copy to clipboard operation
RCTAutoComplete copied to clipboard

Example project is not working with react-native 0.40.0

Open harish-cerebrahm opened this issue 8 years ago • 4 comments

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.

harish-cerebrahm avatar Mar 07 '17 07:03 harish-cerebrahm

I had this same issue with new version of react.

Biplab2014 avatar Mar 07 '17 07:03 Biplab2014

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.

nulrich avatar Mar 07 '17 10:03 nulrich

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)

tonbiklas avatar Mar 09 '17 15:03 tonbiklas

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.

linefeedse avatar May 30 '17 11:05 linefeedse