-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Can't able to use Gorhom bottom sheet in child components #2045
Comments
@gorhom can you please help me resolve this issue |
@devchandhana12 You need to use the |
I've solved the issue by wrapping it inside portals, |
I've resolved the issue by adding portals, I've used gorhom portal library, wrapped my app inside it and then wrapped my bottom sheet code inside it. Now, it's over written it's parents styles and it displayed on top of everything. Thanks !! |
Here is the solution; Use BottomSheetModal in CustomSheetComponent. |
@devchandhana12 hello Can you tell me how you solved it? Reproduction sample |
So, I've tried solving it with by wrapping it up in portal's but it reduced the performance of app greatly, so I've used BottomSheetModal import React, {forwardRef, useMemo} from 'react'; export type Ref = BottomSheetModal; interface Props { const CustomBottomSheet = forwardRef<Ref, Props>(({children, height}, ref) => { return ( export default React.memo(CustomBottomSheet); this is the component which I've created |
Version
v5
Reanimated Version
v3
Gesture Handler Version
v2
Platforms
iOS, Android
What happened?
Hi, does anyone have any solution to this which I'm currently facing. I've a need to use gorhom bottom sheet inside a child component, when the bottom sheet is supposed to open at the bottom of the screen, currently it's opening at the place where the component starts in a screen. Will be attaching the screen shot for reference.
Reproduction steps
I've tried replicating the issue below please click on tap me to find the issue
Reproduction sample
https://snack.expo.dev/2sTFgkI93fIJEas1Qp2tB
Relevant log output
No response
The text was updated successfully, but these errors were encountered: