Skip to content

Commit 6c34d33

Browse files
committed
using native detector animated event
1 parent 86046bd commit 6c34d33

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

packages/react-native-gesture-handler/src/v3/HostGestureDetector.web.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@ export interface GestureHandlerDetectorProps {
77
dispatchesAnimatedEvents: boolean;
88
moduleId: number;
99
children?: React.ReactNode;
10-
actionType?: ActionType;
1110
}
1211

1312
const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
14-
const {
15-
handlerTags,
16-
children,
17-
actionType = ActionType.NATIVE_DETECTOR,
18-
} = props;
13+
const { handlerTags, dispatchesAnimatedEvents, children } = props;
1914

2015
const viewRef = useRef(null);
2116
const propsRef = useRef<GestureHandlerDetectorProps>(props);
@@ -30,7 +25,9 @@ const HostGestureDetector = (props: GestureHandlerDetectorProps) => {
3025
RNGestureHandlerModule.attachGestureHandler(
3126
tag,
3227
viewRef.current,
33-
actionType,
28+
dispatchesAnimatedEvents
29+
? ActionType.NATIVE_DETECTOR_ANIMATED_EVENT
30+
: ActionType.NATIVE_DETECTOR,
3431
propsRef
3532
);
3633
});

0 commit comments

Comments
 (0)