mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add TextKind trait to ParagraphShadowNode and TextInputShadowNode
Summary: Adds `TextKind` trait to Paragraph and TextInput shadow nodes. Later on it could cause confusion why they do not have this trait. Changelog: [Internal] Reviewed By: shergin, mdvacca Differential Revision: D20254008 fbshipit-source-id: 56fb264fa4fe38a5f00f080558cdc7992fd51fea
This commit is contained in:
1 parent
138ade0117
commit
d6484fa180
2 files changed
+7
-1
No files matched your search
@@ -41,7 +41,7 @@ class ParagraphShadowNode : public ConcreteViewShadowNode<
|
||||
static ShadowNodeTraits BaseTraits() {
|
||||
auto traits = ConcreteViewShadowNode::BaseTraits();
|
||||
traits.set(ShadowNodeTraits::Trait::LeafYogaNode);
|
||||
|
||||
traits.set(ShadowNodeTraits::Trait::TextKind);
|
||||
return traits;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,6 +33,12 @@ class TextInputShadowNode : public ConcreteViewShadowNode<
|
||||
public:
|
||||
using ConcreteViewShadowNode::ConcreteViewShadowNode;
|
||||
|
||||
static ShadowNodeTraits BaseTraits() {
|
||||
auto traits = ConcreteViewShadowNode::BaseTraits();
|
||||
traits.set(ShadowNodeTraits::Trait::TextKind);
|
||||
return traits;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a `AttributedString` which represents text content of the node.
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user