mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
overflow props is not honored in ScrollView in new architecture (#44699)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44699 Changelog: [Internal] In Fabric, overflow props for ScrollView is not passed down. Hence, the overflow props is ignored and FlatList content is always clipped. Reported from OSS https://github.com/facebook/react-native/issues/44683 Reviewed By: sammy-SC Differential Revision: D57895399 fbshipit-source-id: 6ce65bea0803971060e8229b66563123dd6fc114
This commit is contained in:
committed by
Thibault Malbranche
parent
3888bf3238
commit
9a5faac12b
+6
-1
@@ -122,8 +122,8 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
||||
{
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
_props = ScrollViewShadowNode::defaultSharedProps();
|
||||
|
||||
_scrollView = [[RCTEnhancedScrollView alloc] initWithFrame:self.bounds];
|
||||
_scrollView.clipsToBounds = _props->getClipsContentToBounds();
|
||||
_scrollView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
||||
_scrollView.delaysContentTouches = NO;
|
||||
((RCTEnhancedScrollView *)_scrollView).overridingDelegate = self;
|
||||
@@ -253,6 +253,11 @@ static void RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrol
|
||||
}
|
||||
}
|
||||
|
||||
// Overflow prop
|
||||
if (oldScrollViewProps.getClipsContentToBounds() != newScrollViewProps.getClipsContentToBounds()) {
|
||||
_scrollView.clipsToBounds = newScrollViewProps.getClipsContentToBounds();
|
||||
}
|
||||
|
||||
MAP_SCROLL_VIEW_PROP(zoomScale);
|
||||
|
||||
if (oldScrollViewProps.contentInset != newScrollViewProps.contentInset) {
|
||||
|
||||
Reference in New Issue
Block a user