From f8b52151eb9da59bb7bb364a656d9920478ca620 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Tue, 19 Feb 2019 21:59:26 -0800 Subject: [PATCH] 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 --- Libraries/Text/TextInput/RCTBaseTextInputView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Text/TextInput/RCTBaseTextInputView.m b/Libraries/Text/TextInput/RCTBaseTextInputView.m index 3c8321c262b08b..c1c3b00c850568 100644 --- a/Libraries/Text/TextInput/RCTBaseTextInputView.m +++ b/Libraries/Text/TextInput/RCTBaseTextInputView.m @@ -68,7 +68,7 @@ - (void)setTextAttributes:(RCTTextAttributes *)textAttributes - (void)enforceTextAttributesIfNeeded { id backedTextInputView = self.backedTextInputView; - if (backedTextInputView.attributedText.string.length != 0) { + if (backedTextInputView.attributedText.string.length == 0) { return; }