Fixed textInput appearance not update when text attributes changed (#23533)

Summary:
If we change the text attributes dynamically, for example, change the textColor, it not works in iOS, Android works fine.

[iOS] [fixed] - Fixed textInput appearance not update when text attributes changed
Pull Request resolved: https://github.com/facebook/react-native/pull/23533

Differential Revision: D14146700

Pulled By: cpojer

fbshipit-source-id: 4a7c84d6e7f818acb712242bea6484b177a775c6
This commit is contained in:
zhongwuzw
2019-02-19 21:59:26 -08:00
committed by Facebook Github Bot
parent c3df673f12
commit f8b52151eb

View File

@@ -68,7 +68,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
- (void)enforceTextAttributesIfNeeded
{
id<RCTBackedTextInputViewProtocol> backedTextInputView = self.backedTextInputView;
if (backedTextInputView.attributedText.string.length != 0) {
if (backedTextInputView.attributedText.string.length == 0) {
return;
}