mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 09:11:14 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user