Skip to content

Commit

Permalink
Fix initial placeholder in multiline TextInput
Browse files Browse the repository at this point in the history
Summary:
Changelog: [internal]

`[self _invalidatePlaceholderVisibility]` wasn't triggered in multiline text input in Fabric. Even in Paper it was triggered what to me seems like coincidence rather than intention (I might be wrong). This is more explicit, visibility of placeholder text needs to be re-evaluated every time placeholder text is changed.

Reviewed By: shergin

Differential Revision: D26172754

fbshipit-source-id: 3a767d333b79c266a3d70a96883b1289fff16750
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Feb 1, 2021
1 parent 64d9364 commit 88c4349
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Libraries/Text/TextInput/Multiline/RCTUITextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ - (void)_invalidatePlaceholderVisibility
- (void)_updatePlaceholder
{
_placeholderView.attributedText = [[NSAttributedString alloc] initWithString:_placeholder ?: @"" attributes:[self _placeholderTextAttributes]];
[self _invalidatePlaceholderVisibility];
}

- (NSDictionary<NSAttributedStringKey, id> *)_placeholderTextAttributes
Expand Down

0 comments on commit 88c4349

Please sign in to comment.