Skip to content
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

Portal not placed over react native navigation tabs #44

Open
andreiwow2 opened this issue May 22, 2023 · 7 comments
Open

Portal not placed over react native navigation tabs #44

andreiwow2 opened this issue May 22, 2023 · 7 comments

Comments

@andreiwow2
Copy link

andreiwow2 commented May 22, 2023

As noticed in the below image, my portal, which is the red background with the input, is placed inbetween the navigation view, I want it to be teleported above everything.

The host is placed in App.tsx like this

<PortalProvider>
      <InternetProvider>
        <StatusBar
          animated
          backgroundColor={colorScheme === 'dark' ? 'white' : 'black'}
          barStyle={colorScheme === 'dark' ? 'light-content' : 'dark-content'}
        />
        <UserProvider>
          <NativeBaseProvider>
            <ApolloProvider client={client}>
              <SafeAreaProvider>
                <NavigationContainer>
                  <Stack.Navigator screenOptions={{ gestureEnabled: false }}>
                    <Stack.Screen
                      options={{ headerShown: false }}
                      name="MainPage"
                      component={MainPage}
                    />
                    <Stack.Screen
                      name="MusterHalle"
                      options={{ title: 'Muster Halle' }}
                      component={MusterHallePage}
                    />
                    <Stack.Screen name="Ersatz" component={ErsatzPage} />
                  </Stack.Navigator>
                </NavigationContainer>
              </SafeAreaProvider>
            </ApolloProvider>
          </NativeBaseProvider>
          <Toast />
          <PortalHost name="mainPortal" />
        </UserProvider>
      </InternetProvider>
    </PortalProvider>

Any idea how could I achieve what I am trying to do?

image

@jackdewhurst
Copy link

jackdewhurst commented Jun 29, 2023

Exactly the same issue here observed on Android. I've not worked out a solution yet..

Screenshot_20230629-125330

@jackdewhurst
Copy link

jackdewhurst commented Jun 29, 2023

Other portal libraries like react-native-paper and react-native-portalize behave the same unfortunately..

@dentemm
Copy link

dentemm commented Aug 7, 2023

You can solve this by using FullWindowOverlay from rn-screens

<Portal>
  <FullWindowOverlay>
  {/* Your component */}
  </FullWindowOverlay>
</Portal>

@SnowingFox
Copy link

You can solve this by using FullWindowOverlay from rn-screens

<Portal>
  <FullWindowOverlay>
  {/* Your component */}
  </FullWindowOverlay>
</Portal>

But this is just valid for IOS

@jeyjeycodes
Copy link

You can solve this by using FullWindowOverlay from rn-screens

<Portal>
  <FullWindowOverlay>
  {/* Your component */}
  </FullWindowOverlay>
</Portal>

This works however, when I change the theme it decided to go behind the modal? Then I have to clear cache to make it work :(

@SnowingFox
Copy link

SnowingFox commented Aug 24, 2023

add

<Statusbar translucent />

@GhayoorUlHaq
Copy link

If you ment react-native-navigation ( from wix ):

I have to hide the bottom tab bar using mergeOptions

Navigation.mergeOptions(componentId, {
      bottomTabs: {
        visible: false,
        animate: true, // Optional: use it to animate the transition
      },
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants