[ANDROID] Carousel loop doesn't behave correctly

Aperta
#2,778 14 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@nitzanyiz ci sta già lavorando.

Dal 26/10/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug

Description

Auto play(loop) carousel on android jumps through indexes randomly and at most shows only 2-3 items, for example in an array of 18 items, it will only show indexes 0,1 and then jump to 17.

Expected behavior

Carousel should loop through all items as defined by items rendered

Actual behavior

Carousel jumps through items at random and at most shows only 2-3 items

Code snippet
<Carousel
    loop={true}
    autoplay={true}
    autoplayInterval={5000}
    showCounter={true}>
        {article?.multi_images?.map((item: string, index: number) => {
             return (
                 <Card.Image
                      key={index}
                      source={{uri: `${Config.ASSETS_URL}${item}`}}
                      cover={true} 
                      aspectRatio={1.34}
                      style={{
                          borderTopLeftRadius: 15,
                          borderTopRightRadius: 15,
                          borderBottomLeftRadius: article?.has_tickers ? 0 : 15,
                          borderBottomRightRadius: article?.has_tickers ? 0 : 15,
                      }}
                  />
              );
          })}
</Carousel>

Environment
  • React Native version: 0.72.6
  • React Native UI Lib version: 7.9.1
Affected platforms
  • Android
  • iOS
  • Web
Lingua principale
TypeScript
Stelle
7.2k
Fork
749
Merge medio
29m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wix/react-native-ui-lib

Tutte le issue di wix/react-native-ui-lib

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.