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

Scene renderTitle from component #3467

Open
AliUZAR opened this issue Apr 17, 2019 · 1 comment
Open

Scene renderTitle from component #3467

AliUZAR opened this issue Apr 17, 2019 · 1 comment

Comments

@AliUZAR
Copy link

AliUZAR commented Apr 17, 2019

Version

"react": "16.6.3",
"react-native": "0.58.6",
"react-native-router-flux": "^4.0.6",

Hi everyone,
Can someone help me to renderTitle from component ? I tried like this but no luck
<Scene titleStyle={styles.programTitleStyle} clone backButtonTextStyle={{color:'#231f20'}} direction="vertical" key="CarList" backTitle='' component={CarList} title="Car List" renderTitle={() => {Actions.refs.CarList.getTitle()} } />

In CarList.js
getTitle(){ return ( <Button onPress={() => {Actions.SearchModal()}} > <View> <Text> {this.props.searchTitle} </Text> </View> <View > <Text> {this.props.searchDate} </Text> </View> </Button> ) }

Tring to make my title like this link but it did not help me .
#2959

@Wellbrito29
Copy link

i did like this: renderTitle={(props) => ( {props.navigation.params.title} } ) }

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

2 participants