Closed lateefbeats closed 4 years ago
The contents are in a ScrollView
and there's not yet a prop to pass options to it.
https://github.com/peacechen/react-native-modal-selector/blob/master/index.js#L272
A new prop such as scrollViewProps
could be added to pass any props to it. In your case it would be the horizontal
prop.
https://reactnative.dev/docs/scrollview#horizontal
This is a community supported library and your contributions are welcome. Please submit a PR and I'll review promptly.
Ok thanks, I'll see what I can do when I have a moment would be happy to help
scrollViewPassThruProps
has been published in 2.0.2.
Example:
<ModalSelector
...
scrollViewPassThruProps={{horizontal: true, showsHorizontalScrollIndicator: false}}
/>
Note that RNMS sets the the options container to flexDirection: row
if if detects the horizontal prop. That would be the sensible use case, but let me know if you need it set differently.
Is it possible to display all options inline instead of vertically? I tried passing 'flex-direction:'row'' etc to all the various style props but nothing worked. I'm trying to target the TouchableOpacity element but none of the style props seem to effect that.