React-Native-ViewPager
React-Native-ViewPager copied to clipboard
[Android] scrollEnabled={false} does not work in IndicatorViewPager
I am setting scrollEnabled={false} for the IndicatorViewPager component but I can still manually scroll the pages by swiping on the screen on Android only.
On iOS this is working as expected when setting scrollEnabled to true or false
react-native-cli: 2.0.1 react-native: 0.46.0 [email protected]
Also happens with the plain old ViewPager component
Apparently the new prop is horizontalScroll={false}, should work on both Android & iOS. Probably need a documentation update.
@saalihou pls update the document.
I had to set both horizontalScroll={false} (for Android) and scrollEnabled={false} (for iOS) in order to work correctly. Apparently horizontalScroll={false} doesn't work on iOS. Since the component that is instantiated in iOS is a ScrollView I think setting the scrollEnabled={false} prop fixs the problem, it worked for me but I didn't research the issue in a deep. Maybe need a PR in order to unify both props and update the docs.