react-native-image-slider-box
react-native-image-slider-box copied to clipboard
pagination not reset when loading new images
I am using the image slider in an app similar to tinder. The slider holds images, and when you press like or dislike new data is loaded. The issue is that if I slide to the third image on the first page, when the second sets of images is loaded, the third image is shown, not the first. This is my setup
const ImageSlider = ({
images,
paginationBoxVerticalPadding,
sliderBoxHeight,
}) => {
return (
<View>
<SliderBox
sliderBoxHeight={hp(sliderBoxHeight)}
images={images}
dotColor={'#FFF'}
paginationBoxVerticalPadding={hp(paginationBoxVerticalPadding)}
inactiveDotColor={'rgba(256, 256, 256, 0.5)'}
ImageComponent={FastImage}
firstItem={0}
disableOnPress
/>
</View>
);
};