Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set function of onRight from another screen on scene router #3002

Closed
elvis-hp opened this issue Apr 18, 2018 · 1 comment
Closed

How to set function of onRight from another screen on scene router #3002

elvis-hp opened this issue Apr 18, 2018 · 1 comment

Comments

@elvis-hp
Copy link

In router.is, I have:
<Scene key="tabEditProfile" onRight={() => {this.updateProfile()}} rightTitle="Save" component={EditProfile} icon={TabIcon} renderTitle="Edit your profile" hideTabBar swipeEnabled={false}/>
but this.updateProfile() only in screen edit-profile.js.
Who can help me how to call updateProfile funcation from edit-profile.js.
Thank's.

Version

Tell us which versions you are using:

  • react-native-router-flux v4.?.? (v3 is not supported)
  • react-native v0.?.?

Expected behaviour

Actual behaviour

Steps to reproduce

For non-obvious bugs, please fork this component, modify Example project to reproduce your issue and include link here.
1.
2.
3.

@elvis-hp
Copy link
Author

fixed:
on the edit-profile.js
componentDidMount() { this.props.navigation.setParams({onRight: this.updateProfile }); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant