Skip to content

Commit 1af3676

Browse files
committed
chore(ios): updateProps comment
1 parent 4edd485 commit 1af3676

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

packages/react-native-gesture-handler/apple/RNGestureHandlerButtonComponentView.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
223223
_buttonView.hitTestEdgeInsets = UIEdgeInsetsMake(
224224
-newProps.hitSlop.top, -newProps.hitSlop.left, -newProps.hitSlop.bottom, -newProps.hitSlop.right);
225225

226+
// We need to cast to ViewProps to access the pointerEvents property with the correct type.
227+
// This is necessary because pointerEvents is redefined in the spec,
228+
// which shadows the base property with a different, incompatible type.
226229
const auto &newViewProps = static_cast<const ViewProps &>(newProps);
227230
if (!oldProps) {
228231
_buttonView.pointerEvents = RCTPointerEventsToEnum(newViewProps.pointerEvents);

0 commit comments

Comments
 (0)