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

Problem with material-top-tabs after device orientation change #6688

Closed
KacperKozak opened this issue Nov 13, 2019 · 3 comments
Closed

Problem with material-top-tabs after device orientation change #6688

KacperKozak opened this issue Nov 13, 2019 · 3 comments

Comments

@KacperKozak
Copy link

Current Behavior

image

Expected Behavior

  • Tabs should re-render after orientation change.

How to Reproduce

  1. Run very basic tab navigator eg:
import React from 'react'
import { Text, View } from 'react-native'
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs'
import { NavigationNativeContainer } from '@react-navigation/native'

const Tab = createMaterialTopTabNavigator()

export const App = () => (
    <NavigationNativeContainer>
        <Tab.Navigator>
            <Tab.Screen name="Aaaaa" component={Screen} />
            <Tab.Screen name="Bbbbb" component={Screen} />
            <Tab.Screen name="Ccccc" component={Screen} />
        </Tab.Navigator>
    </NavigationNativeContainer>
)

const Screen = () => (
    <View style={{ borderColor: 'gray', borderWidth: 10, flex: 1 }}>
        <Text>Screen</Text>
    </View>
)

AppRegistry.registerComponent('App', () => App)
  1. Change to the second tab
  2. Rotate device
  3. Re-try because sometimes the first attempt will work correctly

Your Environment

  • Devices: iOS and Android.
  • Versions:
     "react": "16.9.0",
     "react-native": "0.61.2",
     "@react-navigation/core": "^5.0.0-alpha.22",
     "@react-navigation/material-top-tabs": "^5.0.0-alpha.17",
    
@satya164
Copy link
Member

Hey, you can upgrade react native tab view and the should be fixed.

@satya164 satya164 transferred this issue from react-navigation/navigation-ex Feb 7, 2020
@damsonFilipson
Copy link

damsonFilipson commented Nov 30, 2022

Problem still exists, at least on android. @satya164 do you remember what was the problem?

@github-actions
Copy link

Hey! This issue is closed and isn't watched by the core team. You are welcome to discuss the issue with others in this thread, but if you think this issue is still valid and needs to be tracked, please open a new issue with a repro.

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

3 participants