-
-
Notifications
You must be signed in to change notification settings - Fork 917
Closed
Labels
Description
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS
What happened?
When setting animateOnMount={false} and providing an index that is greater than 0 with an array of snapPoints that has at least 2 snap points it throws the following error:
'index' was provided but out of the provided snap points range! expected value to be between -1, 0
This is replicable while setting either enableDynamicSizing as true or false.
Reproduction steps
- Render a
BottomSheetwithanimateOnMount={false}and provide a couplesnapPoints:
<BottomSheet
enableDynamicSizing={false}
animateOnMount={false}
snapPoints={[200, 500]}
index={1}>
<BottomSheetScrollView>
...
</BottomSheetScrollView>
</BottomSheet>
-
Set
indexto be greater than 0 (but still a valid option in thesnapPointarray. -
Get
'index' was provided but out of the provided snap points range! expected value to be between -1, 0error even thoughsnapPoints[1]is a valid array option.
Reproduction sample
https://snack.expo.dev/@seba1342/bottom-sheet---issue-reproduction-template
Relevant log output
'index' was provided but out of the provided snap points range! expected value to be between -1, 0Reactions are currently unavailable