Skip to content

Commit b735cdf

Browse files
philIipfacebook-github-bot
authored andcommitted
add scrollTo metadata RCTBackedTextInputViewProtocol
Summary: fixing oncall issue: https://fb.workplace.com/groups/rn.support/permalink/7241260632589156/ in this diff, we add the properties to the native views that are needed for the `onScroll` event. `UITextField` is not a `UIScrollView` unlike `UITextView`, so we need to add these dummy properties Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D32523147 fbshipit-source-id: 1d4f227f498fa1c333e2d6c457484b559ca18f7e
1 parent 2dd33b1 commit b735cdf

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ NS_ASSUME_NONNULL_BEGIN
3131
@property (nonatomic, assign) UITextFieldViewMode clearButtonMode;
3232
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
3333
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
34+
@property (nonatomic, assign, readonly) CGFloat zoomScale;
35+
@property (nonatomic, assign, readonly) CGPoint contentOffset;
36+
@property (nonatomic, assign, readonly) UIEdgeInsets contentInset;
37+
3438

3539
// This protocol disallows direct access to `selectedTextRange` property because
3640
// unwise usage of it can break the `delegate` behavior. So, we always have to

Libraries/Text/TextInput/Singleline/RCTUITextField.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ NS_ASSUME_NONNULL_BEGIN
2929
@property (nonatomic, assign, getter=isEditable) BOOL editable;
3030
@property (nonatomic, getter=isScrollEnabled) BOOL scrollEnabled;
3131
@property (nonatomic, strong, nullable) NSString *inputAccessoryViewID;
32+
@property (nonatomic, assign, readonly) CGFloat zoomScale;
33+
@property (nonatomic, assign, readonly) CGPoint contentOffset;
34+
@property (nonatomic, assign, readonly) UIEdgeInsets contentInset;
3235

3336
@end
3437

0 commit comments

Comments
 (0)