react-native-looped-carousel icon indicating copy to clipboard operation
react-native-looped-carousel copied to clipboard

0.1.13 Didn't show image

Open huowenxuan opened this issue 6 years ago • 9 comments

        <Carousel
          delay={2000}
          style={{width, height}}
          autoplay
          bulletStyle={styles.bulletStyle}
          chosenBulletStyle={[styles.bulletStyle, styles.chosenBulletStyle]}
        >
          {urls.map(item => <Image source={{uri: item}} style={{width, height}}/>)}
        </Carousel>

But the old version did(0.1.9)

huowenxuan avatar May 29 '18 05:05 huowenxuan

I have the same issue, but only occurs when only ONE item in Carousel. But images will show up when 2 or more items in Carousel.

MobsMao avatar May 31 '18 05:05 MobsMao

Yes, but i only have one😆

huowenxuan avatar May 31 '18 05:05 huowenxuan

I had to go back to 0.1.12. In the new version if you have only one image it doesn't show.

nbastoWM avatar Jun 08 '18 14:06 nbastoWM

when length = 1 render as Image where length>1 render as Carousel

447491480 avatar Jun 11 '18 06:06 447491480

When there is only one children in carousel, no matter whether it's an image or not, it won't be displayed. I observe this behavior only on iOS (both simulator and device), Android is ok.

kaplona avatar Jul 11 '18 00:07 kaplona

Was this ever resolved? I am getting the same issue.

rarenatoe avatar Mar 15 '19 21:03 rarenatoe

Was this ever resolved? I am getting the same issue.

not sure. you can render an image when length = 1, when length > 1 render the Carousel

MobsMao avatar Mar 22 '19 02:03 MobsMao

Well, in my case that doesn't quite work, since I'm having it work along with Lightbox in order to render a gallery. But it's alright. I rolled back to 0.1.12 like someone else did before.

rarenatoe avatar Mar 22 '19 02:03 rarenatoe

Hi All, I've fixed this bug by adding the below code in method "_placeCritical": if (childrenLength === 1) { offset = 0; }

Please check the screenshot for detail: BugFixing

bob007abc avatar Sep 01 '21 15:09 bob007abc