I got into a discussion with a coworker, he had registered a bug where one of the sub-menus was stuck in the current state when navigating to a different tab and back again.
To summarize his explanation of the bug;
This is precisely the wanted behavior, which I'm used to from ios apps( I am an IOS user ).
He is an android user and suggest the opposite, he want it to reset.
I use react-navigation to display the tabs, and this is the default behavior...
Do we need to invest time into creating an android version? or do the android users know about this "feature"?
You could add a reset (resetOnBlur) whenever the Tab changes I have something like this in my app - where I create my BottomTabNavigator:
{
backBehavior: "history",
resetOnBlur: true,
}
its pretty straight forward and easy to implement.
But also maybe this could help you: Resetting the navigation stack for the home screen (React Navigation and React Native)
Edit (my setup):
const Tabs = createBottomTabNavigator(
{
Eintragen: EntryStack,
Übersicht: CheckStack,
Monatsbericht: {
screen: MonatsberichtComponent,
navigationOptions: {
headerTitle: "Monatsbericht abschließen",
},
},
Logout: Logout,
},
{
backBehavior: "history",
resetOnBlur: true,
tabBarOptions: {
labelStyle: {
fontSize: 12,
color: "black",
},
activeTintColor: "red",
activeBackgroundColor: "#ccc",
},
}
);