mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove FlowFixMe on ref
Summary: Changelog: [Internal][Fixed]:Remove FlowFixMe VirtualizedSectionList ref Reviewed By: nadiia Differential Revision: D26381836 fbshipit-source-id: ed9a687c50a05f1176d99e6e6bd362ac830fbfae
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4e6d33a112
commit
0939b938b2
@@ -143,8 +143,11 @@ class VirtualizedSectionList<
|
||||
index += this.props.getItemCount(this.props.sections[i].data) + 2;
|
||||
}
|
||||
let viewOffset = params.viewOffset || 0;
|
||||
if (this._listRef == null) {
|
||||
return;
|
||||
}
|
||||
if (params.itemIndex > 0 && this.props.stickySectionHeadersEnabled) {
|
||||
// $FlowFixMe Cannot access private property
|
||||
// $FlowFixMe[prop-missing] Cannot access private property
|
||||
const frame = this._listRef._getFrameMetricsApprox(
|
||||
index - params.itemIndex,
|
||||
);
|
||||
@@ -158,7 +161,7 @@ class VirtualizedSectionList<
|
||||
this._listRef.scrollToIndex(toIndexParams);
|
||||
}
|
||||
|
||||
getListRef(): VirtualizedList {
|
||||
getListRef(): ?React.ElementRef<typeof VirtualizedList> {
|
||||
return this._listRef;
|
||||
}
|
||||
|
||||
@@ -427,11 +430,8 @@ class VirtualizedSectionList<
|
||||
}
|
||||
|
||||
_cellRefs = {};
|
||||
_listRef: VirtualizedList;
|
||||
_listRef: ?React.ElementRef<typeof VirtualizedList>;
|
||||
_captureRef = ref => {
|
||||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error when upgrading Flow's support for React. To see the
|
||||
* error delete this comment and run Flow. */
|
||||
this._listRef = ref;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user