react-native-pages
react-native-pages copied to clipboard
how to disable swipe ?
Hi, this is a nice library, however it would be great if it includes swipeEnabled={false} so that, instead of manually swipe one can use programmatically swiping
I've achieved this behavior with scrollEnabled
prop (undocumented) set to false
and the scrollToPage
method:
function Onboarding() {
const pages = useRef(null);
useEffect(() => {
pages.current.scrollToPage(2);
}, []);
return (
<View>
<Pages ref={pages} scrollEnabled={false}>
<View />
<View />
<View />
</Pages>
</View>
);
}