diff --git a/src/view/com/util/Views.web.tsx b/src/view/com/util/Views.web.tsx index a6a74890ff..2a421433cd 100644 --- a/src/view/com/util/Views.web.tsx +++ b/src/view/com/util/Views.web.tsx @@ -113,11 +113,27 @@ export const FlatList = React.forwardRef(function FlatListImpl( props.dataSet.stableGutters = '1' } } + + const nativeRef = React.useRef(null) + React.useImperativeHandle( + ref, + () => ({ + scrollToOffset({animated, offset}) { + nativeRef.current.scrollTo({ + x: 0, + y: offset, + animated, + }) + }, + }), + [], + ) + return ( + ref={nativeRef}> {data.map(item => (