mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Store metadata to determine if a view is listening for a JS event
Summary: This diff updates the BaseViewManager in order to store metadata in views that are handling JS events. This information will be used later in the stack to optimize dispatching of hover events and fix viewFlattening bugs changelog: [internal] internal Reviewed By: philIip Differential Revision: D32253127 fbshipit-source-id: b6b74f0b1a5b8cc652b3ac3fff42165ee4ce85e1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
44143b50fd
commit
a9ccdcace5
@@ -462,4 +462,19 @@ public abstract class BaseViewManager<T extends View, C extends LayoutShadowNode
|
||||
private void logUnsupportedPropertyWarning(String propName) {
|
||||
FLog.w(ReactConstants.TAG, "%s doesn't support property '%s'", getName(), propName);
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointerenter")
|
||||
public void setPointerEnter(@NonNull T view, @Nullable boolean value) {
|
||||
view.setTag(R.id.pointer_enter, value);
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointerleave")
|
||||
public void setPointerLeave(@NonNull T view, @Nullable boolean value) {
|
||||
view.setTag(R.id.pointer_leave, value);
|
||||
}
|
||||
|
||||
@ReactProp(name = "pointermove")
|
||||
public void setPointerMove(@NonNull T view, @Nullable boolean value) {
|
||||
view.setTag(R.id.pointer_move, value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user