Merge pull request #27 from react-navigation/@ericvicenti/stack-mount-complete

Stack nav completion on mount
This commit is contained in:
Brent Vatne 2018-09-24 09:40:09 -07:00 committed by GitHub
commit 8951557608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,17 @@ class StackView extends React.Component {
);
}
componentDidMount() {
const { navigation } = this.props;
if (navigation.state.isTransitioning) {
navigation.dispatch(
StackActions.completeTransition({
key: navigation.state.key,
})
);
}
}
_configureTransition = (transitionProps, prevTransitionProps) => {
return {
...TransitionConfigs.getTransitionConfig(