mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix animation of PDP dismissal
Summary: Changelog: [Internal] If animated component is managed by Fabric, prevent view flattening by setting nativeID. Reviewed By: shergin Differential Revision: D22998746 fbshipit-source-id: b9645537454f11fce3bb0e268db91219f5c6dc42
This commit is contained in:
committed by
Facebook GitHub Bot
parent
499b021b78
commit
d1b507a5c3
@@ -112,7 +112,6 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
};
|
||||
|
||||
_waitForUpdate = (): void => {
|
||||
// If this works well on iOS, we should remove this check
|
||||
if (this._isFabric()) {
|
||||
if (this._animatedComponentId === -1) {
|
||||
this._animatedComponentId = animatedComponentNextId++;
|
||||
@@ -124,7 +123,6 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
};
|
||||
|
||||
_markUpdateComplete = (): void => {
|
||||
// If this works well on iOS, we should remove this check
|
||||
if (this._isFabric()) {
|
||||
NativeAnimatedHelper.API.unsetWaitingForIdentifier(
|
||||
this._animatedComponentId,
|
||||
@@ -225,6 +223,7 @@ function createAnimatedComponent<Props: {+[string]: mixed, ...}, Instance>(
|
||||
{...passthruProps}
|
||||
style={mergedStyle}
|
||||
ref={this._setComponentRef}
|
||||
nativeID={this._isFabric() ? 'animatedComponent' : undefined}
|
||||
// The native driver updates views directly through the UI thread so we
|
||||
// have to make sure the view doesn't get optimized away because it cannot
|
||||
// go through the NativeViewHierarchyManager since it operates on the shadow
|
||||
|
||||
Reference in New Issue
Block a user