leecade / leecade/react-native-swiper
Dynamic height? Documentation claims <Swiper> adheres to `flex: 1` however...
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Why doesn't it act as a component with the flex property of flex: 1 that has been set? It does not play well with other components at all.
For example, here's a simple screen that's completely blue, all besides the bottom 200 points which is white.
<View style={{flex: 1}}>
<View style={{flex: 1, backgroundColor: 'blue'}} />
<View style={{height: 200}} />
</View>
Doing the same thing with the Swiper component yields completely different results.
<View style={{flex: 1}}>
<Swiper> { /* flex:1 by default according to docs */ }
<View style={{flex: 1, backgroundColor: 'blue'}} />
</Swiper>
<View style={{height: 200}} />
</View>
Now the entire screen is covered in blue, with the 200pts being pushed off the screen,
So how do we really make a Swiper with dynamic height?
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 two layout examples in the issue and inspect the Swiper component's default sizing behavior and documentation for its flex setting. Done means a Swiper can use dynamic height while preserving the sibling View with height: 200, with the documented behavior matching the result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100