Fix bottom tab voiceover (#61)

* Fix bottom tab voiceover

* Remove isBottom check

* Update MaterialTopTabBar

* Remove unnecessary props on route
This commit is contained in:
Yao Hui Chua
2018-11-05 11:46:37 +08:00
committed by satyajit.happy
parent b1deb7031b
commit b797801e8f

View File

@@ -102,7 +102,10 @@ export default function createTabNavigator(TabView: React.ComponentType<*>) {
const label = this._getLabelText({ route });
if (typeof label === 'string') {
return label;
const { routes } = this.props.navigation.state;
return `${label}, tab, ${routes.indexOf(route) + 1} of ${
routes.length
}`;
}
};