mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
TextInput: support text value+child Text nodes
Summary: Fix and simplify `AndroidTextInputShadowNode::getAttributedString` so that it (1) works, and (2) is aligned with the equivalents in the old Java code. The issue is that we weren't picking up `text` attributes since we're only traversing children and not the TextInput node itself. If a `text` attribute is present it needs to be treated as its own Text node. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D18739830 fbshipit-source-id: 4b3bc81dbe8c241c2e06fe5be1f9b50e49132890
This commit is contained in:
committed by
Facebook Github Bot
parent
7590d9f8f4
commit
a09346f129
+1
@@ -212,6 +212,7 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
||||
break;
|
||||
case "setTextAndSelection":
|
||||
int mostRecentEventCount = args.getInt(0);
|
||||
reactEditText.setMostRecentEventCount(mostRecentEventCount);
|
||||
|
||||
if (mostRecentEventCount != UNSET) {
|
||||
String text = args.getString(1);
|
||||
|
||||
Reference in New Issue
Block a user