fix: properly set animated node on gestureEnabled change

This commit is contained in:
satyajit.happy
2019-08-29 19:51:15 +02:00
parent 422bc00bc2
commit 435b8dbbc8

View File

@@ -611,11 +611,10 @@ export default class Card extends React.Component<Props> {
<StackGestureContext.Provider value={this.gestureRef}>
<View pointerEvents="box-none" {...rest}>
<Animated.Code exec={this.exec} />
{this.props.gestureEnabled ? (
<Animated.Code exec={this.execNoGesture} />
) : (
<Animated.Code exec={this.execWithGesture} />
)}
<Animated.Code
key={gestureEnabled ? 'gesture-code' : 'no-gesture-code'}
exec={gestureEnabled ? this.execWithGesture : this.execNoGesture}
/>
{overlayEnabled && overlayStyle ? (
<Animated.View
pointerEvents="none"