We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 06751aa commit 443c3c1Copy full SHA for 443c3c1
packages/react-native/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
@@ -268,6 +268,13 @@ - (void)updateProps:(const Props::Shared &)props oldProps:(const Props::Shared &
268
defaultAttributes[RCTAttributedStringEventEmitterKey] =
269
_backedTextInputView.defaultTextAttributes[RCTAttributedStringEventEmitterKey];
270
#endif
271
+
272
+ NSMutableParagraphStyle *paragraphStyle = defaultAttributes[NSParagraphStyleAttributeName];
273
274
+ if (!newTextInputProps.multiline) {
275
+ paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
276
+ defaultAttributes[NSParagraphStyleAttributeName] = paragraphStyle;
277
+ }
278
_backedTextInputView.defaultTextAttributes = defaultAttributes;
279
}
280
0 commit comments