navigator.getCurrentRoutes()

Summary:
According to our talk with @ericvicenti about `renderScene` arguments
Closes https://github.com/facebook/react-native/pull/553
Github Author: Kureev Alexey <kureev-mail@ya.ru>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
This commit is contained in:
Kureev Alexey 2015-04-04 11:13:27 -07:00
parent de8a370e02
commit 8a8244a583
1 changed files with 5 additions and 0 deletions

View File

@ -318,6 +318,7 @@ var Navigator = React.createClass({
popToRoute: this.popToRoute,
popToTop: this.popToTop,
parentNavigator: this.props.navigator,
getCurrentRoutes: this.getCurrentRoutes,
// We want to bubble focused routes to the top navigation stack. If we
// are a child navigator, this allows us to call props.navigator.on*Focus
// of the topmost Navigator
@ -998,6 +999,10 @@ var Navigator = React.createClass({
}
},
getCurrentRoutes: function() {
return this.state.routeStack;
},
_onItemRef: function(itemId, ref) {
this._itemRefs[itemId] = ref;
var itemIndex = this.state.idStack.indexOf(itemId);