Fix transtion props `layout` in NavigationTransitioner.
Summary: When layout is measure, transtion props should be updated. Reviewed By: ericvicenti Differential Revision: D3479967 fbshipit-source-id: 14bcd96b9691b7ee68689393b4fef51dbd04b69f
This commit is contained in:
parent
614f3c68e6
commit
37e41d2549
|
@ -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 {
|
||||
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue