@@ -10,8 +10,11 @@ const propTypes = {
1010 currentRoute : PropTypes . object . isRequired ,
1111 customAction : PropTypes . func ,
1212 handleBackAndroid : PropTypes . bool ,
13+ goToFirstRoute : PropTypes . func . isRequired ,
1314 leftProps : PropTypes . object ,
1415 navigator : PropTypes . object . isRequired ,
16+ replaceRoute : PropTypes . func . isRequired ,
17+ resetToRoute : PropTypes . func . isRequired ,
1518 rightCorner : PropTypes . func ,
1619 rightProps : PropTypes . object ,
1720 style : View . propTypes . style ,
@@ -44,6 +47,9 @@ class NavBarContainer extends React.Component {
4447
4548 this . goBack = this . goBack . bind ( this ) ;
4649 this . goForward = this . goForward . bind ( this ) ;
50+ this . replaceRoute = this . replaceRoute . bind ( this ) ;
51+ this . resetToRoute = this . resetToRoute . bind ( this ) ;
52+ this . goToFirstRoute = this . goToFirstRoute . bind ( this ) ;
4753 this . customAction = this . customAction . bind ( this ) ;
4854
4955 this . state = {
@@ -87,6 +93,18 @@ class NavBarContainer extends React.Component {
8793 this . props . toRoute ( route , this . props . navigator ) ;
8894 }
8995
96+ replaceRoute ( nextRoute ) {
97+ this . props . replaceRoute ( nextRoute , this . props . navigator ) ;
98+ }
99+
100+ resetToRoute ( nextRoute ) {
101+ this . props . resetToRoute ( nextRoute , this . props . navigator ) ;
102+ }
103+
104+ goToFirstRoute ( nextRoute ) {
105+ this . props . goToFirstRoute ( nextRoute , this . props . navigator ) ;
106+ }
107+
90108 customAction ( opts ) {
91109 this . props . customAction ( opts ) ;
92110 }
@@ -119,23 +137,6 @@ class NavBarContainer extends React.Component {
119137 willDisappear
120138 />
121139 ) ;
122- } else if ( this . props . currentRoute . hideNavigationBar ) {
123- navbarContent = (
124- < NavBarContent
125- route = { this . props . currentRoute }
126- backButtonComponent = { this . props . backButtonComponent }
127- rightCorner = { this . props . rightCorner }
128- titleStyle = { this . props . titleStyle }
129- borderBottomWidth = { this . props . borderBottomWidth }
130- borderColor = { this . props . borderColor }
131- goBack = { this . goBack }
132- goForward = { this . goForward }
133- leftProps = { this . props . leftProps }
134- rightProps = { this . props . rightProps }
135- titleProps = { this . props . titleProps }
136- customAction = { this . customAction }
137- />
138- ) ;
139140 } else {
140141 navbarContent = (
141142 < NavBarContent
@@ -147,6 +148,9 @@ class NavBarContainer extends React.Component {
147148 borderColor = { this . props . borderColor }
148149 goBack = { this . goBack }
149150 goForward = { this . goForward }
151+ replaceRoute = { this . replaceRoute }
152+ resetToRoute = { this . resetToRoute }
153+ goToFirstRoute = { this . goToFirstRoute }
150154 leftProps = { this . props . leftProps }
151155 rightProps = { this . props . rightProps }
152156 titleProps = { this . props . titleProps }
0 commit comments