Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,11 @@ class ScrollView extends React.Component<Props, State> {

_scrollAnimatedValue: AnimatedImplementation.Value;
_scrollAnimatedValueAttachment: ?{detach: () => void, ...} = null;
_stickyHeaderRefs: Map<string, React.ElementRef<StickyHeaderComponentType>> =
new Map();
_headerLayoutYs: Map<string, number> = new Map();
_stickyHeaderRefs: Map<
React.Key,
React.ElementRef<StickyHeaderComponentType>,
> = new Map();
_headerLayoutYs: Map<React.Key, number> = new Map();

_keyboardMetrics: ?KeyboardMetrics = null;
_additionalScrollOffset: number = 0;
Expand Down Expand Up @@ -1066,7 +1068,11 @@ class ScrollView extends React.Component<Props, State> {
}
};

_getKeyForIndex(index: $FlowFixMe, childArray: $FlowFixMe): $FlowFixMe {
_getKeyForIndex(
index: number,
// $FlowFixMe[unclear-type] - The children and its key is unknown.
childArray: any,
): React.Key {
const child = childArray[index];
return child && child.key;
}
Expand Down Expand Up @@ -1099,7 +1105,7 @@ class ScrollView extends React.Component<Props, State> {
}
}

_onStickyHeaderLayout(index: $FlowFixMe, event: $FlowFixMe, key: $FlowFixMe) {
_onStickyHeaderLayout(index: number, event: LayoutEvent, key: React.Key) {
const {stickyHeaderIndices} = this.props;
if (!stickyHeaderIndices) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2154,8 +2154,11 @@ declare class ScrollView extends React.Component<Props, State> {
constructor(props: Props): void;
_scrollAnimatedValue: AnimatedImplementation.Value;
_scrollAnimatedValueAttachment: ?{ detach: () => void, ... };
_stickyHeaderRefs: Map<string, React.ElementRef<StickyHeaderComponentType>>;
_headerLayoutYs: Map<string, number>;
_stickyHeaderRefs: Map<
React.Key,
React.ElementRef<StickyHeaderComponentType>,
>;
_headerLayoutYs: Map<React.Key, number>;
_keyboardMetrics: ?KeyboardMetrics;
_additionalScrollOffset: number;
_isTouching: boolean;
Expand Down Expand Up @@ -2214,16 +2217,16 @@ declare class ScrollView extends React.Component<Props, State> {
width: number,
height: number
) => void;
_getKeyForIndex(index: $FlowFixMe, childArray: $FlowFixMe): $FlowFixMe;
_getKeyForIndex(index: number, childArray: any): React.Key;
_updateAnimatedNodeAttachment(): void;
_setStickyHeaderRef(
key: string,
ref: ?React.ElementRef<StickyHeaderComponentType>
): void;
_onStickyHeaderLayout(
index: $FlowFixMe,
event: $FlowFixMe,
key: $FlowFixMe
index: number,
event: LayoutEvent,
key: React.Key
): void;
_handleScroll: $FlowFixMe;
_handleLayout: $FlowFixMe;
Expand Down