From 09250aa1842d1c0cd34d5ed415f2e0d7495e2304 Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 11 Jan 2016 03:32:28 -0800 Subject: [PATCH] multiline textinput view not wrapping in multiline on ios Summary: It's because the view doesn't update itself after setText. Closes https://github.com/facebook/react-native/pull/5247 Reviewed By: svcscm Differential Revision: D2819520 Pulled By: nicklockwood fb-gh-sync-id: 06f5342d94f242fc63f862dac738da9b96842183 --- Libraries/Text/RCTTextView.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Libraries/Text/RCTTextView.m b/Libraries/Text/RCTTextView.m index 3a0ae85606..ed1acffde4 100644 --- a/Libraries/Text/RCTTextView.m +++ b/Libraries/Text/RCTTextView.m @@ -382,6 +382,8 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) } [self _setPlaceholderVisibility]; + [self updateContentSize]; //keep the text wrapping when the length of + //the textline has been extended longer than the length of textinputView } else if (eventLag > RCTTextUpdateLagWarningThreshold) { RCTLogWarn(@"Native TextInput(%@) is %zd events ahead of JS - try to make your JS faster.", self.text, eventLag); }