From 9e2df6d55b8e87cbb165c7ee23e7fe231ea880e8 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 18 Oct 2023 01:46:51 -0700 Subject: [PATCH] Make IntArray events work on Bridgeless for RN-Tester (#41047) Summary: Array events are currently broken in the sample for RN Tester. This is because the event name is not registered correctly. I'm updating the event registration to be correct. Changelog: [Internal] [Changed] - Make IntArray events work on Bridgeless for RN-Tester Reviewed By: cipolleschi Differential Revision: D50266485 --- .../java/com/facebook/react/uiapp/component/MyNativeView.kt | 2 +- .../com/facebook/react/uiapp/component/MyNativeViewManager.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeView.kt b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeView.kt index a773f9af1cb3a0..c9365d728025c7 100644 --- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeView.kt +++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeView.kt @@ -110,7 +110,7 @@ class MyNativeView(context: ThemedReactContext) : View(context) { viewId: Int, private val payload: WritableMap ) : Event(surfaceId, viewId) { - override fun getEventName() = "onIntArrayChanged" + override fun getEventName() = "topIntArrayChanged" override fun getEventData() = payload } diff --git a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeViewManager.kt b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeViewManager.kt index 35635167b4104f..938d27f4c46ad5 100644 --- a/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeViewManager.kt +++ b/packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/component/MyNativeViewManager.kt @@ -60,7 +60,7 @@ internal class MyNativeViewManager : override fun getExportedCustomBubblingEventTypeConstants(): Map = MapBuilder.builder() .put( - "onIntArrayChanged", + "topIntArrayChanged", MapBuilder.of( "phasedRegistrationNames", MapBuilder.of(