Skip to content

Commit 765dc67

Browse files
author
alvaromb
committed
Solved route mapper bug when initializing with right element
1 parent 67b779c commit 765dc67

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@ You component ``MyComponent`` will have two props, **navigator** and
7777
**topNavigator**. They will let you to push new components from right using
7878
the first one or open a modal pushing from the second one.
7979

80-
### Navigation with ``NavigationWrapper``
80+
### Navigation with ``NavigatorWrapper``
8181
If you just want to use the navigation bar inside a navigator, use the
82-
``NavigationWrapper`` component:
82+
``NavigatorWrapper`` component:
8383

8484
```js
8585
import React from 'react-native'
86-
import { NavigationWrapper } from 'react-native-navigator-wrapper'
86+
import { NavigatorWrapper } from 'react-native-navigator-wrapper'
8787

8888
class MyComponent extends React.Component {
8989
render () {
9090
return (
91-
<NavigationWrapper
91+
<NavigatorWrapper
9292
initialComponent={Component}
9393
title='Title'
9494
/>
@@ -97,7 +97,7 @@ class MyComponent extends React.Component {
9797
}
9898
```
9999

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

lib/RouteMapper.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function leftButtonRouteMapperGenerator (BackComponent, styles, tintColor
2323
export function rightButtonRouteMapperGenerator (RightComponent, topNavigator) {
2424
return {
2525
RightButton: (route, navigator, index, navState) => {
26-
if (RightComponent && !route.rightElement) {
26+
if (RightComponent && !route.rightElement && index === 0) {
2727
return <RightComponent navigator={navigator} topNavigator={topNavigator} />
2828
}
2929
if (route.rightElement) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-navigator-wrapper",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A React Native Navigator component wrapper that implements nested navigators for both push and modal transitions.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)