Native view manager event types exposed to JS via view config

Differential Revision: D5814210

fbshipit-source-id: 41291f0d6b39af77f66173f6a699d88f9f4ccc74
This commit is contained in:
Brian Vaughn
2017-09-14 18:01:27 -07:00
committed by Facebook Github Bot
parent e9780bdc0f
commit 75c94a8907
9 changed files with 121 additions and 624 deletions

View File

@@ -140,6 +140,14 @@ public class ReactTextInputManager extends BaseViewManager<ReactEditText, Layout
.build();
}
@Nullable
@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
return MapBuilder.<String, Object>builder()
.put(ScrollEventType.SCROLL.getJSEventName(), MapBuilder.of("registrationName", "onScroll"))
.build();
}
@Override
public @Nullable Map<String, Integer> getCommandsMap() {
return MapBuilder.of("focusTextInput", FOCUS_TEXT_INPUT, "blurTextInput", BLUR_TEXT_INPUT);