leecade / leecade/react-native-swiper
slider doesn't show previous button and dots don't move
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Which OS ?
io8
Version
Which versions are you using:
react-native-swiper@^1.5.13
- react-native-swiper v?
- react-native v0.?.?
react-native: 0.51.0
Expected behaviour
I have a swiper that is getting data from firestore. I've pulled the data into an array of 'this.state.items'. I'm using a map function to populate the swiper icons. For some reason my back button won't show if i place the prop 'loop' to false. If i remove this then it populates. The second issue is the dot indicator doesn't show that I've scrolled. I've tested this out on another page with three views and it all worked.
Actual behaviour
placed all info in expected behavior.
How to reproduce it>
To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.
<Swiper style={styles.wrapper}
showsButtons={true}
loop={false}
nextButton={<Text style={{fontSize: 20, color: 'white', fontWeight: 'bold'}}> > }
prevButton={<Text style={{fontSize: 20, color: 'white', fontWeight: 'bold'}}> {'<'} }
bounces={true}
dotColor={'white'}>
{this.state.reservations.map(function(item, key){
console.log(item);
return (
<View key={key} style={{flex: 1, justifyContent: 'center'}}>
<ImageBackground
style={{height: 380, width: 300, alignSelf: 'center',}}
source={require('./images/icons_assets/Voucher.png')}>
<Image
imageStyle={{resizeMode: 'stretch'}}
style={{height: 150, width: 300, alignSelf: 'center',}}
source={require('./parkImg.jpg')}/>
{item.displayName}
{item.address}
{item.date}
{item.timePeriod}
)
})}
Steps to reproduce
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 from the supplied usage in the issue and compare it with an example in the examples folder, focusing on loop={false}, the mapped reservations data, the previous button, and dot state. Reproduce both reported behaviors with changing data, then confirm that the previous button appears when appropriate and the dot indicator tracks the current slide.
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
- Needs clarification
- Newbie friendliness
- 28/100