Skip to content

Commit

Permalink
Make TextInput.onContentSizeChange event direct (facebook#41012)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#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
  • Loading branch information
sammy-SC authored and Othinn committed Oct 30, 2023
1 parent f34677f commit 6076f77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 6076f77

Please sign in to comment.