Skip to content

Commit 345d0c1

Browse files
ZHUANGPPfacebook-github-bot
authored andcommitted
delete DEPRECATED_sendUpdatedChildFrames prop from ScrollView
Summary: Changelog: [iOS][Removed] - Removed DEPRECATED_sendUpdatedChildFrames prop to ScrollView component because there are no callsites of it anymore Reviewed By: shergin Differential Revision: D21941946 fbshipit-source-id: 0b7d6d0986ddff4b250e70e0450a6f7e166b41f4
1 parent a28a52d commit 345d0c1

File tree

6 files changed

+1
-26
lines changed

6 files changed

+1
-26
lines changed

Libraries/Components/ScrollView/ScrollView.js

-13
Original file line numberDiff line numberDiff line change
@@ -291,15 +291,6 @@ type IOSProps = $ReadOnly<{|
291291
| 'never'
292292
| 'always'
293293
),
294-
/**
295-
* When true, ScrollView will emit updateChildFrames data in scroll events,
296-
* otherwise will not compute or emit child frame data. This only exists
297-
* to support legacy issues, `onLayout` should be used instead to retrieve
298-
* frame data.
299-
* The default value is false.
300-
* @platform ios
301-
*/
302-
DEPRECATED_sendUpdatedChildFrames?: ?boolean,
303294
|}>;
304295

305296
type AndroidProps = $ReadOnly<{|
@@ -1147,9 +1138,6 @@ class ScrollView extends React.Component<Props, State> {
11471138
? this.props.alwaysBounceVertical
11481139
: !this.props.horizontal;
11491140

1150-
const DEPRECATED_sendUpdatedChildFrames = !!this.props
1151-
.DEPRECATED_sendUpdatedChildFrames;
1152-
11531141
const baseStyle =
11541142
this.props.horizontal === true
11551143
? styles.baseHorizontal
@@ -1197,7 +1185,6 @@ class ScrollView extends React.Component<Props, State> {
11971185
this.props.onMomentumScrollBegin || this.props.onMomentumScrollEnd
11981186
? true
11991187
: false,
1200-
DEPRECATED_sendUpdatedChildFrames,
12011188
// default to true
12021189
snapToStart: this.props.snapToStart !== false,
12031190
// default to true

Libraries/Components/ScrollView/ScrollViewNativeComponentType.js

-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ export type ScrollViewNativeProps = $ReadOnly<{
7777
snapToOffsets?: ?$ReadOnlyArray<number>,
7878
snapToStart?: ?boolean,
7979
zoomScale?: ?number,
80-
DEPRECATED_sendUpdatedChildFrames?: ?boolean,
8180
// Overrides
8281
style?: {...ViewStyleProp, ...} | DangerouslyImpreciseStyle,
8382
onResponderGrant?: ?(e: any) => void | boolean,

Libraries/Components/ScrollView/ScrollViewViewConfig.js

-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ const ScrollViewViewConfig = {
6969
snapToOffsets: true,
7070
snapToStart: true,
7171
zoomScale: true,
72-
73-
DEPRECATED_sendUpdatedChildFrames: true,
7472
},
7573
};
7674

Libraries/Components/ScrollView/__tests__/__snapshots__/ScrollView-test.js.snap

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ exports[`<ScrollView /> should render as expected: should deep render when mocke
1414

1515
exports[`<ScrollView /> should render as expected: should deep render when not mocked (please verify output manually) 1`] = `
1616
<RCTScrollView
17-
DEPRECATED_sendUpdatedChildFrames={false}
1817
alwaysBounceVertical={true}
1918
onContentSizeChange={null}
2019
onLayout={[Function]}

React/Views/ScrollView/RCTScrollView.m

+1-8
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher
299299
#endif
300300

301301
_automaticallyAdjustContentInsets = YES;
302-
_DEPRECATED_sendUpdatedChildFrames = NO;
303302
_contentInset = UIEdgeInsetsZero;
304303
_contentSize = CGSizeZero;
305304
_lastClippedToRect = CGRectNull;
@@ -593,13 +592,7 @@ - (void)scrollViewDidScroll:(UIScrollView *)scrollView
593592
*/
594593
if (_allowNextScrollNoMatterWhat ||
595594
(_scrollEventThrottle > 0 && _scrollEventThrottle < MAX(0.017, now - _lastScrollDispatchTime))) {
596-
if (_DEPRECATED_sendUpdatedChildFrames) {
597-
// Calculate changed frames
598-
RCT_SEND_SCROLL_EVENT(onScroll, (@{@"updatedChildFrames" : [self calculateChildFramesData]}));
599-
} else {
600-
RCT_SEND_SCROLL_EVENT(onScroll, nil);
601-
}
602-
595+
RCT_SEND_SCROLL_EVENT(onScroll, nil);
603596
// Update dispatch time
604597
_lastScrollDispatchTime = now;
605598
_allowNextScrollNoMatterWhat = NO;

React/Views/ScrollView/RCTScrollViewManager.m

-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ - (UIView *)view
109109
RCT_EXPORT_VIEW_PROPERTY(onScrollEndDrag, RCTDirectEventBlock)
110110
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollBegin, RCTDirectEventBlock)
111111
RCT_EXPORT_VIEW_PROPERTY(onMomentumScrollEnd, RCTDirectEventBlock)
112-
RCT_EXPORT_VIEW_PROPERTY(DEPRECATED_sendUpdatedChildFrames, BOOL)
113112
RCT_EXPORT_VIEW_PROPERTY(inverted, BOOL)
114113
#if defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 /* __IPHONE_11_0 */
115114
RCT_EXPORT_VIEW_PROPERTY(contentInsetAdjustmentBehavior, UIScrollViewContentInsetAdjustmentBehavior)

0 commit comments

Comments
 (0)