Skip to content

Commit

Permalink
Update RCTBaseTextInputShadowView.m
Browse files Browse the repository at this point in the history
[iOS][TextInput] Fix controlled TextInput for Chinese (and other languages) facebook#18456
  • Loading branch information
iwasaki-d authored Apr 22, 2018
1 parent f16a55c commit 8b027b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Libraries/Text/TextInput/RCTBaseTextInputShadowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ @implementation RCTBaseTextInputShadowView
NSAttributedString *_Nullable _localAttributedText;
CGSize _previousContentSize;

NSString *_text;
NSTextStorage *_textStorage;
NSTextContainer *_textContainer;
NSLayoutManager *_layoutManager;
Expand Down Expand Up @@ -97,6 +98,17 @@ - (void)invalidateContentSize
});
}

- (NSString *)text
{
return _text;
}

- (void)setText:(NSString *)text
{
_text = text;
_previousAttributedText = _localAttributedText;
}

#pragma mark - RCTUIManagerObserver

- (void)uiManagerWillPerformMounting
Expand Down

0 comments on commit 8b027b2

Please sign in to comment.