mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Support commands as strings in TextInput
Summary: See https://github.com/facebook/react-native/commit/3cae6fa950eed54bccccf61a28c0e85d5a004c6c for more context Reviewed By: JoshuaGross Differential Revision: D16009306 fbshipit-source-id: 8060167a6774ff63ec753393d890f6c1a62e1ccc
This commit is contained in:
committed by
Facebook Github Bot
parent
35570a1b63
commit
faf5c0b5ef
+17
@@ -187,6 +187,23 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void receiveCommand(
|
||||
ReactEditText reactEditText,
|
||||
String commandId,
|
||||
@Nullable ReadableArray args) {
|
||||
switch (commandId) {
|
||||
case "focus":
|
||||
case "focusTextInput":
|
||||
reactEditText.requestFocusFromJS();
|
||||
break;
|
||||
case "blur":
|
||||
case "blurTextInput":
|
||||
reactEditText.clearFocusFromJS();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExtraData(ReactEditText view, Object extraData) {
|
||||
if (extraData instanceof ReactTextUpdate) {
|
||||
|
||||
Reference in New Issue
Block a user