react-native-image-slider-box icon indicating copy to clipboard operation
react-native-image-slider-box copied to clipboard

pagination not reset when loading new images

Open nicoladj77 opened this issue 3 years ago • 0 comments

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>
  );
};

nicoladj77 avatar Apr 14 '22 15:04 nicoladj77