-
-
Notifications
You must be signed in to change notification settings - Fork 921
Open
Labels
bugSomething isn't workingSomething isn't workingv4Written in Reanimated v2Written in Reanimated v2v5
Description
Bug
I need bottom sheet modals to adjust to its content height. I have found enableDynamicSizing prop in documentation and a pull request regarding dynamic sizing:
#1513
I have checked the example on how to use it here:
Unfortunately bottom sheet height is not calculated properly. First modal appears good because it has snap points set. Second is displaying like content would be of height 0
Screen.Recording.2024-01-23.at.23.32.06.mov
Environment info
"@gorhom/bottom-sheet": "^4.6.0",
"react-native": "^0.73.2",
| Library | Version |
|---|---|
| @gorhom/bottom-sheet | 4.6.0 |
| react-native | 0.73.2 |
| react-native-reanimated | 3.6.1 |
| react-native-gesture-handler | 2.14.0 |
Steps To Reproduce
Import BottomSheetModal from module, use it as presented in example and docs. Content height is not calculated
Describe what you expected to happen:
Modal appears with height adjusted to its content
Reproducible sample code
<BottomSheetModal ref={ref} enableDynamicSizing>
<BottomSheetView>
<View style={{height: 200, backgroundColor: 'black'}} />
</BottomSheetView>
</BottomSheetModal>
lauridskern, flo-sch, bewallyt, adelbeke, todorone and 8 more
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingv4Written in Reanimated v2Written in Reanimated v2v5