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 @@ -23,6 +23,7 @@ @implementation RCTBaseTextInputShadowView
23
23
NSAttributedString *_Nullable _localAttributedText;
24
24
CGSize _previousContentSize;
25
25
26
+ NSString *_text;
26
27
NSTextStorage *_textStorage;
27
28
NSTextContainer *_textContainer;
28
29
NSLayoutManager *_layoutManager;
@@ -101,6 +102,20 @@ - (void)invalidateContentSize
101
102
});
102
103
}
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
+
104
119
#pragma mark - RCTUIManagerObserver
105
120
106
121
- (void )uiManagerWillPerformMounting
You can’t perform that action at this time.
0 commit comments