@@ -214,7 +214,11 @@ res.tabBarVisible=false;
214214res . tabBarVisible = false ;
215215}
216216
217- if ( hideNavBar ) {
217+ if ( navigationParams . hideNavBar != null ) {
218+ if ( navigationParams . hideNavBar ) {
219+ res . header = null ;
220+ }
221+ } else if ( hideNavBar ) {
218222res . header = null ;
219223}
220224
@@ -304,17 +308,17 @@ this.ref=ref;
304308{
305309var navigation = this . props . navigation ;
306310if ( ! navigation || ! navigation . state ) {
307- return _react2 . default . createElement ( Component , _extends ( { ref :this . onRef } , this . props , { __source :{ fileName :_jsxFileName , lineNumber :307 } } ) ) ;
311+ return _react2 . default . createElement ( Component , _extends ( { ref :this . onRef } , this . props , { __source :{ fileName :_jsxFileName , lineNumber :311 } } ) ) ;
308312}
309- return _react2 . default . createElement ( Component , _extends ( { ref :this . onRef } , this . props , extendProps ( navigation . state . params , store ) , { name :navigation . state . routeName , __source :{ fileName :_jsxFileName , lineNumber :309 } } ) ) ;
313+ return _react2 . default . createElement ( Component , _extends ( { ref :this . onRef } , this . props , extendProps ( navigation . state . params , store ) , { name :navigation . state . routeName , __source :{ fileName :_jsxFileName , lineNumber :313 } } ) ) ;
310314} } ] ) ; return Wrapped ; } ( _react2 . default . Component ) , _class . propTypes = { navigation :_propTypes2 . default . object } , _temp ) ;
311315
312316return wrapper ( Wrapped ) ;
313317}
314318
315319
316320function StatelessWrapped ( _ref5 ) { var navigation = _ref5 . navigation , props = _objectWithoutProperties ( _ref5 , [ 'navigation' ] ) ;
317- return _react2 . default . createElement ( Component , _extends ( { } , props , { navigation :navigation } , extendProps ( navigation . state . params , store ) , { name :navigation . state . routeName , __source :{ fileName :_jsxFileName , lineNumber :317 } } ) ) ;
321+ return _react2 . default . createElement ( Component , _extends ( { } , props , { navigation :navigation } , extendProps ( navigation . state . params , store ) , { name :navigation . state . routeName , __source :{ fileName :_jsxFileName , lineNumber :321 } } ) ) ;
318322}
319323StatelessWrapped . propTypes = {
320324navigation :_propTypes2 . default . object } ;
@@ -413,7 +417,7 @@ delete commonProps.children;
413417delete commonProps . component ;
414418
415419for ( var _iterator4 = Object . keys ( commonProps ) , _isArray4 = Array . isArray ( _iterator4 ) , _i5 = 0 , _iterator4 = _isArray4 ?_iterator4 :_iterator4 [ typeof Symbol === 'function' ?typeof Symbol === 'function' ?typeof Symbol === 'function' ?Symbol . iterator :'@@iterator' :'@@iterator' :'@@iterator' ] ( ) ; ; ) { var _ref7 ; if ( _isArray4 ) { if ( _i5 >= _iterator4 . length ) break ; _ref7 = _iterator4 [ _i5 ++ ] ; } else { _i5 = _iterator4 . next ( ) ; if ( _i5 . done ) break ; _ref7 = _i5 . value ; } var pkey = _ref7 ;
416- if ( dontInheritKeys . includes ( pkey ) && ! parentProps [ pkey ] ) {
420+ if ( dontInheritKeys . includes ( pkey ) && ( pkey === 'type' || pkey === 'hideNavBar' || ! parentProps [ pkey ] ) ) {
417421delete commonProps [ pkey ] ;
418422}
419423}
@@ -465,7 +469,7 @@ _this2.states[key].path=path;
465469
466470var screen = {
467471screen :createWrapper ( component , wrapBy , _this2 ) || _this2 . processScene ( _child , commonProps , clones ) || lightbox && _reactNative . View ,
468- navigationOptions :createNavigationOptions ( _extends ( { } , commonProps , getProperties ( component ) , _child . props , { init :init , component :component } ) ) } ;
472+ navigationOptions :createNavigationOptions ( _extends ( { } , commonProps , { hideNavBar : parentProps . hideNavBar } , getProperties ( component ) , _child . props , { init :init , component :component } ) ) } ;
469473
470474
471475
@@ -476,7 +480,7 @@ wrapNavBar=false;
476480if ( component && wrapNavBar ) {
477481res [ key ] = {
478482screen :_this2 . processScene ( { key :key , props :{ children :{ key :'_' + key , props :_extends ( { } , _child . props , { wrap :false } ) } } } , commonProps , clones , wrapBy ) ,
479- navigationOptions :createNavigationOptions ( _extends ( { } , commonProps , _child . props ) ) } ;
483+ navigationOptions :createNavigationOptions ( _extends ( { } , commonProps , _child . props , { hideNavBar : true } ) ) } ;
480484
481485} else {
482486res [ key ] = screen ;
@@ -511,8 +515,8 @@ if(lightbox){
511515return ( 0 , _LightboxNavigator2 . default ) ( res , _extends ( { mode :mode , initialRouteParams :initialRouteParams , initialRouteName :initialRouteName } , commonProps , { navigationOptions :createNavigationOptions ( commonProps ) } ) ) ;
512516} else if ( tabs ) {
513517if ( ! tabBarComponent ) {
514- tabBarComponent = tabBarPosition === 'top' ?function ( props ) { return _react2 . default . createElement ( _reactNavigation . TabBarTop , _extends ( { } , props , commonProps , { __source :{ fileName :_jsxFileName , lineNumber :514 } } ) ) ; } :
515- function ( props ) { return _react2 . default . createElement ( _reactNavigation . TabBarBottom , _extends ( { } , props , commonProps , { __source :{ fileName :_jsxFileName , lineNumber :515 } } ) ) ; } ;
518+ tabBarComponent = tabBarPosition === 'top' ?function ( props ) { return _react2 . default . createElement ( _reactNavigation . TabBarTop , _extends ( { } , props , commonProps , { __source :{ fileName :_jsxFileName , lineNumber :518 } } ) ) ; } :
519+ function ( props ) { return _react2 . default . createElement ( _reactNavigation . TabBarBottom , _extends ( { } , props , commonProps , { __source :{ fileName :_jsxFileName , lineNumber :519 } } ) ) ; } ;
516520}
517521if ( ! tabBarPosition ) {
518522tabBarPosition = _reactNative . Platform . OS === 'android' ?'top' :'bottom' ;
0 commit comments