siemiatj / react-native-modal-dropdown

Fork of the original https://github.com/sohobloo/react-native-modal-dropdown
MIT License
119 stars 98 forks source link

Updated touchable components and added new Expo example with newer React Native version #10

Closed donni106 closed 4 years ago

donni106 commented 4 years ago

I had problems in a project, where I updated the React Native version. The fix is mentioned here: https://github.com/sohobloo/react-native-modal-dropdown/issues/251#issuecomment-673422043 There should not be two touchable components nested. So I wanted to update the example in this repository. Problem was, that the update of React Native from 0.53.0 made problems. I decided to setup a new example with using Expo (latest SDK 38), which uses React Native 0.62.2.

After that I decided to resolve some open issues. I wanted to make the used touchable component less hard coded. So I created new props to pass components and props for the rendered rows of the dropdown and the main button.

Resolves #7

I encountered problems with using TouchableNativeFeedback on Android. I wanted this as default, but the onPress is not triggered for some weird reason. One can read about problems with that component in the web and also on the official documentation: https://reactnative.dev/docs/touchablenativefeedback

At the moment it only supports having a single View instance as a child node...

Maybe there is a way to fix that, but I did not find out.

With doing that, it was a small addition to add also new props to be passed for the Text, which is rendered when not passing renderRow.

Resolves #5

donni106 commented 4 years ago

@siemiatj is there a way to assist you with managing pull requests? It would be nice to go on here and grab further issues.