[v5] | [v2] unable to call `snapToIndex`
Bug
Environment info
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 5.0.0-alpha.10 |
| react-native | 0.74.3 |
| react-native-reanimated | 3.14.0 |
| react-native-gesture-handler | 2.17.1 |
Steps To Reproduce
- Setup BottomSheet component
- Try calling
snapToIndex
Describe what you expected to happen:
- It should not throw the error
'index' was provided but out of the provided snap points range! expected value to be between -1, 0
Reproducible sample code
https://snack.expo.dev/@mohan1o1/brave-green-milkshake?platform=android
you need to disable the enableDynamicSizing , since you did not wrap you bottom sheet content with BottomSheetView
Thanks for letting me know. Making enableDynamicSizing: false works fine.
Couldn't get why it's not working without explicitly setting it false though since the default value is false here
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Thanks for letting me know. Making
enableDynamicSizing: falseworks fine.Couldn't get why it's not working without explicitly setting it false though since the default value is false here
Same issues here.
It works fine after add enableDynamicSizing={false}, but don't understand why the document's @default false doesn't work.