react-infinite-scroll-component
react-infinite-scroll-component copied to clipboard
Cypress cannot scroll inverse component
When I test scroll to bottom event on common component it works properly. But if I add 'inverse' attribute to component and try to scroll component to top - it not works (on screen I see that component is not scrolling.)
Cypress code: cy.get('[id="messages"]').scrollTo('top', { ensureScrollable: false });
Component: <div id="messages" className="w-full max-h-[350px] overflow-y-scroll pb-2" > <InfiniteScroll dataLength={MessagesComponents.length} next={loadMore} className="flex flex-col-reverse gap-1" inverse={true} hasMore={!isReachedEnd} loader={<Loader />} scrollableTarget="messages" > {MessagesComponents} </InfiniteScroll> </div>