Skip to content

About the showLength and loop problem #237

Open
@adwqqf

Description

@adwqqf

When I setting the showLength number equal to data length, the view of first card will disappear in mode "horizontal-stack" or "vertical-stack". The problem just happen in loop = true , showLength number and data length greater than or equal to 3. Example code:

const data = [{ id: '1' }, { id: '2' }, { id: '3' }];

 <Carousel
          data={data}
          width={500}
          height={400}
          loop={true}
          mode="horizontal-stack"
          modeConfig={{
            showLength: 3,
            scaleInterval: 0.2,
            stackInterval: 50,
            opacityInterval: 0.2,
          }}
          renderItem={({ item }) => (
            <View
              style={{
                borderWidth: 1,
                width: 300,
                height: 200,
              }}
            >
              <Text>{item.id}</Text>
            </View>
          )}
        />

Is it possible that I can show 3 card when I get 3 object in looping?

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions