Skip to content

Commit d773395

Browse files
joevilchesfacebook-github-bot
authored andcommitted
Allow RCTScrollViewComponentView to be subclass-able (facebook#56319)
Summary: While RCTScrollViewComponentView is overridable, its NOT a UIScrollView. It has a private property this is the scroll view and if you want to override UIScrollView behavior you have to change this. Changelog: [Internal] Reviewed By: sbuggay Differential Revision: D99462381
1 parent 4a59f90 commit d773395

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
3636
/*
3737
* Returns an actual UIScrollView that this component uses under the hood.
3838
*/
39-
@property (nonatomic, strong, readonly) UIScrollView *scrollView;
39+
@property (nonatomic, strong, readwrite) UIScrollView *scrollView;
4040

4141
/** Focus area of newly-activated text input relative to the window to compare against UIKeyboardFrameBegin/End */
4242
@property (nonatomic, assign) CGRect firstResponderFocus;

scripts/cxx-api/api-snapshots/ReactAppleDebugCxx.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,8 @@ interface RCTScrollView : public RCTView <UIScrollViewDelegate, RCTScrollablePro
19871987
interface RCTScrollViewComponentView {
19881988
protected __pad0__;
19891989
public @property (assign) CGRect firstResponderFocus;
1990+
public @property (strong) UIScrollView* scrollView;
19901991
public @property (strong, readonly) RCTGenericDelegateSplitter<id<UIScrollViewDelegate>>* scrollViewDelegateSplitter;
1991-
public @property (strong, readonly) UIScrollView* scrollView;
19921992
public @property (strong, readonly) UIView* containerView;
19931993
public @property (weak) UIView* firstResponderViewOutsideScrollView;
19941994
public virtual static _Nullable RCTScrollViewComponentView* findScrollViewComponentViewForView:(UIView* view);

scripts/cxx-api/api-snapshots/ReactAppleReleaseCxx.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,8 +1987,8 @@ interface RCTScrollView : public RCTView <UIScrollViewDelegate, RCTScrollablePro
19871987
interface RCTScrollViewComponentView {
19881988
protected __pad0__;
19891989
public @property (assign) CGRect firstResponderFocus;
1990+
public @property (strong) UIScrollView* scrollView;
19901991
public @property (strong, readonly) RCTGenericDelegateSplitter<id<UIScrollViewDelegate>>* scrollViewDelegateSplitter;
1991-
public @property (strong, readonly) UIScrollView* scrollView;
19921992
public @property (strong, readonly) UIView* containerView;
19931993
public @property (weak) UIView* firstResponderViewOutsideScrollView;
19941994
public virtual static _Nullable RCTScrollViewComponentView* findScrollViewComponentViewForView:(UIView* view);

0 commit comments

Comments
 (0)