leecade / leecade/react-native-swiper
Adjacent pages not showing up
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Basically only page 0 is shown until scrolled, then page 1 and page 2 get visible.
When I first load up the page, the page 0 gets shown, it slides automatically to page 1 that is not rendered, also page 2 is not rendered. Once I tap on the Swiper and move it a bit, then all the pages get rendered. How to get them rendered correctly?
<Swiper style={styles.horizontalSwiper} index={1} width={width * 0.8}>
<View style={styles.slide1}>
<Text style={styles.text}>Page 0</Text>
</View>
<View style={styles.slide2}>
<Text style={styles.text}>Page 1</Text>
</View>
<View style={styles.slide3}>
<Text style={styles.text}>Page 2</Text>
</View>
<View style={styles.slide1}>
<Text style={styles.text}>Page 3</Text>
</View>
</Swiper>
horizontalSwiper: {
overflow: 'visible'
},
removeClippedSubviews={false} fixes the issue, but it should not be the case when I have index={1} set up and page 1 gets never rendered.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported Swiper example with index={1}, width={width * 0.8}, overflow: 'visible', and removeClippedSubviews left at its default. Compare initial rendering with removeClippedSubviews={false}; done means pages 1 and 2 render correctly on initial load without tapping or scrolling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100