You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamic Sizing is one of the powerful feature that `v5` introduces, where the library internally managed to calculate static views and list content size height and set it as the bottom sheet content height.
12
+
13
+
:::info
14
+
15
+
The mechanism was introduce previously with [useBottomSheetDynamicSnapPoints](https://gorhom.dev/react-native-bottom-sheet/v4/hooks#usebottomsheetdynamicsnappoints) hook which been deprecated with the new release.
In order to enable the dynamic sizing to work properly, you would need to follow these rules:
30
+
31
+
1. Use the pre-configured [Scrollables](./scrollables) views, including the static view [BottomSheetView](./components/bottomsheetview).
32
+
2. In order to prevent the bottom sheet a exceeding certain height, you will need to set [`maxDynamicContentSize`](./props#maxdynamiccontentsize) prop.
33
+
34
+
And remember, you can always disable the feature if its not needed by overriding the prop [`enableDynamicSizing`](./props#enabledynamicsizing) with `false`.
Copy file name to clipboardExpand all lines: website/docs/hooks.md
-45Lines changed: 0 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,51 +32,6 @@ const SheetContent = () => {
32
32
}
33
33
```
34
34
35
-
## useBottomSheetDynamicSnapPoints
36
-
37
-
A hook to simplify handling dynamic snap points, it will take an initial snap points with a placeholder for content height `CONTENT_HEIGHT` that will be replaced once the content is measured and will return:
38
-
39
-
- `animatedSnapPoints`: to provided to BottomSheet or BottomSheetModal.
40
-
- `animatedHandleHeight`: an animated handle height callback node.
41
-
- `animatedContentHeight`: an animated content height.
42
-
- `handleContentLayout`: onLayout callback to be set on BottomSheetView component.
0 commit comments