recyclerlistview icon indicating copy to clipboard operation
recyclerlistview copied to clipboard

How do we know when ScrollToOffset / ScrollToIndex is finished?

Open Dani-Boy92 opened this issue 2 years ago • 1 comments

ScrollToOffset or ScrollToIndex are async functions as far as I can figure out. Is there any way to determine when the scrolling is finished?

const handleTabClick = async (listRef) => {
        // await is not working. the only way that is see a manual time out
        await listRef.current.scrollToOffset(0, 0, false);
        setPage(1);
        setSelectedTab(Types.STORY);
    };

Dani-Boy92 avatar Jun 21 '22 10:06 Dani-Boy92

I think that you're looking for handleOnMomentumEnd

gustavolsilvano avatar Aug 12 '22 19:08 gustavolsilvano