react native - custom sceneConfigs for navigator.push not working -


i using component of routing in application. through props, of functions within component calling navigator.push.

an example...

login(navigator) {     navigator.push({view: 'profile'}); } showmodal(navigator) {     navigator.push({         view: 'modal',         sceneconfig: navigator.sceneconfigs.floatfrombottom     }); } 

when navigate profile via login function, navigates me floatromright default. when navigate showmodal, floatfromright regardless of floatfrombottom call.

what going on here? doing improperly?

$ react-native -v react-native-cli: 0.1.10 react-native: 0.19.0 

the solution provided david worked. navigator looks follows:

render() {     return (         <navigator             style={styles.application}             initialroute={{id: 1}}             configurescene={route => {                 if (route.sceneconfig) {                     return route.sceneconfig;                 }                 return navigator.sceneconfigs.floatfromright;             }}             renderscene={(route, nav) => {                 return this.renderscene(route, nav);             }}             />     ); } 

someone correct me if i'm wrong, think have add navigator:

<navigator     ...     configurescene={(route) => {       if (route.sceneconfig) {         return route.sceneconfig;       }       return navigator.sceneconfigs.floatfromright;     }}     ...     /> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -