File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ @implementation RCTBaseTextInputShadowView
25
25
NSAttributedString *_Nullable _localAttributedText;
26
26
CGSize _previousContentSize;
27
27
28
+ NSString *_text;
28
29
NSTextStorage *_textStorage;
29
30
NSTextContainer *_textContainer;
30
31
NSLayoutManager *_layoutManager;
@@ -102,6 +103,20 @@ - (void)invalidateContentSize
102
103
});
103
104
}
104
105
106
+ - (NSString *)text
107
+ {
108
+ return _text;
109
+ }
110
+
111
+ - (void )setText : (NSString *)text
112
+ {
113
+ _text = text;
114
+ // Clear `_previousAttributedText` to notify the view about the change
115
+ // when `text` native prop is set.
116
+ _previousAttributedText = nil ;
117
+ [self dirtyLayout ];
118
+ }
119
+
105
120
#pragma mark - RCTUIManagerObserver
106
121
107
122
- (void )uiManagerWillPerformMounting
You can’t perform that action at this time.
0 commit comments