We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a197a14 commit 63cbc65Copy full SHA for 63cbc65
Libraries/Text/TextInput/RCTBaseTextInputShadowView.m
@@ -23,6 +23,7 @@ @implementation RCTBaseTextInputShadowView
23
NSAttributedString *_Nullable _localAttributedText;
24
CGSize _previousContentSize;
25
26
+ NSString *_text;
27
NSTextStorage *_textStorage;
28
NSTextContainer *_textContainer;
29
NSLayoutManager *_layoutManager;
@@ -101,6 +102,20 @@ - (void)invalidateContentSize
101
102
});
103
}
104
105
+- (NSString *)text
106
+{
107
+ return _text;
108
+}
109
+
110
+- (void)setText:(NSString *)text
111
112
+ _text = text;
113
+ // Clear `_previousAttributedText` to notify the view about the change
114
+ // when `text` native prop is set.
115
+ _previousAttributedText = nil;
116
+ [self dirtyLayout];
117
118
119
#pragma mark - RCTUIManagerObserver
120
121
- (void)uiManagerWillPerformMounting
0 commit comments