Skip to content

Commit

Permalink
Fix transtion props layout in NavigationTransitioner.
Browse files Browse the repository at this point in the history
Summary: When layout is measure, transtion props should be updated.

Reviewed By: ericvicenti

Differential Revision: D3479967

fbshipit-source-id: 14bcd96b9691b7ee68689393b4fef51dbd04b69f
  • Loading branch information
Hedger Wang authored and ide committed Jul 2, 2016
1 parent c412d25 commit 0a2ef02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Libraries/NavigationExperimental/NavigationTransitioner.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
layout.height.setValue(height);
layout.width.setValue(width);

this.setState({ layout });
const nextState = {
...this.state,
layout,
};

this._transitionProps = buildTransitionProps(this.props, nextState);
this.setState(nextState);
}

_onTransitionEnd(): void {
Expand All @@ -208,7 +214,6 @@ class NavigationTransitioner extends React.Component<any, Props, State> {
};

this._transitionProps = buildTransitionProps(this.props, nextState);

this.setState(nextState);

this.props.onTransitionEnd && this.props.onTransitionEnd(
Expand Down

0 comments on commit 0a2ef02

Please sign in to comment.