react-infinite-scroll-component icon indicating copy to clipboard operation
react-infinite-scroll-component copied to clipboard

next is being called on horizontal scroll

Open oriamd opened this issue 5 years ago • 2 comments

When scrollableTarget has visible horizontal scroll and does not have vertical scroll. Then scrolling sideway triggers next callback.

Code example: https://codesandbox.io/s/red-lake-h48xh?file=/src/index.js

oriamd avatar Nov 01 '20 11:11 oriamd

Hi @oriamd the error is on your side... you are saying explicit hasMore={true}, so, the fetch is executed when the scroll moves

image

gabe2code-opstalent avatar Apr 09 '21 21:04 gabe2code-opstalent

@gabe2code-opstalent this was taken from the Doc example just for the simulation. I don't think next should be called on horizontal scroll, fetching more data should be executed on vertical scroll

oriamd avatar Apr 10 '21 08:04 oriamd