diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm index 9fb3400d90cda5..56d9fbee5164d1 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm @@ -105,8 +105,8 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared & _paragraphAttributes = newParagraphProps.paragraphAttributes; _textView.paragraphAttributes = _paragraphAttributes; - if (newParagraphProps.isSelectable != oldParagraphProps.isSelectable) { - if (newParagraphProps.isSelectable) { + if (newParagraphProps.selectable != oldParagraphProps.selectable) { + if (newParagraphProps.selectable) { [self enableContextMenu]; } else { [self disableContextMenu]; @@ -329,14 +329,14 @@ - (void)handleLongPress:(UILongPressGestureRecognizer *)gesture - (BOOL)canBecomeFirstResponder { const auto ¶graphProps = static_cast(*_props); - return paragraphProps.isSelectable; + return paragraphProps.selectable; } - (BOOL)canPerformAction:(SEL)action withSender:(id)sender { const auto ¶graphProps = static_cast(*_props); - if (paragraphProps.isSelectable && action == @selector(copy:)) { + if (paragraphProps.selectable && action == @selector(copy:)) { return YES; } diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp index a483643ebdc434..44046840f61f8e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp @@ -31,14 +31,14 @@ ParagraphProps::ParagraphProps( rawProps, sourceProps.paragraphAttributes, {})), - isSelectable( + selectable( ReactNativeFeatureFlags::enableCppPropsIteratorSetter() - ? sourceProps.isSelectable + ? sourceProps.selectable : convertRawProp( context, rawProps, "selectable", - sourceProps.isSelectable, + sourceProps.selectable, false)), onTextLayout( ReactNativeFeatureFlags::enableCppPropsIteratorSetter() @@ -129,7 +129,7 @@ void ParagraphProps::setProp( } switch (hash) { - RAW_SET_PROP_SWITCH_CASE_BASIC(isSelectable); + RAW_SET_PROP_SWITCH_CASE_BASIC(selectable); RAW_SET_PROP_SWITCH_CASE_BASIC(onTextLayout); } @@ -148,7 +148,7 @@ SharedDebugStringConvertibleList ParagraphProps::getDebugProps() const { return ViewProps::getDebugProps() + BaseTextProps::getDebugProps() + paragraphAttributes.getDebugProps() + SharedDebugStringConvertibleList{ - debugStringConvertibleItem("isSelectable", isSelectable)}; + debugStringConvertibleItem("selectable", selectable)}; } #endif diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h index 6640fca034432c..d67878db51b67d 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.h @@ -48,7 +48,7 @@ class ParagraphProps : public ViewProps, public BaseTextProps { /* * Defines can the text be selected (and copied) or not. */ - bool isSelectable{}; + bool selectable{}; bool onTextLayout{}; diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp index 0c045323fd4545..3ef62d802a21ad 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp @@ -29,7 +29,7 @@ const char ParagraphComponentName[] = "Paragraph"; void ParagraphShadowNode::initialize() noexcept { #ifdef ANDROID - if (getConcreteProps().isSelectable) { + if (getConcreteProps().selectable) { traits_.set(ShadowNodeTraits::Trait::KeyboardFocusable); } #endif