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
Post a Comment