From 41888678b4b7dcabfc56a0b3ff1586bd56550751 Mon Sep 17 00:00:00 2001 From: cyrus25 Date: Tue, 6 Sep 2022 04:47:32 -0700 Subject: [PATCH] Make style pointerEvents take priority over pointerEvents prop (#34597) Summary: Make style pointerEvents take priority over pointerEvents prop. Fixes requested changes in https://github.com/facebook/react-native/issues/34586 ## Changelog [General] [Fixed] - Make style pointerEvents take priority over pointerEvents prop. FIxes requested changes in https://github.com/facebook/react-native/issues/34586 Pull Request resolved: https://github.com/facebook/react-native/pull/34597 Test Plan: Will rely on green cli Reviewed By: NickGerleman Differential Revision: D39269306 Pulled By: cipolleschi fbshipit-source-id: 0927bf6ad7e3ac63e82dbd1a873532152f29001d --- Libraries/Components/View/View.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/Components/View/View.js b/Libraries/Components/View/View.js index 76ec6975c7c150..bc2145e52982e2 100644 --- a/Libraries/Components/View/View.js +++ b/Libraries/Components/View/View.js @@ -108,8 +108,8 @@ const View: React.AbstractComponent< treeitem: undefined, }; - const flattendStyle = flattenStyle(style); - const newPointerEvents = pointerEvents || flattendStyle?.pointerEvents; + const flattenedStyle = flattenStyle(style); + const newPointerEvents = flattenedStyle?.pointerEvents || pointerEvents; return (