Skip to content

Commit 9914eda

Browse files
johannhofcharpeni
authored andcommitted
Add a default sceneConfig prop (#161)
1 parent 7dfd543 commit 9914eda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const propTypes = {
3030
statusBarColor: PropTypes.string,
3131
statusBarProps: PropTypes.object,
3232
titleStyle: Text.propTypes.style,
33+
sceneConfig: PropTypes.object,
3334
};
3435

3536
const styles = StyleSheet.create({
@@ -51,6 +52,7 @@ class Router extends React.Component {
5152
this.onToFirstRoute = this.onToFirstRoute.bind(this);
5253
this.customAction = this.customAction.bind(this);
5354
this.renderScene = this.renderScene.bind(this);
55+
this.configureScene = this.configureScene.bind(this);
5456

5557
this.onWillPop = this.onWillPop.bind(this);
5658
this.onDidPop = this.onDidPop.bind(this);
@@ -242,7 +244,7 @@ class Router extends React.Component {
242244
}
243245

244246
configureScene(route) {
245-
return route.sceneConfig || Navigator.SceneConfigs.FloatFromRight;
247+
return route.sceneConfig || this.props.sceneConfig || Navigator.SceneConfigs.FloatFromRight;
246248
}
247249

248250
renderScene(route, navigator) {

0 commit comments

Comments
 (0)