circleLoop not working properly
YankovWeb opened this issue ยท 3 comments
YankovWeb commented
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch react-native-image-slider-box@2.0.7
for the project I'm working on.
circleLoop not working properly is scrolling to the first image and is not looking as infinity loop.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-image-slider-box/dist/SliderBox.js b/node_modules/react-native-image-slider-box/dist/SliderBox.js
index 476963c..a2f4b32 100644
--- a/node_modules/react-native-image-slider-box/dist/SliderBox.js
+++ b/node_modules/react-native-image-slider-box/dist/SliderBox.js
@@ -58,7 +58,7 @@ export class SliderBox extends Component {
}
onSnap(index) {
- this._ref.snapToItem(index);
+ //this._ref.snapToItem(index);
const { currentImageEmitter } = this.props;
this.setState({ currentImage: index }, () => {
if (currentImageEmitter) {
This issue body was partially generated by patch-package.
Tina-Mai commented
how can I use this patch?
YankovWeb commented
how can I use this patch?
Go to this file in your project
node_modules/react-native-image-slider-box/dist/SliderBox.js
And find the red line and change it with the green line.
then use patch:
https://www.npmjs.com/package/patch-package
To be able to share the changes in git repo.
Tina-Mai commented
thanks for the quick response!