From 744fb4a0d23d15a40cd591e31f6c0f6cb3a7f06b Mon Sep 17 00:00:00 2001 From: Samuel Susla Date: Tue, 17 Oct 2023 05:36:59 -0700 Subject: [PATCH] Make TextInput.onContentSizeChange event direct (#41012) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41012 changelog: [iOS][Breaking] Make TextInput.onContentSizeChange a direct event TextInput.onContentSizeChange should be a direct event. It is a [direct event on Android](https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/NativeComponent/BaseViewConfig.android.js#L126C3-L126C23) and even on iOS there are traits that it was meant to be a direct event (https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputShadowView.h#L19C47-L19C47) Seems like an oversight. Reviewed By: javache Differential Revision: D50323402 fbshipit-source-id: 3d1b1f1f0df010d61fbab672ef30e06cf2e2ad39 --- .../Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm index a19b55569e8d71..6d3d18b11ebe80 100644 --- a/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm +++ b/packages/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm @@ -71,7 +71,7 @@ @implementation RCTBaseTextInputViewManager { RCT_EXPORT_SHADOW_PROPERTY(text, NSString) RCT_EXPORT_SHADOW_PROPERTY(placeholder, NSString) -RCT_EXPORT_SHADOW_PROPERTY(onContentSizeChange, RCTBubblingEventBlock) +RCT_EXPORT_SHADOW_PROPERTY(onContentSizeChange, RCTDirectEventBlock) RCT_CUSTOM_VIEW_PROPERTY(multiline, BOOL, UIView) {