seatgeek / react-infinite

A browser-ready efficient scrolling container based on UITableView
Other
2.71k stars 275 forks source link

I can't seem to scroll back to the top after infinite load begins #254

Open sterrymdstaff opened 6 years ago

sterrymdstaff commented 6 years ago

Here's the challenge I'm trying to overcome.

When I scroll to the bottom of my table rows (using infinite scroll to wrap a table) I can't scroll all the way to the top of the table again.

Once I get to the top 3-5 rows, the InfiniteScroll component scrolls back down. If I scroll up REALLY slow, I can get back to the top, but that's not going to work for my users.

I tried disabling infinite scroll by passing undefined to infiniteLoadBeginEdgeOffset.

Then I use handleScroll to start infinite scroll again when scrolling starts.

I see 2 problems:

1) handleScroll get's called regardless of whether or not I do any scrolling. 2) even without problem number 1, I have no way of preventing infinite scroll when I scroll up.

I'd like to suggest an update that disables infinite scrolling when the user scrolls up.

Do you have any other ideas of how I can fix this?

JMStewart00 commented 6 years ago

Just a shot in the dark but did anyone else experience this and were you able to overcome it?