Merge branch 'master' into modal

This commit is contained in:
Marcos Rodriguez Velez 2024-07-22 23:49:09 -04:00
commit d08737b71f
No known key found for this signature in database
GPG key ID: 6030B2F48CCE86D7

View file

@ -334,27 +334,31 @@ const WalletsCarousel = forwardRef<FlatListRefType, WalletsCarouselProps>((props
const flatListRef = useRef<FlatList<any>>(null);
useImperativeHandle(ref, (): any => {
return {
scrollToEnd: (params: { animated?: boolean | null | undefined } | undefined) => flatListRef.current?.scrollToEnd(params),
scrollToIndex: (params: {
animated?: boolean | null | undefined;
index: number;
viewOffset?: number | undefined;
viewPosition?: number | undefined;
}) => flatListRef.current?.scrollToIndex(params),
scrollToItem: (params: {
animated?: boolean | null | undefined;
item: any;
viewOffset?: number | undefined;
viewPosition?: number | undefined;
}) => flatListRef.current?.scrollToItem(params),
scrollToOffset: (params: { animated?: boolean | null | undefined; offset: number }) => flatListRef.current?.scrollToOffset(params),
recordInteraction: () => flatListRef.current?.recordInteraction(),
flashScrollIndicators: () => flatListRef.current?.flashScrollIndicators(),
getNativeScrollRef: () => flatListRef.current?.getNativeScrollRef(),
};
}, []);
useImperativeHandle(
ref,
(): any => {
return {
scrollToEnd: (params: { animated?: boolean | null | undefined } | undefined) => flatListRef.current?.scrollToEnd(params),
scrollToIndex: (params: {
animated?: boolean | null | undefined;
index: number;
viewOffset?: number | undefined;
viewPosition?: number | undefined;
}) => flatListRef.current?.scrollToIndex(params),
scrollToItem: (params: {
animated?: boolean | null | undefined;
item: any;
viewOffset?: number | undefined;
viewPosition?: number | undefined;
}) => flatListRef.current?.scrollToItem(params),
scrollToOffset: (params: { animated?: boolean | null | undefined; offset: number }) => flatListRef.current?.scrollToOffset(params),
recordInteraction: () => flatListRef.current?.recordInteraction(),
flashScrollIndicators: () => flatListRef.current?.flashScrollIndicators(),
getNativeScrollRef: () => flatListRef.current?.getNativeScrollRef(),
};
},
[],
);
const onScrollToIndexFailed = (error: { averageItemLength: number; index: number }): void => {
console.log('onScrollToIndexFailed');