From a61f7dff7b95a15ddc99b968e238ad9937ae9c36 Mon Sep 17 00:00:00 2001 From: James Littlejohn Date: Mon, 21 Mar 2016 14:55:18 +1100 Subject: [PATCH] Support deeply nested scenes setting TabBar properties If a scene is nested too deeply in a component with a tab bar it loses the ability to control the visibility of the tab bar. --- src/TabBar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TabBar.js b/src/TabBar.js index cd8e5e1c6..bb9c966d7 100644 --- a/src/TabBar.js +++ b/src/TabBar.js @@ -25,6 +25,9 @@ export default class extends Component { render(){ const state = this.props.navigationState; const selected = state.children[state.index]; + while (selected.hasOwnProperty("children")) { + selected = selected.children[selected.index] + } const hideTabBar = state.hideTabBar || selected.hideTabBar; return