react-native-swiper
react-native-swiper copied to clipboard
Clicking on Next or Prev button i get error on Android
Which OS ?
Android
Version
Which versions are you using:
- react-native-swiper v 1.5.13
- react-native v0.?.?
Expected behaviour
Navigate to the next page
Actual behaviour
Error undefined is not a function ( evaluating ;_this.scrollViewanimated > 'setPage':'setPageWithoutAnimation'')
How to reproduce it>
To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.
Steps to reproduce
- set showsButtons={true}
- click on Next or Prev button
- you will see the error
Hi, have you found a solution to this problem?
Any updates here?
this worked for me on both ios/android:
_onMarkerPressed = e => {
this.state.selectedId = e._targetInst.return.key
const markerIndex = this.state.markers.findIndex(
m => m.placeInfo.place_externalid === e._targetInst.return.key
);
this.previewPager.setPageWithoutAnimation(markerIndex);
}
what did work on iOS but NOT on android:
_onMarkerPressed = function(e) {
this.state.selectedId = e._targetInst.return.key
const markerIndex = this.state.markers.findIndex(
m => m.placeInfo.place_externalid === e._targetInst.return.key
);
this.previewPager.setPageWithoutAnimation(markerIndex);
}.bind(this)