From 805f74f2a8781500264ae321b83b28f645ae2a06 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 18 Oct 2023 03:24:08 -0700 Subject: [PATCH] Make IntArray events work on Bridgeless for RN-Tester (#41047) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41047 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 fbshipit-source-id: 13bbce91a41281383d4857048e573b6d9cc5387b --- .../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(