Open JonasHiltl opened 1 year ago
@gorhom bump?
I too am having this issue, I am making a select component and using it inside of a BottomSheetModal
This works, however my component is rendered on the same level as the bottom sheet. If i move the PortalHost
outside of the BottomSheetModalProvider
then the component does not render at all.
<PortalProvider>
<BottomSheetModalProvider>
{ ... rest of code }
<PortalHost name="SelectHost" />
</BottomSheetModalProvider>
</PortalProvider>
In the docs the use of FullWindowOverlay
is recommended. However, again, if the PortalHost
is outside of the BottomSheetModalProvider
then i do not see my component being rendered, and if it is inside of the BottomSheetModalProvider
then something is rendered and blocking the UI but nothing is displayed. This may part be due to the fact that i cannot pass the style
prop to FullWindowOverlay
as this property does not exist / is not supported by it.
I have an App with a
TabNavigator
and in one of the Tab screens I display aBottomSheetModal
. The provider for thisBottomSheetModal
is in the same screen, since I want the model to be displayed behind theTabBar
.But I also have a
Portal
in the model which I want to display above theTabBar
, so I placed myPortalProvider
andPortalHost
outside of the screen above myTabNavigator
, notably above theBottomSheetModalProvider
. When thePortal
has no custom hostname it uses theBottomSheetModalProvider
as thePortalProvider
, which I expected, sinceBottomSheetModalProvider
wraps aPortalProvider
.But when a hostName is specified (see example below) the Portal is not displayed at all, like the
PortalHost
couldn't be found. So it skips theBottomSheetModalProvider
but does not find thePortalHost
above it.An example screen in the
TabNavigator
:Could this be fixed by using a custom
hostName
insideBottomSheetModalProvider
, so that custom portals don't use that as the host?