snapTo method only works good if called two times
See original GitHub issueHey! I’m currently having some issues with snapTo
method.
If I call it to present the bottom sheet like this
// Present bottom sheet on button press
const onButtonPress = () => {
bottomSheetRef.current.snapTo(1)
}
// Hide bottom sheet on inner button press
const onInnerButtonPress = () => {
bottomSheetRef.current.snapTo(0)
}
// sheet setup
<View>
<Button onPress={onButtonPress} />
<BottomSheet
snapPoints = {[0, 250]}
renderContent = {this.renderContent} // inner button lies here
/>
</View>
So this works only if I press both buttons twice or call snapTo
twice in each function…
However snapTo
works when i hide the sheet with gesture.
Looks like you can’t use method multiple times in a row without gesture interaction. By the way, waiting time between presses doesn’t change anything
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top Results From Across the Web
reanimated-bottom-sheet snapTo function works at second ...
I'm using this code to avoid issues with snapTo(0). Method to close: closeBottomSheet = () => { if (this.bottomSheetRef && this.
Read more >Snap! Cheat Sheet - The Beauty and Joy of Computing
Snap! Cheat Sheet. This guide will show you how to match up the procedures in the AP exam language with the blocks in...
Read more >Pipeline Execute - SnapLogic Documentation - Confluence
The Pipeline Execute Snap is capable of propagating schema in both directions: upstream as well as downstream. See the example Schema ...
Read more >How to add Snap to alignment feature in FlatList in React ...
It is the best option if you have a large list to render. ... called GeeksforGeeks which we will render multiple times in...
Read more >Electronic Benefit Transfer (EBT) How to Use Your ...
Remember, you can only buy allowable food items with your SNAP benefits. • All SNAP benefit transactions are free. There is no limit...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
should be fixed on master
You also I think resolved another issue where “hide” was also opening other bottom sheets. 👏