From 34a5158ec81018a880852888c78e9dd2455ee3f9 Mon Sep 17 00:00:00 2001 From: David Vacca Date: Fri, 19 Nov 2021 15:46:33 -0800 Subject: [PATCH] Update Fabric to suport onEnter/onExit/onMove events Summary: This diff updates the internals of Fabric to add support for onEnter/onExit/onMove events. changelog: [internal] internal Reviewed By: javache Differential Revision: D32253128 fbshipit-source-id: 5b30e927bda0328ba1332801f66a6caba77f949b --- .../renderer/components/view/ViewProps.cpp | 18 ++++++++++++++++++ .../react/renderer/components/view/ViewProps.h | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/ReactCommon/react/renderer/components/view/ViewProps.cpp b/ReactCommon/react/renderer/components/view/ViewProps.cpp index 0e1a9976793907..1f6dfc06c39fbc 100644 --- a/ReactCommon/react/renderer/components/view/ViewProps.cpp +++ b/ReactCommon/react/renderer/components/view/ViewProps.cpp @@ -125,6 +125,24 @@ ViewProps::ViewProps( "onLayout", sourceProps.onLayout, {})), + pointerEnter(convertRawProp( + context, + rawProps, + "pointerenter", + sourceProps.pointerEnter, + {})), + pointerLeave(convertRawProp( + context, + rawProps, + "pointerleave", + sourceProps.pointerLeave, + {})), + pointerMove(convertRawProp( + context, + rawProps, + "pointermove", + sourceProps.pointerMove, + {})), collapsable(convertRawProp( context, rawProps, diff --git a/ReactCommon/react/renderer/components/view/ViewProps.h b/ReactCommon/react/renderer/components/view/ViewProps.h index b66249a6915c2c..558105face731e 100644 --- a/ReactCommon/react/renderer/components/view/ViewProps.h +++ b/ReactCommon/react/renderer/components/view/ViewProps.h @@ -61,6 +61,12 @@ class ViewProps : public YogaStylableProps, public AccessibilityProps { EdgeInsets hitSlop{}; bool onLayout{}; + bool pointerEnter{}; + + bool pointerLeave{}; + + bool pointerMove{}; + bool collapsable{true}; bool removeClippedSubviews{false};