React-Native-ViewPager icon indicating copy to clipboard operation
React-Native-ViewPager copied to clipboard

[Android] scrollEnabled={false} does not work in IndicatorViewPager

Open loomis17 opened this issue 8 years ago • 4 comments

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]

loomis17 avatar Sep 14 '17 17:09 loomis17

Also happens with the plain old ViewPager component

saalihou avatar Dec 17 '17 20:12 saalihou

Apparently the new prop is horizontalScroll={false}, should work on both Android & iOS. Probably need a documentation update.

saalihou avatar Dec 17 '17 20:12 saalihou

@saalihou pls update the document.

ghost avatar Jan 15 '18 12:01 ghost

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.

emmavault avatar Jan 23 '18 14:01 emmavault