Open
Description
Is it possible to stop the drag event from within the onDrag
event?
<Draggable x={10} y={10}
onDrag={
(event: any, gestureState: any) => {
if (event.nativeEvent.pageX > 300) {
// None of these will work:
event.stopPropagation();
event.preventDefault();
event.stopImmediatePropagation();
event.nativeEvent.stopPropagation();
event.nativeEvent.preventDefault();
event.nativeEvent.stopImmediatePropagation();
}
}
}
> content </Draggable>
Metadata
Metadata
Assignees
Labels
No labels