Skip to content

Commit

Permalink
Fixed textInput appearance not update when text attributes changed (#…
Browse files Browse the repository at this point in the history
…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: #23533

Differential Revision: D14146700

Pulled By: cpojer

fbshipit-source-id: 4a7c84d6e7f818acb712242bea6484b177a775c6
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed Feb 20, 2019
1 parent c3df673 commit f8b5215
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Text/TextInput/RCTBaseTextInputView.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ - (void)setTextAttributes:(RCTTextAttributes *)textAttributes
- (void)enforceTextAttributesIfNeeded
{
id<RCTBackedTextInputViewProtocol> backedTextInputView = self.backedTextInputView;
if (backedTextInputView.attributedText.string.length != 0) {
if (backedTextInputView.attributedText.string.length == 0) {
return;
}

Expand Down

0 comments on commit f8b5215

Please sign in to comment.