mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 06:53:24 +08:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user