-
Notifications
You must be signed in to change notification settings - Fork 24.9k
Closed
Labels
Platform: iOSiOS applications.iOS applications.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
Explain what you did:
Implemented a column ScrollView (say 400 in height) with smaller height cards inside it (say 100 in height).
Added:
pagingEnabled
snapToAlignment={'start'}
snapToInterval={100}
what you expected to happen:
I expected the scroll to stop every 100
what actually happens:
but instead kept paging at 400.
Reproduction Steps and Sample Code
var _scrollView: ScrollView;
return (
<ScrollView
pagingEnabled
contentContainerStyle={{height: 400}}
ref={(scrollView) => { _scrollView = scrollView; }}
snapToAlignment={'start'}
snapToInterval={100}
>
{this.state.contentArray.map((text, index) => <Text style={{height: 100} key={index} >{data}</Text>)}
</ScrollView>
Solution
Clearer documentation. And status update with the Android implementation: #1532
Additional Information
- React Native version: "react-native": "0.40.0",
- Platform: iOS (Android ideally)
- Development Operating System: MacOS
- Dev tools: Xcode and iOS emulator iPhone 6
Metadata
Metadata
Assignees
Labels
Platform: iOSiOS applications.iOS applications.Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.