Skip to content

Commit

Permalink
Solved route mapper bug when initializing with right element
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaromb committed Nov 18, 2015
1 parent 67b779c commit 765dc67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,18 @@ You component ``MyComponent`` will have two props, **navigator** and
**topNavigator**. They will let you to push new components from right using
the first one or open a modal pushing from the second one.

### Navigation with ``NavigationWrapper``
### Navigation with ``NavigatorWrapper``
If you just want to use the navigation bar inside a navigator, use the
``NavigationWrapper`` component:
``NavigatorWrapper`` component:

```js
import React from 'react-native'
import { NavigationWrapper } from 'react-native-navigator-wrapper'
import { NavigatorWrapper } from 'react-native-navigator-wrapper'

class MyComponent extends React.Component {
render () {
return (
<NavigationWrapper
<NavigatorWrapper
initialComponent={Component}
title='Title'
/>
Expand All @@ -97,7 +97,7 @@ class MyComponent extends React.Component {
}
```

Every time you push a component that's inside the ``NavigationWrapper`` component
Every time you push a component that's inside the ``NavigatorWrapper`` component
you will have a **navigator** prop, just like the top navigation option before,
that will let you to keep pushing components in the stack.

Expand Down
2 changes: 1 addition & 1 deletion lib/RouteMapper.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function leftButtonRouteMapperGenerator (BackComponent, styles, tintColor
export function rightButtonRouteMapperGenerator (RightComponent, topNavigator) {
return {
RightButton: (route, navigator, index, navState) => {
if (RightComponent && !route.rightElement) {
if (RightComponent && !route.rightElement && index === 0) {
return <RightComponent navigator={navigator} topNavigator={topNavigator} />
}
if (route.rightElement) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-navigator-wrapper",
"version": "0.0.4",
"version": "0.0.5",
"description": "A React Native Navigator component wrapper that implements nested navigators for both push and modal transitions.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 765dc67

Please sign in to comment.