Skip to content

Commit

Permalink
Make TextInput.onContentSizeChange event direct (#41012)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #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 facebook-github-bot committed Oct 17, 2023
1 parent b941831 commit 744fb4a
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 744fb4a

Please sign in to comment.